Hi,
I am using the Java Web Server V2.0 (Servlet API 2.1) with jdk1.2.2
under windows NT 4.0.

What I want to do is as follows, I have written 2 servlets the first
Servlet1 inserts a <SERVLET> tag in to any HTML page that passes through
it and the second Servlet2 is the servlet named in the <SERVLET> tag.  I
want to set up a servlet chain "file,Servlet1 " that adds <SERVLET> tags
to certain HTML files passed through it.  I then want the dynamically
HTML containing the <SERVLET> tag run through ssinclude to execute the
tag.  The reason for wanting to do this is so that Servlet1 can
calculate certain values and pass them as parameters to Servlet2.

Reading "Java Servlet Programming" by Hunter & Crawford, I decided that
JWS would be able to do this quite easily if I setup the chain
"file,Servlet1" using the administration GUI and inserted a
"text/html=ssinclude" line in mimeservlets.properties file.

The results were as follows, if I manually place a <SERVLET> tag
referencing Sevlet2 in to an HTML file it performs the expected task.
If I setup the servlet chain "file,Servlet1", then the <SERVLET> tag is
correctly inserted in to the generated HTML, I can see this by viewing
the source from the browser.  However, the <SERVLET> tag is not executed
and Servlet2 never gets to perform it's task.  I had added the above
line to the properties file and restarted the server before performing
the tests.

Any suggestions as to what I am doing wrong?  One immediate thing I can
think of is that I am using  later versions of JWS and Servlet API to
the book.  Maybe this used to work but now doesn't.

I thought I could get round it by developing my own ssinclude (the
standard one MUST be first in the chain) that I could put at the end of
my chain "file,ServletA,mySSInclude", but that idea was stopped because
the getServlet() method described in the book has been deprecated in API
2.1.

As an extra question, could something like this be done in Tomcat or the
iPlanet Web Server?  As JWS will not be developed (or supported?) any
longer, I might need to do something like this in another web server.

Sorry for the long post, but I am getting desperate!

Regards,
David
--
David M. Smith

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to