The project_context is most probably the name of your project and the web_page_dir is the directory where you are making the JSP files. If the JSP are made inside the WebContent ( or webapp ) folder directly then just omit this entry and the URL will be http://localhost:8080/<project_context>/hello.jsp .
Also do specify the project hierarchy that you have made. It will help us determine what is your project structure and how to access the JSP from browser .
Regards, Muhammad Saif Asif Mirza
SCJA(5/6) SCJP(6)
Niraj Jha
Ranch Hand
Joined: Feb 20, 2013
Posts: 38
posted
0
Can you share your application directory structure?
Sagar Dafle
Greenhorn
Joined: Nov 06, 2012
Posts: 18
posted
0
Thanxx for the concern and quick reply ASIF and NIRAJ
i have attached my project hierarchy and the error page ....... with both http://localhost:8080/HelloWorld/hello.jsp and http://localhost:8080/HelloWorld/WEB-INF/hello.jsp urls, i am getting the same error....
I found your mistake . You are directly attempting to access a JSP resources inside the WEB-INF directory. You can not do that. Anything inside the WEB-INF is protected from direct access. So to access your JSP page , just simply move it outside the WEB-INF folder to the WebContent . WebContent is your root folder and any JSP resource can be directly accessed from here. Once you have moved out the JSP , just hit the URL http://localhost:8080/HelloWorld/hello.jsp and it will work fine.
Sagar Dafle
Greenhorn
Joined: Nov 06, 2012
Posts: 18
posted
0
:') :'( :'( :')
THANKS A TONNNNNNN SAIF !!! now i am able to run it successfully !
i have been struggling with such a silly mistake from yesterday !!
GOD BLESS you saif and niraj .......
Keep helping people
Hi Saif,
I am facing the same problem as above and my program is almost similar. Also my helloWorld.jsp file is inside Web-content and not web-inf. Still i am getting the error that resource not found. All my tomcat connections are fine because it shows tomcat welcome page when i go to localhost. I am new to this and have been struggling to this for last 3-4 hours. I would appreciate any help.