Re: SSI and servlet parameters

I have not heard from anyone else who is having this problem. I have not
heard
from anyone who is NOT having this problem either.

Are multiple servlet parameters from a #servlet working for other people?
Is #include virtual for a servlet showing up at the proper place in the
output for others?
Is there an easy way for a servlet to tell if it is being #included?

Jeff Van Epps wrote:
> 
> Okay, I see numerous examples in the mailing list archives of passing
> parameters
> to servlets. They just don't work.
> 
> <!--#servlet name="fred" code="/music/query">
> <!--#servlet name="fred" param="bandid" value="217">
> <!--#servlet name="fred" param="mode" value="gen">
> 
> The only one which shows up in the servlet in req.getParameterNames() is the
> last one in the .shtml file. If I put all the parameters on the same
> #servlet
> tag, the same thing is true, only the last one shows up in the parameter
> enumeration.
> 
> <!--#servlet name="fred" code="/music/query" param="bandid" value="217"
> param="mode" value="gen">
> 
> In fact, if I have a later line in the .shtml file, which is not even a
> proper tag, the parameter from that line is the one in the enumeration!
> 
> <! -#mervlet name="fred" param="foo" value="bar">
> 
> (not a typo, no dash, and written 'm'ervlet)
> 
> For what I'm trying to accomplish, #include almost works
> 
> <!--#include virtual="/music/query?mode=gen&bandid=217">
> 
> EXCEPT that the output from this inclusion shows up BEFORE the contents of
> the .shtml file which enclose it. I tried flushing the output stream in the
> servlet before writing the query output, but that didn't change anything.
> It would also be convenient if there were an easy way to tell from within
> the
> servlet that it is #included so it knows not to write HTML headers and
> trailers (I hacked it).
> 
> I tried the devel classes 19990607 but that didn't help. I had an additional
> problem with these classes which may have prevented the other stuff from
> working - I kept getting server responses like
> 
> HTTP/1.1 302 Found
> Connection: Close
> 
> instead of executing my servlet. So I'm back on 2.0.1.
> 
> Are multiple servlet parameters from a #servlet working for other people?
> Is #include virtual for a servlet showing up at the proper place in the
> output
> for others?
> Is there an easy way for a servlet to tell if it is being #included?

-- 
Jeff Van Epps  lordbah@lordbah.com
Live Music In Rochester http://www.lordbah.com:8001/pub/musicmain.html

Received on Friday, 25 June 1999 17:05:22 UTC