0

Hi all, I am trying to access login page (html page) from subdirectory of my web directory , the login page calls loginServlet which is reponsible for authintication, then the loginServlet response back to the client a web page to the user(whether user or adminstrator) .
my web directory called project.
my subdirectory for pages called pages.
my problem is I can access to login by this http://localhost:8080/project/pages/login.html
and once I get login page and submit the page I get this error
(The requested resource (/project/pages/login) is not available.)
why is that? please help me.
I wrote like this in web.xml :
<servlet>
<description>
this to the login page
</description>
<display-name>this is for login servlet</display-name>
<servlet-name>loginServlet</servlet-name>
<servlet-class>
projectPackage.login
</servlet-class>
</servlet>
and I wrote this to call loginServlet in login page:
<form action="/pages/login" method="post" name="loginForm" onsubmit="return ValidateContactForm();">
what is wrong I did please help me guys
thank you very much.

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by peter_budo
0

Quick sample of mapping

<servlet>
       <servlet-name>LoginServlet</servlet-name>
       <servlet-class>LoginServlet</servlet-class>
</servlet>

<servlet-mapping>
       <servlet-name>LoginServlet</servlet-name>
       <url-pattern>/controller/login</url-pattern>
</servlet-mapping>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.