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

  • Home
  • SEARCH
  • 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 5961895
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:01:48+00:00 2026-05-22T19:01:48+00:00

I have tomcat 7.0.14, jdk1.6 and Eclipse Indigo for Java EE web app developers.

  • 0

I have tomcat 7.0.14, jdk1.6 and Eclipse Indigo for Java EE web app developers.
I am new to JSP, so tried Eclipse as I thought it made coding easier. I closely followed this video tutorial.

I created 2 files under my project prison- login.java, home.html and modified web.xml too.
When I click the submit button in the login(this is 1st page) page, it shows only this error:

   File not found
          Firefox can't find the file at /D:/eclipse/Workspace/Prisonhome/WebContent/WEB-INF/Log?user=sa&pass=sa&action=That's+me. 

I dont know if it isn’t sufficient to save project in workspace.

There were several discrepancies between file locations given in video and my Eclipse files. Eg.: web.xml in my Eclipse was located in servers->apache-tomcat directory, instead of web content->WEB_INF->lib->web.xml. is it important?

my code:
index.html

<html>
<head>
    <title> Welcome :) </title>
</head>
<body>
<form action="Log" method="get">
            <B>
            <br><br><br><br><br><br><br><br><br><br><br><br>
            &nbsp;&nbsp;&nbsp;&nbsp;Username: <input type=text name="user"><br><br>
            &nbsp;&nbsp;&nbsp;&nbsp;Password: <input type=text name="pass"><br><br>
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=submit name=action value="That's me" style="background-color:666666; color:ffffff; border-color:ee0088">
            </B></font>
        </form>
    </body>
</html>

Login.java:

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    String uname=request.getParameter("user");
    String passwd=request.getParameter("pass");
    response.getWriter().println("<html><head>This is the response!</head>");
    response.getWriter().println("<body>Response!!</body></html>");
}

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    doGet(request, response);
}

web.xml:

<servlet>
    <servlet-name>Log</servlet-name>
    <servlet-class>org.prisonhome.packs.Login</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>Log</servlet-name>
    <url-pattern>/Log/*</url-pattern>
</servlet-mapping>
  • 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-22T19:01:49+00:00Added an answer on May 22, 2026 at 7:01 pm

    Firefox can’t find the file at /D:/eclipse/Workspace/Prisonhome/WebContent/WEB-INF/Log?user=sa&pass=sa&action=That’s+me.

    You need to open the page by a real web URL, not by a local disk file system path. If Tomcat is running at localhost on port 8080 and the webapp context name is Prisonhome then you need to invoke it by

    http://localhost:8080/Prisonhome/index.html

    As to the tutorials, I’d recommend to read the Coreservlets.com tutorials. You can find a list of links at bottom of our Servlets wiki page.


    Unrelated to the concrete problem, using GET to login is not really safe as everyone can see the password in the URL. The HTML <font> tag is deprecated since 1998, use CSS instead. Using a plethora of <br> and &nbsp; tags is also unnecessary, use CSS positions/margins/paddings instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a new web app that is packaged as a WAR as part
I'm fairly new to Tomcat and Java web development and am banging my head
I'm running tomcat and have some jsp pages that display a subset of a
I have two web applications running in the same Tomcat Instance. In one of
Lately I have been trying my hands on Eclipse IDE for java development. I
I have installed java and tomcat appache server on linux. When i am going
I want to copy war file to tomcat web-app directory using NSIS setup. I
I'm fairly new to java/eclipse development and I'm having a bit of a problem
I have a tomcat web application. It uses a couple of remote modules. One
I have a Tomcat application server and this Java source code: public class MyServlet

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.