tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Guthrie <guth...@mum.edu>
Subject improper JSP, or Tomcat bug?
Date Mon, 04 Feb 2002 20:56:00 GMT
I am trying to use a simple JSP page that tests for an existing Bean, and 
uses the pre-existence of it as a logic branch by putting some code in the 
initialization part of the jsp:usebean, and then a <%return;%> statement.

But,
I find that both Tomcat and Websphere put some code after my last code in 
the init branch, and thus it becomes invalid Java.

   <!-- Access bean, else create -->
   <jsp:useBean id="msg" class="String" scope="session">
      New.
      <% return; %>
   </jsp:useBean>
      Old.

Is this valid JSP? If not, where is the spec. section that would pertain to 
this?

It seems logical...! :-)

Error: 500
Location: /test/aTest_1.jsp
Internal Servlet Error:
org.apache.jasper.JasperException: Unable to compile class for 
JSPE:\Net\Apache\Tomcat\work\localhost_8080%2Ftest\_0002faTest_0005f_00031_0002ejspaTest_0005f1_jsp_0.java:85:

Statement not reached.
                 out.write("\r\n\r\n");

Thanks.

-----------------------------------------------
Gregory Guthrie

MUM Faculty Mail - FM 1068
Farfield, IA 52557

http://www.mum.edu/~guthrie
(641)472-7773
------------------------------------------------
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message