tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <ste...@world-of-shadows.de>
Subject Re: jsp:include page and Dynamic Resource does not work
Date Thu, 19 Aug 2004 18:52:17 GMT
Hello again,

I found one error myself :-)

<jsp:include page="/viewResource">
  <jsp:param name="filename" value="incl.txt"/>
</jsp:include>

The request will processed within the correct context, so I don't need an
explicit call for the context.

At some point of my trials and errors :-) worked my servlet mapping. Why? I
don't know...
But then I became a IllegalStateException when the servlet was processed. I
figured out, that the jsp:include don't accept an ServletOutputStream...???
as response from the servlet.
Why should this make any difference? Why can I not use the response from a
servlet, whatever kind it is? When JspRuntimeLibrary.include(...) only
except a JspWriter, why isn't it mentioned in the documentation of
jsp:include tag?

Stefan

----- Original Message ----- 
From: <stefan@world-of-shadows.de>
To: <tomcat-user@jakarta.apache.org>
Sent: Wednesday, August 18, 2004 8:07 PM
Subject: jsp:include page and Dynamic Resource does not work


Hello,

I want to include the response of a Dynamic Resource (implemented as a
Servlet) in my JSP, but even the servlet isn't called.

jsp-snipplet:
<jsp:include page="<%= request.getContextPath() + "/viewResource" %>"
flush="true">
  <jsp:param name="filename" value="incl.txt"/>
</jsp:include>

snipplet from web.xml:
...
  <servlet-name>ViewResource</servlet-name>
  <url-pattern>/viewResource</url-pattern>
...

If I call the servlet direct/manually with the url
context/viewResource?filename=incl.txt it works fine, but the jsp doesn't
call it. Why?

My enviroment:
- Tomcat 4.1.30
- Win 2000
- JDK 1.3.1_05

Any suggestions would be appreciated...

thanx Stefan


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message