• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

welcome file list

 
sojan chandy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks fine at first glance (except the strange class naming)
Which container are you using ?
 
sojan chandy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
tomcat 5.5
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you restart the container ?

And what does the following url display ?
http://localhost:8080/test/index.html
 
sojan chandy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it also displays nothing
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the full path of your index.html ?
Where did you put the "test" application in Tomcat ?
 
sojan chandy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C:\Tools\apache-tomcat-5.5\webapps\test
 
sojan chandy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure Tomcat is running ?
 
sojan chandy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yep is running
 
sojan chandy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello..u dere
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello..u dere

No, I'm not a full time member
You are not using any other web servers (like IIS) ?
 
sojan chandy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i only have tomcat installed in my system
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where, exactly, is your web.xml file?

Is it in a folder named [tomcat install]/webapps/test/WEB-INF
?
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sreekanth nair
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic