<servlet-mapping> causes recursive error

From: Markus Brandy (da_joker_at_gmx.net)
Date: 12/30/03


Date: 30 Dec 2003 03:34:30 -0800

Hi,

I've installed catalina and want to start a redirector every time a
.jsp is called from a browser.
So my web.xml looks like this:

  <servlet>
    <servlet-name>redirector</servlet-name>
    <jsp-file>/redirector.jsp</jsp-file>
  </servlet>
  <servlet-mapping>
    <servlet-name>redirector</servlet-name>
    <url-pattern>*.jsp</url-pattern>
  </servlet-mapping>

In my redirector.jsp I read out the request URI and then include it:

<jsp:include page='<%= lRequestedPage %>' />

But this seems to cause a recursive error indicated by a 'stack
overflow error'. It seems that every 'include' calls the
redirector.jsp!
The following lines are shown about 20 times in my browser:

at org.apache.jsp.redirector$jsp._jspService(redirector$jsp.java:210)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:683)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:497)
at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:819)

I've tried the include directive:

<%@ include file="test.jsp" %>

This one works, but it can't be used dynamically...

Can someone out there help me?

Thanks a million,
Markus



Relevant Pages

  • Re: Using Httpwebrequest to Submit multipart/form-data
    ... > like you from pretending to be a browser. ... > for the JSP page to be attempting to identify the browser, ... > didn't set the User Agent header. ... > for doing this that is downloadable open source using the Unix compatibility ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Using Httpwebrequest to Submit multipart/form-data
    ... > like you from pretending to be a browser. ... > for the JSP page to be attempting to identify the browser, ... > didn't set the User Agent header. ... > for doing this that is downloadable open source using the Unix compatibility ...
    (microsoft.public.dotnet.framework)
  • Re: Using Httpwebrequest to Submit multipart/form-data
    ... > like you from pretending to be a browser. ... > for the JSP page to be attempting to identify the browser, ... > didn't set the User Agent header. ... > for doing this that is downloadable open source using the Unix compatibility ...
    (microsoft.public.dotnet.general)
  • Re: Jasper Compilation Error
    ... > It's not a JSP throwing the error, but a bean used by a JSP. ... Do you get an error in your browser or just in the logs? ... root cause, if there is one, will be another stack trace below the first one. ...
    (comp.lang.java.programmer)
  • Re: Displaying binary data in browser
    ... JSP? ... > SO I want to write a Java method which does that. ... > I already have binary data with me in a variable.I need a java class ... how do you plan to show an image in the browser if you're using ...
    (comp.lang.java.programmer)