tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Einfeldt" <ralph.einfe...@uptime-isc.de>
Subject AW: improper JSP, or Tomcat bug?
Date Tue, 05 Feb 2002 06:42:57 GMT
Try this:

<jsp:useBean id="msg" class="String" scope="session">
  New.
<% 
  return; 
%></jsp:useBean>

Tomcat tries to put out the linfeed between
the scriptlet and the useBean Tag.

> -----Urspr√ľngliche Nachricht-----
> Von: Gregory Guthrie [mailto:guthrie@mum.edu]
> Gesendet: Montag, 4. Februar 2002 21:56
> An: tomcat-user@jakarta.apache.org
> Betreff: improper JSP, or Tomcat bug?
> 
> 
> 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
> ------------------------------------------------
> 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message