tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10270] New: - jsp:include breaks with non-String rtexpr
Date Thu, 27 Jun 2002 03:54:30 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10270>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10270

jsp:include breaks with non-String rtexpr

           Summary: jsp:include breaks with non-String rtexpr
           Product: Tomcat 4
           Version: 4.1.3
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper 2
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: jeff@socialchange.net.au


Hi,

Should the following JSP work? It does with Jasper1:

<% Object logo = new String("logo.jsp"); %>
<jsp:include page="<%=logo%>" flush="true"/>

With Jasper 2 I get this error:

/home/jeff/jakarta-tomcat-4.1.3-LE-jdk14/work/Standalone/localhost/wmc/jeff$jsp.java:48:
include(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,java.lang.String,javax.servlet.jsp.JspWriter,boolean)
in org.apache.jasper.runtime.JspRuntimeLibrary cannot be applied to
(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,java.lang.Object,javax.servlet.jsp.JspWriter,boolean)
      JspRuntimeLibrary.include(request, response, logo, out, true);
                       ^

Ie, the 'include' method is expecting a String, but instead gets an Object. A
shorter form of the above JSP is:

<jsp:include page="<%= (Object)\"logo.jsp\"%>" flush="true"/>


Seems that calling toString() would be the easiest fix.


thanks,

--Jeff

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message