Skip navigation
jimcpl
Currently Being Moderated

Newbie: Trying to 'call' JSP from CFML (example doesn't work)

Mar 13, 2012 6:28 PM

Hi,

 

I am (really) just getting started with CFML, so I got ColdFusion 8 Developer deployed onto a GlassFish 3.1.1 server.

 

I put a copy of a small hello.cfm into the <GF_DOMAIN>/applications/cfusion/ directory, and when I point a browser to http://<host>:8080/cfusion/hello.cfm, I get the "Hello world".

 

So next, I'm trying to 'call' a JSP from a CFML page, and I found this example:

 

http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=Java _6.html

 

I put a copy of the CFML at cfusion/hellojsp.cfm:

 

 

<cfapplication name="myApp" sessionmanagement="yes">

<cfscript>

Request.myVariable = "This";

Session.myVariable = "is a";

Application.myVariable = "test.";

GetPageContext().include("hello.jsp?name=Bobby");

</cfscript>

 

and also created a cfusion/hello.jsp per the above link:

 

<%@page import="java.util.*" %>

<h2>Hello <%= request.getParameter("name")%>!</h2>

 

 

<br>Request.myVariable: <%= request.getAttribute("myVariable")%>

<br>session.myVariable: <%= ((Map)(session.getAttribute("myApp"))).get("myVariable")%>

<br>Application.myVariable: <%= ((Map)(application.getAttribute("myApp"))).get("myVariable")%>

 

 

In other words, in the <GF_DOMAIN>/applications/cfusion directory, I have:

 

hellojsp.cfm

hello.jsp

 

However, if I point the browser to either http://<host>:8080/cfusion/hellojsp.cfm or http://<host>:8080/cfusion/hello.jsp, I get a 500 error.

 

In the GlassFish server.log, I get the following:

 

INFO: 03/13 21:17:24 Error [http-thread-pool-8080(5)] - coldfusion.jsp.JspWriterIncludeResponse.getStatus()I The specific sequence of files included or processed is: C:\glassfish3\glassfish\domains\domain1\applications\cfusion\hellojsp .cfm, line: 6

 

 

Mar 13, 2012 9:17:24 PM org.apache.catalina.core.StandardWrapperValve log

WARNING: StandardWrapperValve[CfmServlet]: PWC1406: Servlet.service() for servlet CfmServlet threw exception

javax.servlet.ServletException: ROOT CAUSE:

java.lang.AbstractMethodError: coldfusion.jsp.JspWriterIncludeResponse.getStatus()I

          at javax.servlet.http.HttpServletResponseWrapper.getStatus(HttpServletRe sponseWrapper.java:253)

          at com.sun.web.server.J2EEInstanceListener.handleAfterEvent(J2EEInstance Listener.java:356)

          at com.sun.web.server.J2EEInstanceListener.instanceEvent(J2EEInstanceLis tener.java:112)

          at org.apache.catalina.util.InstanceSupport.fireInstanceEvent(InstanceSu pport.java:465)

          at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java :1562)

          at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDi spatcher.java:787)

          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp atcher.java:649)

          at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationD ispatcher.java:604)

          at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDis patcher.java:534)

          at coldfusion.runtime.NeoPageContext.include(NeoPageContext.java:2086)

          at coldfusion.runtime.NeoPageContext.include(NeoPageContext.java:2060)

          at sun.reflect.GeneratedMethodAccessor469.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at coldfusion.runtime.StructBean.invoke(StructBean.java:511)

          at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2300)

          at cfhellojsp2ecfm1997599341.runPage(C:\glassfish3\glassfish\domains\dom ain1\applications\cfusion\hellojsp.cfm:6)

          at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)

          at coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)

          at coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)

          at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279 )

          at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.ja va:48)

          at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)

          at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)

          at coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)

          at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)

          at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePers istenceFilter.java:28)

          at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)

          at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)

          at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)

          at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)

          at coldfusion.CfmServlet.service(CfmServlet.java:175)

          at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:8 9)

          at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java :1539)

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:343)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:217)

          at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringS ervletFilter.java:42)

          at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46 )

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:256)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:217)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:279)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:175)

          at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j ava:655)

          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:595)

          at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)

          at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESess ionLockingStandardPipeline.java:91)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:162)

          at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.j ava:330)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:231)

          at com.sun.enterprise.v3.services.impl.ContainerMapper.service(Container Mapper.java:174)

          at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:8 28)

          at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)

          at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)

          at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFil ter.java:225)

          at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultPro tocolChain.java:137)

          at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav a:104)

          at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav a:90)

          at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java :79)

          at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextT ask.java:54)

          at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask. java:59)

          at com.sun.grizzly.ContextTask.run(ContextTask.java:71)

          at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadP ool.java:532)

          at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool .java:513)

          at java.lang.Thread.run(Thread.java:662)

 

 

          at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringS ervletFilter.java:70)

          at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46 )

          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl icationFilterChain.java:256)

          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF ilterChain.java:217)

          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV alve.java:279)

          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV alve.java:175)

          at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.j ava:655)

          at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav a:595)

          at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)

          at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESess ionLockingStandardPipeline.java:91)

          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j ava:162)

          at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.j ava:330)

          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav a:231)

          at com.sun.enterprise.v3.services.impl.ContainerMapper.service(Container Mapper.java:174)

          at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:8 28)

          at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)

          at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)

          at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFil ter.java:225)

          at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultPro tocolChain.java:137)

          at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav a:104)

          at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.jav a:90)

          at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java :79)

          at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextT ask.java:54)

          at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask. java:59)

          at com.sun.grizzly.ContextTask.run(ContextTask.java:71)

          at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadP ool.java:532)

          at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool .java:513)

          at java.lang.Thread.run(Thread.java:662)

 

 

Can anyone tell me what might be causing this problem?

 

Thanks,

Jim

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points