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
description The requested resource (-) is not available
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?
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.
<a href="http://forums.hotjoe.com/forums/list.page" target="_blank" rel="nofollow">Java forums using Java software</a> - Come and help get them started.
Yeah, but how did the squirrel get in there? Was it because of the tiny ad?
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps