tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Traversing up a directory using RequestDispatcher
Date Fri, 17 Sep 2004 15:52:48 GMT

Hi,

>login.jsp in <CATALINA_HOME>/webapps/ChargeCard (let's call it
><APP_HOME>).  I have moved my servlets from
><CATALINA_HOME>/webapps/ROOT/WEB-INF/classes to
><APP_HOME>/WEB-INF/classes.  So my question is twofold:
>
>1) from my jsp, how do I invoke the servlet in it's new location?
>Prior I was using:
><form method="POST" name=mainform
>action="servlet/com.gcc.creditcard/CCLogin"> but that no longer works,
>and it doesn't work without the servlet prefix either.

To <APP_HOME>/WEB-INF/web.xml add

<servlet>
  <servlet-name>CCLoginServlet</servlet-name>
  <servlet-class>com.gcc.creditcard.CCLogin</servlet-class>
</servlet>
<servlet-mapping>
  <servlet-name>CCLoginServlet</servlet-name>
  <url-pattern>/CCLogin</url-pattern>
</servlet-mapping>

Modify the <form> tag to 
<form method="post" name="mainform" action="./CCLogin">

Yoav



This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message