Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp:include problem

 
Rudolf Schmidt
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try:
<jsp:include page="servlet/Admin" />maybe it will help.
 
Rudolf Schmidt
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it seems that the include "finds" the servlet, but then an error occures saying, the response was not http
 
Roy Ben Ami
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops a typo.
here is the correct form:
response.setContentType("text/html");
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic