Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Including a servlet in a JSP

Status
Not open for further replies.

hazelsisson

Programmer
Mar 18, 2002
68
GB
Hi clever people!
I have a problem with a session servlet that I am trying to include in a number of JSPs.
This is the syntax I have used:
<jsp:include page=&quot;servlet/portalSession&quot; flush=&quot;true&quot; />
There are no errors when I display the JSP, but it seems to ignore the servlet I have tried to include and doesn't execute any of the code in it!
I have tried using this syntax: <%@ include file=&quot;servlet/portalSession&quot; %> but this always displays an error saying it can't find &quot;servlet/portalSession&quot;.
Any ideas why?
Thanks very much,
Hazel
 
You are using relative addressing. Is this correct for the jsp? It may be what you really want is to start at the default context by using:

Code:
<jsp:include page=&quot;/servlet/portalSession&quot; flush=&quot;true&quot; />

Without knowing your application it is hard to determine the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top