Thanks Matt.
Placing the '/' in front of the whole servlet path specification did the
trick.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Matt Krevs
Sent: Tuesday, May 23, 2000 6:39 PM
To: Orion-Interest
Subject: RE: Form post to a servlet with orion
In my forms I call servlets as follows
<%String contextPath = request.getContextPath();%>
<form id=aForm
action="<%=contextPath%>/servlet/com.mycompany.servlet.MyServlet"
method=post>
This maps to
"/mywebapp/servlet/com.mycompany.servlet.MyServlet"
I dont think that setting up servlet mapping in orion-web.xml is the
solution since I havent done it in my app.
Also, I dont think this is a classpath issue.
Have you tried the path
/barbarossa/servlet/USMController
The leading '/' may solve your problem. You should be able to use this path
regardless of what subdirectory your JSP is in.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Ferghil
O'Rourke
Sent: Monday, 24 April 2000 3:49
To: Orion-Interest
Subject: Form post to a servlet with orion
Hi,
I'm having a particularly strange problem when posting a form to a
servlet using orion.
The problem is that when I form post from my home page - before
the servlet's doPost method is invoked - I have to use a
*different path* than usual in the form action.
>From my home page (index.jsp), the form post to a servlet called
USMController.class looks like this:
<form method="POST" action="../barbarossa/servlet/USMController">
But from all other jsps underneath index.jsp it is as follows:
<form method="POST" action="../servlet/USMController">
My application name is barbarossa and I have a directory
structure \barbarossa\barbarossa-web\web-inf etc. containing
orion-web.xml.
Right now I haven't set up a servlet mapping in orion-web.xml -
and I'm not sure if that's the problem here. I think it's more
to do with where I install my servlet class files. And where
I tell orion to go looking for them.
What's the key here to tell orion where to get the servlet from?
Why do I have to prefix it with the application directory only
on the homepage?
Any direction/hints/general sympathy appreciated.
Thanks,
Ferghil