I noticed some posts about people having problems loosing the session
information when using JSPs with servlets.  For examples if I did the 
following in a JSP:

  <FORM ACTION="/servlet/com.mycom.MyServlet" ... >

when MyServlet got control, the Session was empty.

I found out that if I did this the "right way" and defined the servlet in
my web.xml, e.g.,

      <servlet>
         <servlet-name>theServlet</servlet-name>
         <servlet-class>com.mycom.MyServlet</servlet-class>
       </servlet>
       <servlet-mapping>
          <servlet-name>theServlet</servlet-name>
          <url-pattern>someServlet</url-pattern>
       </servlet-mapping>

and in the JSP said:

  <FORM ACTION="someServlet" ... >

then all worked fine.

You may have to adjust the path a bit depending upon where your
JSP is, etc.  The Tomcat mapping trace can help you debug
mapping problems.

Apparently there is some encoding function which can be applied
to make the FORM reference work, but I don't know what it is
(anyone know?).

Frank Lawlor
Athens Group, Inc.
(512) 345-0600 x151
Athens Group, an employee-owned consulting firm integrating technology
strategy and software solutions.



Reply via email to