On Wed, 14 Mar 2001, Ivan E. Markovic wrote:
> I have a question concerning the req.getPathInfo() functionality.
>
> I have a servlet that I wish to call passing in a 'path' as an
> argument which I will later use as an argument. See below (where
> LogonServlet is the Servlet and VLM is the argument)
>
> www.vlm.com/servlets/VS/servlet/LogonServlet/VLM
>
> This is much cleaner than:
>
> www.vlm.com/servlets/VS/servlet/LogonServlet?CID=VLM
>
> BUT the first URL does not work unless arguments are specified at the
> end of the URL, for example:
>
> www.vlm.com/servlets/VS/servlet/LogonServlet/VLM?A=B
>
> Without '?A=B' No call seems to be made to LogonServlet! Is there
> anyway that I configure the system to accept the first URL, passing
> in the 'VLM' as the path?
Can you tell what *is* being called? (If you can't tell directly, you
might be able to get more info from the logs, either the tomcat logs
or the apache logs).
And how do you have things set up to get to tomcat, i.e. what is your
context path? It looks like you have two directories in the context
path in the URL (/servlets/VS), and I haven't really seen that before
(not to say you can't do it, of course :-).
I'm guessing that it might be that apache knows to forward
/servlets/VS/servlet/LogonServlet to tomcat, but not
/servlets/VS/servlet/LogonServlet/VLM. If that's the case, you might
have to add some directives to your apache/tomcat httpd.conf file to
get it to work right (e.g. ApJServMount's).
> If this is possible I have a follow-on question. I would also like to
> create an alias to reduce the length of the URL. How would one go
> about reducing:
>
> www.vlm.com/servlets/VS/servlet/LogonServlet/VLM
>
> To say:
>
> www.vlm.com/LogonServlet/VLM
Again, you might be able to do this with some appropriate ApJServMount
directives. It also might depend on how you have things set up with
tomcat, e.g. what the contexts are and what the paths to them are.
Hope this gives you some ideas.
Milt Epstein
Research Programmer
Software/Systems Development Group
Computing and Communications Services Office (CCSO)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]