It is amazing! Thanks, i will look into it to find out what is the problem.
On 4/5/07, Rashmi Rubdi <[EMAIL PROTECTED]> wrote:
If you compile the Servlet class and Re-start Tomcat after defining
the mapping in web.xml it should work.
I tried the following and it works:
---------------------------------------------------------------------
web.xml
---------------------------------------------------------------------
<servlet>
<servlet-name>login</servlet-name>
<servlet-class>test66.LoginServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>login</servlet-name>
<url-pattern>/servlet/login</url-pattern>
</servlet-mapping>
----------------------------------------------------------------------
LoginServlet ---- compiled
----------------------------------------------------------------------
package test66;
import javax.servlet.*;
public class LoginServlet extends HttpServlet {
public void doPost(HttpServletRequest request, HttpServletResponse
response){
doGet(request,response);
}
public void doGet(HttpServletRequest request, HttpServletResponse
response){
System.out.println(" Inside Login Servlet");
}
}
------------------------------------------------------------------------------------
JSP
------------------------------------------------------------------------------------
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head><title></title></head>
<body>
<FORM action="<%=request.getContextPath()%>/servlet/login" method="POST" >
<input type="text" name="text" value="hellooooo "/>
<input type="submit" name="submit" value="submit" />
</FORM>
</body>
</html>
-Rashmi
On 4/5/07, jacky <[EMAIL PROTECTED]> wrote:
> It is <webapp>/servlet/login indeed. In fact, my jsp structure is as
> following:
> in index.jsp:
> <jsp:include page="/jsp/top.jsp"/>
>
> in top.jsp:
> <FORM action="<%=request.getContextPath()%>/servlet/login" method="POST"
> onsubmit="return loginCheck(this);">
> ..
> </FORM>
> //here, the form will be submit
>
>
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Best Regards.
jacky