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.

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>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.