File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes How to access a JSP page. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to access a JSP page." Watch "How to access a JSP page." New topic
Author

How to access a JSP page.

Andrew Broussard
Greenhorn

Joined: Mar 10, 2006
Posts: 17
Hi,
my problem is that I am trying to access a simple HelloWorld.jsp page through Tomcat.Where should I keep this file so that I can access it.I have put it in tomcat/webapps/ROOT at present but browser gives error 404.Please help,
Andrew
Ajith George
Ranch Hand

Joined: Dec 22, 2005
Posts: 109
404 error means there is no page found on server on the mentioned address.

Best thing is you please check whether tomcat saple pages are coming. Jst to make sure that your tomcat is working well. Then try any simple example available on net which will teach you deploy your first web application on Tomcat.


SCJP 1.4, Brainbench
LinkedIn - Blog
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

Moved to the Tomcat forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Andrew Broussard
Greenhorn

Joined: Mar 10, 2006
Posts: 17
Hi,
my Tomcat test page is coming.My JSp is rally simple one, it's a HelloWorld.jsp file of just 6 lines of code.The path I am giving in the url is "http://localhost/webapps/ROOT/hello.jsp". Can anyone please tell me how to access it.Thanks,
Andrew
[ March 29, 2006: Message edited by: Andrew Broussard ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61658
    
  67

Unless I miss my guess, try: http://localhost/webapps/hello.jsp
Andrew Broussard
Greenhorn

Joined: Mar 10, 2006
Posts: 17
Hi,
my hello.jsp file is in webapps/ROOT. But still did your command it did not work.I have now put the hello.jsp in webapps cutting from webapps/ROOT.But still not working. .Can you please help.I am in mess.
Andrew
Vinay Cardoza
Greenhorn

Joined: Mar 29, 2006
Posts: 2
Originally posted by Andrew Broussard:
Hi,
my hello.jsp file is in webapps/ROOT. But still did your command it did not work.I have now put the hello.jsp in webapps cutting from webapps/ROOT.But still not working. .Can you please help.I am in mess.
Andrew
Vinay Cardoza
Greenhorn

Joined: Mar 29, 2006
Posts: 2
Originally posted by Andrew Broussard:
Hi,
my hello.jsp file is in webapps/ROOT. But still did your command it did not work.I have now put the hello.jsp in webapps cutting from webapps/ROOT.But still not working. .Can you please help.I am in mess.
Andrew


Hi,
Please check the port number on which the Tomcat server is running. It can be found in the tomcat/conf/server.xml file. Normally it is 8080. Keep your hello.jsp in tomcat/webapps/ROOT and type http://localhost:8080/hello.jsp or http://localhost:<your-port-number>/hello.jsp. Hope this helps.

Vinay
Andrew Broussard
Greenhorn

Joined: Mar 10, 2006
Posts: 17
Thanks all,
I have solved the problem.I used "hello.jsp" while saving the file.Instead of earlier hello.jsp.It worked.But this is too frustrating.Every step involves so much.I guess I'll have to quit Java soon.
Andrew
 
 
subject: How to access a JSP page.