Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to access a JSP page.

 
Andrew Broussard
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64971
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the Tomcat forum.
 
Andrew Broussard
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64971
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless I miss my guess, try: http://localhost/webapps/hello.jsp
 
Andrew Broussard
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic