Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4122296
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:27:47+00:00 2026-05-20T23:27:47+00:00

I have index.jsp from which I get the parameters to servlet LoginServlet.java The servlet

  • 0

I have index.jsp from which I get the parameters to servlet LoginServlet.java
The servlet is under package dao.

<form name="LoginForm" method="post" action="dao/LoginServlet">

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>Chat</display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <servlet>
    <description></description>
    <display-name>LoginServlet</display-name>
    <servlet-name>LoginServlet</servlet-name>
    <servlet-class>dao.LoginServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>LoginServlet</servlet-name>
    <url-pattern>Login</url-pattern>
  </servlet-mapping>
</web-app>

When I run the JSP page I can see it but I get an error telling

The requested resource (dao/LoginServlet) is not available

Can anyone point out wat is the problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T23:27:48+00:00Added an answer on May 20, 2026 at 11:27 pm

    The form action should point to the servlet URL as specified in <url-pattern> entry of its <servlet-mapping> in web.xml. You have declared the servlet to listen on Login, but this is actually invalid. It should start with a slash.

    <url-pattern>/Login</url-pattern>
    

    This way it listens on http://localhost:8080/yourcontextname/Login.

    Then you can just let the form action point to that URL (assuming that the JSP file isn’t placed in a subfolder of your webapp context).

    <form action="Login" method="post">
    

    See also:

    • Our servlet wiki page – contains a little Hello World
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: index.jsp: <form name=f action=db/ajoutConducteur.jsp method=post> <input type=text pattern=\d{8} required
I need to pass a variable from Admin.java file to index.jsp. I get the
i am using php 5.2.8 i have index.html, which loads LOAD.PHP from IFRAME. iframe
I'm wondering if it is possible to pass form data from index.jsp file to
I have a table in a jsp in which i am displaying data from
I am calling a Servlet from index.jsp using Ajax. If the result is false,
I have a page which I'm converting from Velocity to JSP. I have some
So I have a main JSP index page, index.jsp, which has several includes. Something
I have a JSF/RichFaces setup with an index.jsp which a4j:include s another piece of
I have an index.jsp page which uploads an image. On submit it goes to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.