i am creating a simple web application using a tomcat project.My problem is that
"The welcome file specified in the web.XML" is nor reading

Content fo my we.xml is

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
	<servlet>
		<servlet-name>admissions</servlet-name>
		<servlet-class>admission.AdmissionServlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>admissions</servlet-name>
		<url-pattern>/admission</url-pattern>
	</servlet-mapping>
	
	<welcome-file-list>
	
		<welcome-file> admissionInterface.jsp </welcome-file>
		
	</welcome-file-list>
	
</web-app>

i have placed the admissionInterface.jsp and web.xml in WEB-INF folder

The URL result are as follows

http://localhost:9090/Campus-This URL will List the directory structure
http://localhost:9090/Campus/admission-provide access to my admissionservlet and executing it code
Campus* is the context name specified in the Server.xml

The only problem i am facing is , welcome file is not reading


Anybody please help

The typical project structure of web application under Tomcat should be as follows
Tomcat installation directory

  • bin
  • conf
  • lib
  • logs
  • webapps
    • docs
    • examples
    • project 1
      • html, jsp, css,images
      • image folder [optional for more organization]
      • WEB-INF
        • web.xml
        • classes [folder]
          • Class1.class
          • Class2.class
        • lib [libraries only relevant to your web application and you do not wish to share it through global "lib" folder in Tomcat installation directory]
        • jsf [optional folder or any other web frameworks]
    • project 2
    • ROOT
  • work

So basically you have almost right you just need to put files in correct folders.

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.