Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

why getting 404 error? page is there.

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am really confuse and stuck with this problem.

I have placed a project SessionTest into webapps directory of tomcat like this way:



And now when I type [http://localhost:8080/SessionTest/index.jsp] at browser, it gives me 404 (page not found) error.

Tomcat is installed properly, because other applications are fine.

Please help me, what can be the problem?

Thanks.
[ December 22, 2005: Message edited by: rathi ji ]
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to get the app through http://localhost:8080/manager/html. Also check whther it is started or not.
 
Chidanand Chauhan
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by rathi ji:
Hi,

I am really confuse and stuck with this problem.

I have placed a project SessionTest into webapps directory of tomcat like this way:



And now when I type [http://localhost:8080/SessionTest/index.jsp] at browser, it gives me 404 (page not found) error.

Tomcat is installed properly, because other applications are fine.

Please help me, what can be the problem?

Thanks.

[ December 22, 2005: Message edited by: rathi ji ]


Hi Rathi
can you type the url "http://localhost:8080/SessionTest" and then check whether your web browser shows jsp or not .
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Chidanand Chauhan:


And now when I type [http://localhost:8080/SessionTest/index.jsp] at browser, it gives me 404 (page not found) error.

Tomcat is installed properly, because other applications are fine.

Please help me, what can be the problem?

Thanks.

[ December 22, 2005: Message edited by: rathi ji ]<hr></blockquote>

Hi Rathi
can you type the url "http://localhost:8080/SessionTest" and then check whether your web browser shows jsp or not .[/QB]


No, it is not showing. I tried it too.

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Adeel Ansari:
Try to get the app through http://localhost:8080/manager/html. Also check whther it is started or not.


404 (page not found) here also....

:roll:
 
jyothi malapaka
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Go to http://localhost:8080 and select tomcat manager.
login with the user id, password present in tomcat users for manager.
Then check if the application is running or if there is some error in it
 
Chidanand Chauhan
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by rathi ji:


And now when I type [http://localhost:8080/SessionTest/index.jsp] at browser, it gives me 404 (page not found) error.

Tomcat is installed properly, because other applications are fine.

Please help me, what can be the problem?

Thanks.

[ December 22, 2005: Message edited by: rathi ji ]<hr></blockquote>

Hi Rathi
can you type the url "http://localhost:8080/SessionTest" and then check whether your web browser shows jsp or not .[/QB]<hr></blockquote>

No, it is not showing. I tried it too.

[/QB]

Then There is some severe problem............... go to the tomcat manager and rectify it
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by jyothim:
Go to http://localhost:8080 and select tomcat manager.
login with the user id, password present in tomcat users for manager.
Then check if the application is running or if there is some error in it


Sorry, but what is the username and password for this...

Please tell me. where I can find it??

Thanks.
 
jyothi malapaka
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<tomcat_installation_directory>-----conf(folder)----tomcat-users.xml
tomcat_installation_directory is same as catalina-home

In the tomcat-users.xml you will find an entry similar to (may not be same)
<user username="admin" password="" roles="admin,manager"/>
Just check the exact one in your xml file.

use this username and password for getting registered as manager.

Mostly whenever there is some mistake in web.xml you will get such sort of an error. Just check it
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"jyothim"

Welcome to the JavaRanch!

We're a friendly bunch, but we take our display names very seriously.

We require display names to be two words: your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and fix your display name, since accounts with invalid display names get deleted.

thanks,
Dave.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my tomcat-users.xml file:



I tried all the combination, but it gave me 403 (access denied) error.

Please suggest me...

Thanks.
 
jyothi malapaka
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rathi

add this code into the tomcat-users.xml
<role rolename="manager"/>
<role rolename="admin"/>
<user username="admin" password="" roles="admin,manager"/>

After that restart ur tomcat and try to login
[ December 23, 2005: Message edited by: jyothi m ]
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, My this application is not in the list. But how can add that into this list...

Please suggest.

Thanks.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"jyothi m"
Thank you for changing your display name, but last initials aren't accepted. You can browse the display name rules here.

Please correct your display name.

thanks,
Dave.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Yes, My this application is not in the list. But how can add that into this list...


Deploy your web application.

If you are using advanced IDE's like WSAD (or) IntelliJIDEA they will do all the work for you. All you have to do is just configure your web/application server with the IDE.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vishnu Prakash:


Deploy your web application.

If you are using advanced IDE's like WSAD (or) IntelliJIDEA they will do all the work for you. All you have to do is just configure your web/application server with the IDE.


No, I am using notepad for writing all code.

 
jyothi malapaka
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hii could you send me your web.xml and the java file??

There might be some problem in it....
If you are sure that there is no problem in any of them ....then change the name of your SessionTest(web application) folder....
sometimes it works .....just try it..

And then restart your tomcat...refresh ur browser and check if it is present in tomcat manager...

[ December 23, 2005: Message edited by: jyothi malapaka ]
[ December 23, 2005: Message edited by: jyothi malapaka ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you looked that the logs under tomcat/logs?
If there was a problem deploying your app, you would see some messages there.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


I changed name also but the same problem...

Please suggest some way...

Thanks a lot.
[ December 23, 2005: Message edited by: rathi ji ]
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ben Souther:
Have you looked that the logs under tomcat/logs?
If there was a problem deploying your app, you would see some messages there.


Parse error in application web.xml
java.lang.IllegalArgumentException: Invalid <url-pattern>MyFirstServlet.do in servlet mapping
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Guys.

I forgot / in front of value of url-pattern tag.

small things may make the difference.

Thanks agian.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic