You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by jim <ji...@jameswhitman.org> on 2001/04/05 00:24:22 UTC

The include directive within a .jsp page referring to a servlet

Hi

I have a request for information. Can list members tell me if it is 
possible to include a servlet into a jsp page using the Tomcat engine. I am 
having problems with a "bad file argument to include" error message. I have 
tried various ways of writing the url within the file="..." part of the 
directive, but without success.

The servlet is called Dbase and lives in the classes directory of the 
context "jbuilder" (and works with the /host/jbuilder/Dbase url straight 
from the browser). My .jsp file (called jsp.jsp) lives in the examples 
context under /examples/jsp/jsp.jsp and works fine with simple text or html 
etc. files within that directory but not when the include is 
file="/jbuilder/Dbase". I know that this is not a relative url, but it's 
not clear how you would use a relative url when the servlet is mapped 
through the web.xml file for its normal operation.

I'm at a loss to know whether or how to make this work. Am I barking up the 
wrong tree.

Thanks, Jim