0

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

Edited by peter_budo: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by peter_budo
0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.