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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:47:55+00:00 2026-05-18T02:47:55+00:00

i have just started using servlet. basically i am new to web projects. I

  • 0

i have just started using servlet. basically i am new to web projects. I am using eclipse as development IDE. In that i have created a dynamic web project, in the same i added one html page viz Main.html with the following sript:_

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Main page</title>
</head>
<body>
<b>this is the first page</b>
</body>
</html>

and following is my web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>ServletProject</display-name>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
</web-app>

i am using tomcat 6.0 as web container, in eclipse only i have integrated tomcat and have added the web project in it. The server is getting started properly. When i am trying to access the Main.html page, i am not getting anything on the browser, in the tomcat server configuration, there are two ports, one is admin port and other is HTML/1.1 port and value is 8005 and 8080 respectively. When i am using http://localhost:8005/Main.html i am getting nothing one the web browser, but when i use http://localhost:8080/Main.html i get some tomcat error.

is there something i am missing. I am unable to figure it out. Please help me.

  • 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-18T02:47:56+00:00Added an answer on May 18, 2026 at 2:47 am

    Edit: Ah yeah, you need to use the ServletProject as url-pattern..
    Try to access the file with the following URL: http://localhost:8080/ServletProject/Main.html

    You need to configure your application properly in the web.xml file and if you want to use later a Java class and use it as a Servlet you have to define this in the web.xml like that:

    <servlet> 
       <servlet-name>CurrencyConverter</servlet-name> 
       <servlet-class>servlets.Converter</servlet-class>
    </servlet> 
    <servlet-mapping>
       <servlet-name>CurrencyConverter</servlet-name>
       <url-pattern>/convert</url-pattern>
    </servlet-mapping>
    

    The url pattern defines the path you can access it later. To access the CurrencyConverter in the above code you need to use this url: http://localhost:8080/convert

    Yeah and it would be good when you could show us the error you get..

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

Sidebar

Related Questions

I just started using SVN, and I have a cache directory that I don't
I've just started using Java's enums in my own projects (I have to use
I recently started using Eclipse at work for my Java servlet projects. I've been
I have just started a project that involves me sending data using POST in
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have just started using silverlight 2 beta and cannot find how to or
I have just started using Boost 1.36. These libraries would be very useful in
I’ve only just started using ASP.NET MVC, and I have a somewhat trivial question:
Just getting started using MVC in ASP.NET, I'm going to have it so users

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.