tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Muc <alex....@utoronto.ca>
Subject jsp:include strangeness
Date Mon, 20 Mar 2000 05:40:01 GMT
Hi,

I've been using Tomcat 3.1 on RH6.1 Linux machine.  I am having some
strange behaviour occuring in some of my JSP pages involving a
<jsp:include page...> tag with <jsp:param ...> tags.  Here's the
situation:
I have a file called links.jsp which takes a couple of parameters and
parses that information through a call to
HttpUtils.parseQueryString(request.getQueryString())

The links.jsp file is included from a number of other pages, the strange
thing happens in the following case:
When included from a file called modCat.jsp with the following code
    <jsp:include page="../links/links.jsp" flush="true" >
        <jsp:param name="linksCorPIDVar" value="<%= pp.getID() %>" />
        <jsp:param name="realCorPIDVar" value="<%= -1 %>" />
    </jsp:include>
which itself is called with some parameters in it's request (ie:  client
calls "http://www.abc.com/cat/modCat.jsp?p1=v") then everything works
fine,

In another case, seemingly identical (that's the strange part) where the
links.jsp file is included from modPub.jsp, which itself is not called
with any parameters, with the following code (which is the exact same as
the code above)
    <jsp:include page="../links/links.jsp" flush="true" >
        <jsp:param name="linksCorPIDVar" value="<%= pp.getID() %>" />
        <jsp:param name="realCorPIDVar" value="<%= -1 %>" />
    </jsp:include>
then I get the following error included in the output of the modPub.jsp
request (which is the error generated by the links.jsp request from the
include call):

Included servlet error: 500

  Location: /pubs/maintenance/pub/ModPub.jsp

  Internal Servlet Error:

  javax.servlet.ServletException
          at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:384)

          at
mai_00025tenance.pub._0005f_0005f.links._0002fmaintenance_0002fpub_0002f_0002e_0002e_0002flinks_0002flinks_0002ejsplinks_jsp_2._jspService(_0002fmaintenance_0002fpub_0002f_0002e_0002e_0002flinks_0002flinks_0002ejsplinks_jsp_2.java:147)

          at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
          at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
          at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:172)

          at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:259)

          at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:367)
          at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
          at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:390)

          at
org.apache.tomcat.core.RequestDispatcherImpl.include(RequestDispatcherImpl.java:256)

          at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:348)

          at
mai_00025tenance.pub._0002fmaintenance_0002fpub_0002fModPub_0002ejspModPub_jsp_1._jspService(_0002fmaintenance_0002fpub_0002fModPub_0002ejspModPub_jsp_1.java:192)

          at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
          at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
          at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:172)

          at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:259)

          at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:367)
          at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
          at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:390)

          at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:523)
          at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:146)

          at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:334)

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

  Root cause:

  java.lang.IllegalArgumentException
          at
javax.servlet.http.HttpUtils.parseQueryString(HttpUtils.java:140)
          at
mai_00025tenance.pub._0005f_0005f.links._0002fmaintenance_0002fpub_0002f_0002e_0002e_0002flinks_0002flinks_0002ejsplinks_jsp_2._jspService(_0002fmaintenance_0002fpub_0002f_0002e_0002e_0002flinks_0002flinks_0002ejsplinks_jsp_2.java:70)

          at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
          at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
          at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:172)

          at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:259)

          at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:367)
          at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
          at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:390)

          at
org.apache.tomcat.core.RequestDispatcherImpl.include(RequestDispatcherImpl.java:256)

          at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:348)

          at
mai_00025tenance.pub._0002fmaintenance_0002fpub_0002fModPub_0002ejspModPub_jsp_1._jspService(_0002fmaintenance_0002fpub_0002fModPub_0002ejspModPub_jsp_1.java:192)

          at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
          at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
          at
org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.java:172)

          at
org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:259)

          at
org.apache.jasper.runtime.JspServlet.service(JspServlet.java:367)
          at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
          at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:390)

          at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:523)
          at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:146)

          at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:334)

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

Basically what is happening is that the call to parseQueryString is
failing.  I did some checking and this is happening because the call to
request.getQueryString() is returning a null value from within the
links.jsp file.  This shouldn't be happening though because I have set
some parameters within the jsp:include tag of the call.

Can anyone tell me what's going on here?  I hope this made sense.

Thanks for your time.
Alex


Mime
View raw message