| Author |
welcome file list
|
sojan chandy
Greenhorn
Joined: Mar 18, 2007
Posts: 24
|
|
hi i have given welcome-file-list as <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> i only get a blank page when i give http://localhost:8080/test/ ------------------------------------------------------------------------------------------ my html page code.... <html> <head> <title>Welcome<title> </head> <body>Hi SOJAN</body> </html> page name index.html ____________________________________________________ This is my full web.xml file ____________________________________________________ <?xml version="1.0" encoding="ISO-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd"> <web-app> <servlet> <servlet-name>HelloServlet</servlet-name> <servlet-class>hello.HelloServlet</servlet-class> </servlet> <servlet> <servlet-name>s</servlet-name> <servlet-class>sojan.s</servlet-class> </servlet> <servlet> <servlet-name>ServletUtilities</servlet-name> <servlet-class>hall.ServletUtilities</servlet-class> </servlet> <servlet-mapping> <servlet-name>ServletUtilities</servlet-name> <url-pattern>/hall</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>HelloServlet</servlet-name> <url-pattern>/hello</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> </web-app> ______________________________________________________ and i have saved my index file in root folder i.e. ...test folder under webapps thanks in advance
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
It looks fine at first glance (except the strange class naming) Which container are you using ?
|
[My Blog]
All roads lead to JavaRanch
|
 |
sojan chandy
Greenhorn
Joined: Mar 18, 2007
Posts: 24
|
|
|
tomcat 5.5
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
Did you restart the container ? And what does the following url display ? http://localhost:8080/test/index.html
|
 |
sojan chandy
Greenhorn
Joined: Mar 18, 2007
Posts: 24
|
|
|
it also displays nothing
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
What is the full path of your index.html ? Where did you put the "test" application in Tomcat ?
|
 |
sojan chandy
Greenhorn
Joined: Mar 18, 2007
Posts: 24
|
|
|
C:\Tools\apache-tomcat-5.5\webapps\test
|
 |
sojan chandy
Greenhorn
Joined: Mar 18, 2007
Posts: 24
|
|
actually, i can run the servlet with tomcat but, if i tried to run http://localhost:8080 it displays The page cannot be found The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
|
Are you sure Tomcat is running ?
|
 |
sojan chandy
Greenhorn
Joined: Mar 18, 2007
Posts: 24
|
|
|
yep is running
|
 |
sojan chandy
Greenhorn
Joined: Mar 18, 2007
Posts: 24
|
|
|
hello..u dere
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
hello..u dere
No, I'm not a full time member You are not using any other web servers (like IIS) ?
|
 |
sojan chandy
Greenhorn
Joined: Mar 18, 2007
Posts: 24
|
|
|
i only have tomcat installed in my system
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Originally posted by sojan chandy: hello..u dere
sojan, In an effort to help you get the most from our forums, we've compiled a list of tips for asking questions here. You can find the list in our FAQ section here. In particular please see: UseRealWords Abbreviations such as "u" or "ur" in place of "you" and "you are" or "you're" confound language translation software making it hard for our non-English speaking members to read your posts. "plz" is not a word in the English language. Again, welcome to JavaRanch and good luck with your question. -Ben
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Where, exactly, is your web.xml file? Is it in a folder named [tomcat install]/webapps/test/WEB-INF ?
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
Everything seems to be good. Are you sure that the test application is getting deployed without any errors? Check for catalina log (check the console)and localhost log in log directory.This might help.
|
Rahul Bhattacharjee
LinkedIn - Blog
|
 |
sreekanth nair
Greenhorn
Joined: Mar 12, 2007
Posts: 20
|
|
|
try to put that index.jsp in a folder called "jsp" in your WEB-INF folder or put that jsp out side of your WEB-INF folder
|
 |
sojan chandy
Greenhorn
Joined: Mar 18, 2007
Posts: 24
|
|
no need of all those.. actually the error was very simple. i forgot to put "/" while closing the title tag inside html file <title></title> [ March 25, 2007: Message edited by: sojan chandy ] [ March 25, 2007: Message edited by: sojan chandy ]
|
 |
 |
|
|
subject: welcome file list
|
|
|