[OpenSIPS-Users] WeSIP - Problem with <jsp:include> and RequestDispatcher

Viliam Pucik viliam.pucik at gmail.com
Sun Mar 15 21:20:34 CET 2009


Hello,

there is a problem when using <jsp:include page"some/page.jsp"> tag in
a JSP page in WeSIP.

To reproduce the error:

For example: Download click2call application and put Test.jsp page
with the following content in it:

<jsp:include page="Click2Dial.jsp" />

into the same folder where Click2Dial.jsp is located. It will show
"HTTP Status 500 - Internal Server Error" after opening URL
http://localhost:8080/c2c/Test.jsp.

The error in a log file:

2009-03-15 20:49:29 StandardWrapperValve[jsp]: Servlet.service() for
servlet jsp threw exception
java.lang.NullPointerException
	at org.apache.jasper.runtime.JspRuntimeLibrary.include(Unknown Source)
	at org.apache.jsp.Test$jsp._jspService(Test$jsp.java:65)
	at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Unknown
Source)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(Unknown Source)
	at org.apache.jasper.servlet.JspServlet.service(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:200)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:146)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:206)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:946)
	at com.voztele.sipservlet.valves.ConvergedContextValve.invokeHTTP(ConvergedContextValve.java:144)
	at com.voztele.sipservlet.valves.ConvergedContextValve.invoke(ConvergedContextValve.java:64)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:946)
	at org.apache.catalina.core.StandardHttpContext.invoke(StandardHttpContext.java:2377)
	at com.voztele.sipservlet.core.ConvergedContext.invoke(ConvergedContext.java:98)
	at com.voztele.sipservlet.valves.ConvergedHostValve.invokeHTTP(ConvergedHostValve.java:337)
	at com.voztele.sipservlet.valves.ConvergedHostValve.invoke(ConvergedHostValve.java:98)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:124)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:594)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:946)
	at com.voztele.sipservlet.valves.ConvergedEngineValve.invoke(ConvergedEngineValve.java:98)
	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:596)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:433)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:946)
	at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:994)
	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1105)
	at java.lang.Thread.run(Thread.java:636)

Also the similar error happens when using

RequestDispatcher dispatcher =
getServletContext().getRequestDispatcher("/jsp/Click2Dial.jsp");
dispatcher.forward(request, response);

in a servlet.

It's a little bit frustrating :(


Regards

Viliam Pucik



More information about the Users mailing list