Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-4690

Include in Jsp cause StackOverflow

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Major
    • None
    • 8.2.0.Final
    • Web (Undertow)
    • None
    • Hide

      I join to this ticket a little war (sample2.war, the sample.war was not good) where you can see the same behavior
      URL to test the jar
      http://127.0.0.1:8080/sample2/login

      login.jsp
      Login Page v1 <br>
      <jsp:include page="/WEB-INF/jsp/HelloWorld.jsp"/>
      
      HelloWorld.jsp
      Hello World include !!!!  
      
      web.xml
      <web-app
      		xmlns="http://java.sun.com/xml/ns/javaee"
      		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      		xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
      		version="3.0">
        
      	<servlet>
      		<servlet-name>login</servlet-name>
      		<jsp-file>/WEB-INF/jsp/login.jsp</jsp-file>
      	</servlet>
      
      	<servlet>
      		<servlet-name>helloWorld</servlet-name>
      		<jsp-file>/WEB-INF/jsp/HelloWorld.jsp"</jsp-file>		        
      	</servlet>
      	
      	<servlet-mapping>
               <servlet-name>login</servlet-name>
               <url-pattern>/login</url-pattern>
           </servlet-mapping>
      
      </web-app>
      
      
      Show
      I join to this ticket a little war (sample2.war, the sample.war was not good) where you can see the same behavior URL to test the jar http://127.0.0.1:8080/sample2/login login.jsp Login Page v1 <br> <jsp:include page= "/WEB-INF/jsp/HelloWorld.jsp" /> HelloWorld.jsp Hello World include !!!! web.xml <web-app xmlns= "http://java.sun.com/xml/ns/javaee" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation= "http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version= "3.0" > <servlet> <servlet-name> login </servlet-name> <jsp-file> /WEB-INF/jsp/login.jsp </jsp-file> </servlet> <servlet> <servlet-name> helloWorld </servlet-name> <jsp-file> /WEB-INF/jsp/HelloWorld.jsp" </jsp-file> </servlet> <servlet-mapping> <servlet-name> login </servlet-name> <url-pattern> /login </url-pattern> </servlet-mapping> </web-app>

    Description

      When i made an include in a jsp an other jsp, I get a stackoverflow.
      I think that wildfly don't include the seconde jsp but the first and cause a infinity loop

      I also try to update the version of undertown to the latest jar found (undertow-core-1.1.4.Final, undertow-servlet-1.1.4.Final, undertow-websockets-jsr-1.1.4.Final)

      And a stuck of the stacktrace

      	at org.apache.jsp.WEB_002dINF.jsp.templates.OneColumn_jsp._jspx_meth_c_005fotherwise_005f1(OneColumn_jsp.java:726)
      	at org.apache.jsp.WEB_002dINF.jsp.templates.OneColumn_jsp._jspx_meth_c_005fchoose_005f2(OneColumn_jsp.java:671)
      	at org.apache.jsp.WEB_002dINF.jsp.templates.OneColumn_jsp._jspx_meth_c_005fif_005f2(OneColumn_jsp.java:639)
      	at org.apache.jsp.WEB_002dINF.jsp.templates.OneColumn_jsp._jspService(OneColumn_jsp.java:239)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:366)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
      	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToServlet(ServletInitialHandler.java:198)
      	at io.undertow.servlet.spec.RequestDispatcherImpl.include(RequestDispatcherImpl.java:279)
      	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:940)
      	at org.apache.jsp.WEB_002dINF.jsp.templates.OneColumn_jsp._jspx_meth_c_005fotherwise_005f1(OneColumn_jsp.java:726)
      	at org.apache.jsp.WEB_002dINF.jsp.templates.OneColumn_jsp._jspx_meth_c_005fchoose_005f2(OneColumn_jsp.java:671)
      	at org.apache.jsp.WEB_002dINF.jsp.templates.OneColumn_jsp._jspx_meth_c_005fif_005f2(OneColumn_jsp.java:639)
      	at org.apache.jsp.WEB_002dINF.jsp.templates.OneColumn_jsp._jspService(OneColumn_jsp.java:239)
      	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:69)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:366)
      	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:326)
      	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
      	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
      	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61)
      	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:249)
      	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToServlet(ServletInitialHandler.java:198)
      	at io.undertow.servlet.spec.RequestDispatcherImpl.include(RequestDispatcherImpl.java:279)
      	at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:940)
      	at org.apache.jsp.WEB_002dINF.jsp.templates.OneColumn_jsp._jspx_meth_c_005fotherwise_005f1(OneColumn_jsp.java:726)
      	at org.apache.jsp.WEB_002dINF.jsp.templates.OneColumn_jsp._jspx_meth_c_005fchoose_005f2(OneColumn_jsp.java:671)
      	at org.apache.jsp.WEB_002dINF.jsp.templates.OneColumn_jsp._jspx_meth_c_005fif_005f2(OneColumn_jsp.java:639)
      	at org.apache.jsp.WEB_002dINF.jsp.templates.OneColumn_jsp._jspService(OneColumn_jsp.java:239)
      

      Attachments

        1. sample.war
          2 kB
        2. sample2.war
          2 kB

        Issue Links

          Activity

            People

              tomazcerar Tomaž Cerar (Inactive)
              bertrand82 Bertrand Cedric (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: