This is really a rather embarrasing question to ask.
I have a webapp that has two directories of JSPs
(think of it as a regular user set of JSPs and an
administrator set)
\forums <--- This is the context root
\forums\admin <--- This is a second set of JSPs available
only to administrators
I have a servlet that I have mapped to the url-pattern
/postpaper. As shown below.
<servlet>
<servlet-name>WhitepaperUpload</servlet-name>
<servlet-class>sample.WhitepaperUploadServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>WhitepaperUpload</servlet-name>
<url-pattern>/postpaper</url-pattern>
</servlet-mapping>
If I hit the servlet from any JSP in the directory on the context
root it works fine. If I try to hit the servlet from a JSP in the
admin subdirectory of the context, it does not find the servlet.
Typing the URL http://localhost:8080/forums/postpaper causes the
servlet to run (I see a message printed by the init and get callbacks)
So, if I am in a JSP that is in a subdirectory off of the context root
(in this case \forums\admin\somejsp.jsp) and I want to write a FORM
ACTION to hit this servlet's POST. Should I write
<form action="/postpaper" method="post"> ... </form>
I've tried the following
action="postpaper"
action="/postpaper"
action="./postpaper"
action="/forums/postpaper"
action="/forums/admin/postpaper"
and several other variations, to no avail. Any ideas?
Thanks
Dave Bolt
There is always plenty of bandwidth, just none for you.