aspose file tools*
The moose likes JSP and the fly likes jsp:include problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp:include problem" Watch "jsp:include problem" New topic
Author

jsp:include problem

Rudolf Schmidt
Greenhorn

Joined: Sep 05, 2001
Posts: 10
I want to use the jsp:include action to call a servlet within a jsp (the servlet dispatches to another jsp)
<jsp:include page="login.jsp" /> works fine as this jsp is in the same directory as the original jsp.
<jsp:include page="/webapp/Admin" /> does not work. ("Admin" is a servlet ), i always get a "File not found" Exception
Thanks for help
Rudolf
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
try:
<jsp:include page="servlet/Admin" />maybe it will help.
Rudolf Schmidt
Greenhorn

Joined: Sep 05, 2001
Posts: 10
it seems that the include "finds" the servlet, but then an error occures saying, the response was not http
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
in the servlet did u set the contenttype to text/html???
if not type this in the servlet before u output anything.
response.setContectType("text/html");
Roy Ben Ami
Ranch Hand

Joined: Jan 13, 2002
Posts: 732
oops a typo.
here is the correct form:
response.setContentType("text/html");
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp:include problem
 
Similar Threads
Servlet not found using <jsp:include
thread safety probllem of using jsp:inclue file=."fileOne".
Servlet output into JSP template
Conditional includes
How to include servlet response in a JSP?