[opencms-dev] How to forward in OpenCms

Michael Kraus michael.kraus at mindmatics.de
Thu Aug 3 18:32:50 CEST 2006


Dear all,

when I try to forward an HTTP request to another page like this:

         CmsRequestUtil.forwardRequest(cmsAction.link("index.html?a=1&b=2"), request, response);

I get the following:

java.lang.NullPointerException
	at org.opencms.flex.CmsFlexController.pop(CmsFlexController.java:550)
	at org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:463)
	at org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:175)
	at org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:450)
	at org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:395)
	at org.opencms.loader.CmsXmlPageLoader.load(CmsXmlPageLoader.java:227)
	at org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:711)
	at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1337)
	at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:139)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.mindmatics.common.wap.filter.operator.WapGatewayFilter.doFilter(WapGatewayFilter.java:61)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.mindmatics.common.wap.taglib.content.ContentTagLibFilter.doFilter(ContentTagLibFilter.java:126)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.mindmatics.common.wap.filter.replace.ReplaceFilter.doFilter(ReplaceFilter.java:66)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.mindmatics.common.wap.filter.dump.LoggerFilter.doFilter(LoggerFilter.java:100)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at com.mindmatics.common.wap.filter.useragent.UserAgentFilter.doFilter(UserAgentFilter.java:121)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.cluster.tcp.ReplicationValve.invoke(ReplicationValve.java:145)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
	at java.lang.Thread.run(Thread.java:595)

How can forwarding be done in OpenCms? I have to rewrite a set of templates that heavily rely on sendRedirects in order to use only forwards, as most handheld devices just ignore redirects or show even worse symptoms ;-)

Kind regards,
	Michael



More information about the opencms-dev mailing list