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 7055197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:43:10+00:00 2026-05-28T03:43:10+00:00

I am a newbie trying to create a sample web application using; MySQL Java

  • 0

I am a newbie trying to create a sample web application using;

MySQL
Java
Tomcat
JSP & Servlet

The ide I use is MyEclipse Blue Edition.

The persistence and service layer is done. Within web layer however I’m having trouble displaying the index.jsp, here is what I done so far, and what my expectations are:

  • I have associated the project with tomcat 6, each time I run the
    project service is stopped and restarted the final line in log is
    INFO: Server startup in x ms
  • I have created the web layer by selecting new web project from which
    an example index.jsp was already genereated in web root folder, I
    also checked that in web.xml ( I suppose this is going to be used by
    tomcat ) there is a tag called welcome-list indicating the first
    jsp that should be opened when the application starts. index.jsp is on that list.
  • I have used a tutorial on how to use Servlets and extended
    HTTPServlet within a class at web layer, presently it does very
    little things, namely within index.jsp there is a button, upon
    clicking that button this class should forward request and responses
    and open up another jsp file, this I couldn’t test yet.

Which brings us to my newbie question: Everytime I run the project server starts and then nothing happens. I’m expecting for MyEclipse to start displaying index.jsp on its own browser from which I can copy/paste the url to a regular browser. I’m expecting the url to be something like localhost:8080/index.jsp (tomcat runs on port 8080, in my computer).

Server seems to be running and I have tried different combinations but I can’t seem ot display the index.jsp, whatever I try it is not found, what should I do ?

Edit1: Here is my web.xml code:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
 <welcome-file-list>
  <welcome-file>/index.jsp</welcome-file>
 </welcome-file-list>
</web-app>

Here is my servlet code: (I didn’t get to test it so far, my main problem is not here)

public class CRMServlet extends HttpServlet {

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

public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {

String action =  request.getParameter("action");
System.out.println("ACTION : " + action);

if(action.equals("LoginRequest"))
{
    request.setAttribute("bilgi", "cem");
    request.getRequestDispatcher("Login.jsp").forward(request, response);
}

}

}
  • 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-28T03:43:10+00:00Added an answer on May 28, 2026 at 3:43 am
    1. Go to the Window tab and select web browser. there you can define your favorite browser.
    2. For URL it should be like http://localhost:8080/{ProjectName}/index.jsp
      — you can find the ProjectName with your IDE, with what name did u create the project
    3. for servlet URL’s check the web.xml, and to the same URL you have to pass in the form action tag.
      so that button click will go to servlet doGet() method and use RequestDispatcher to forward to another jsp.

    web.xml

      <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
      </welcome-file-list>
    

    remove / from your web.xml, and i think you are not created the servlet by right click on your source folder, if you create the servlet by right click on the source folder, the entry of the servlet would be there in web.xml with <servlet></servlet> tag

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

Sidebar

Related Questions

I am a newbie trying to create a simple (in theory) CRUD application using
I'm a Python & App Engine (and server-side!) newbie, and I'm trying to create
I'm using Java Logging API in a simple Servlet application that uses Maven and
I am a LINQ newbie trying to use it to acheive the following: I
Newbie question since I'm not up to speed using maven at all. I'm trying
I'm a Java newbie. I'm trying to figure out whether a number is a
I am trying to use ctags with VIM, and I am a newbie to
I'm a complete newbie in OCaml and trying to create a simple console program.
I am a xml newbie trying to create a XDocument type from a xml
to all im newbie developer and trying to create my first iPhone app, sorry

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.