tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Drew Kidder <Andrew.Kid...@Tivoli.com>
Subject RE: Recursive JSP include
Date Fri, 20 Oct 2000 14:23:58 GMT
That was indeed the problem.  Once I took one of the references completely 
out, everything worked.  Thanks for the tip!  Apparently, I was putting too 
much faith in the power of the comment. :)


At 04:47 AM 10/20/2000 -0500, you wrote:
>I think I see your problem...
>
>You said you're using the <!-- --> tags to comment out you includes... that
>won't do you any good... the <!-- --> tag pair is HTML so it's executed on
>the client side (in other words, the client browser will comment out the
>things in between those tags).  But the server won't understand this tag and
>it will just let it go... but... it will execute any JSP code inside it...
>If you do some other kind of a statement lets say for example <%=
>sSomeString %> and let's suppose that the string sSomeString had the value
>"myString".  When you "comment" this part out like so: <!-- <%= sSomeString
>%> --> in the JSP and then look at the generated HTML source code that you
>get up on the browser you'll see the HTML code <!-- myString -->... so in
>other words... you'll comment out the value of the expression in the HTML on
>the client side... not the expression itself on the server side!
>
>So your expression is actually being executed on the server side... I'll bet
>you have an "empty" comment somewhere in the generated HTML code
>"<!--  -->") because the output of the <%@ include
>file="/templates/security/requireLogin.jsp" %> statement is nothing...
>
>Hope this is the case...
>
>Regards, Stefan.
>
>
>
>-----Original Message-----
>From: Drew Kidder [mailto:Andrew.Kidder@Tivoli.com]
>Sent: 19. oktober 2000 19:25
>To: tomcat-user@jakarta.apache.org
>Subject: Recursive JSP include
>
>
>Hello all...
>
>I have a page called index.jsp that does the following JSP include:
>
><%@ include file="/templates/security/requireLogin.jsp" %>
>
>Later on in the page, I have a link to a page called logout.jsp that also
>includes the same file as above.  The following error gets returned from
>the browser when I try to access the logout.jsp page:
>
>Error: 500
>
>Location: /account/logout.jsp
>
>Internal Servlet Error:
>
>org.apache.jasper.compiler.ParseException: Seen file
>/templates/security/requireLogin.jsp already, maybe this is a recursive
>include?!
>          at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java,
>Compiled Code)
>          at org.apache.jasper.compiler.JspReader.pushFile(JspReader.java,
>Compiled Code)
>          at
>org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEve
>ntListener.java,
>Compiled Code)
>          at
>org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingList
>ener.java,
>Compiled Code)
>          at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java,
>Compiled Code)
>          at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled
>Code)
>          at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled
>Code)
>          at org.apache.jasper.compiler.Parser.parse(Parser.java, Compiled
>Code)
>          at org.apache.jasper.compiler.Compiler.compile(Compiler.java,
>Compiled Code)
>          at org.apache.jasper.runtime.JspServlet.loadJSP(JspServlet.java,
>Compiled Code)
>          at
>org.apache.jasper.runtime.JspServlet$JspServletWrapper.loadIfNecessary(JspSe
>rvlet.java,
>Compiled Code)
>          at
>org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.ja
>va,
>Compiled Code)
>          at
>org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java,
>Compiled Code)
>          at org.apache.jasper.runtime.JspServlet.service(JspServlet.java,
>Compiled Code)
>          at javax.servlet.http.HttpServlet.service(HttpServlet.java,
>Compiled Code)
>          at
>org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java,
>Compiled Code)
>          at
>org.apache.tomcat.core.ContextManager.service(ContextManager.java, Compiled
>Code)
>          at
>org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
>onnectionHandler.java,
>Compiled Code)
>          at
>org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java,
>Compiled Code)
>          at java.lang.Thread.run(Thread.java, Compiled Code)
>
>Originally, logout.jsp was including the same file twice. However, I have
>commented out both includes with the "<!--" and "-->" pairs, and so the
>file should be including nothing. I also shutdown apache and tomcat, wiped
>the working directory, and restarted tomcat/apache to ensure that the jsp's
>are getting recompiled. I still get this error.
>
>Does anyone know what the problem is, and what I can do to fix it???
>Thanks!
>
>------
>Andrew Kidder
>L3 SW/Support Engineer, IBU
>Tivoli Systems
>
>512-436-4544
>akidder@tivoli.com
>http://www.tivoli.com


------
Andrew Kidder
L3 SW/Support Engineer, IBU
Tivoli Systems

512-436-4544
akidder@tivoli.com
http://www.tivoli.com



Mime
View raw message