• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Peter Rooke
  • Himai Minh
  • Piet Souris
  • Mikalai Zaikin

Problem launching a jsp page with eclipse and tomcat

Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

I have just started using eclipse and tomcat for creating dynamic web pages. I tried to launch a jsp page after starting the tomcat server with the URL: http://locahost:8080/HelloWorld/, an error page was displayed as below:

HTTP Status 404 -/

type Status report

message /_

description The requested resource (-) is not available

Apache Tomcat/5.5.17

I didn't get any error at the console and when i just typed http://localhost, a pop up menu saying that the connection was refused when attempting to contact localhost.

I'm not sure what is the problem here. Could it be the permssion to the localhost is not granted by the system as the eclipse IDE is running using linux?

Hope someone can help.

Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Generally when accessing a JSP I would expect a JSP extension on the URL. Something like "http://localhost:8080/helloworld.jsp" or the like. The exception to this is when the JSP is named index.jsp - Tomcat uses that name as a default when only the directory is specified.

To use Eclipse with Tomcat you'll have to start Tomcat with the JPDA. You will want to export the environment variables JPDA_ADDRESS=8000 and JPDA_TRANSPORT=dt_socket (those are the defaults) to enable this. Then, in Eclipse you can debug with the "remote application" method. You'll want to make sure your source and what Tomcat is running are the same thing.

I don't feel that this is a permission problem. Start with getting Tomcat working for a simple JSP page first. Then you should be able to debug more. A warning though - JSP's are very difficult to debug if you are putting Java code in them. If you call a bean or some other code from a JSP that is easy. But if you want to walk through a scriplet in a JSP that can be difficult. The reason is that a JSP is translated into a servlet and then compiled. The translation generates a ton more code than your JSP has. Once your JSP is working take a look in the Tomcat work directory. That contains what Tomcat did to run the JSP.
    Bookmark Topic Watch Topic
  • New Topic