Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

How to access a jsp page inside a folder under WEB-INF?

Posted on 2005-03-13
9
Medium Priority
?
4,506 Views
Last Modified: 2010-04-01
How to access a jsp page(itemDetails.jsp) inside a folder(product) under the WEB-INF?

Located on my computer
C:\Myapp\WEB-INF\product\itemDetails.jsp

http://localhost:8080/myapp/....

myapp is the Web Context name
product is a folder that store the itemDetails.jsp file

I keep getting a HTTP Status 404 error
0
Comment
Question by:coffee_bean
9 Comments
 
LVL 28

Accepted Solution

by:
rrz earned 80 total points
ID: 13528562
The WEB-INF is not accessable to the browser. Put your "product" folder outside of WEB-INF.
0
 
LVL 29

Assisted Solution

by:bloodredsun
bloodredsun earned 80 total points
ID: 13529333
As rrz@871311 says, you can't as the WEB-INF is not visible to the browser

The only way you could do it is to have a forwarding page that does a forward on the server.

forward.jsp
---------------------
<%
request.getRequestDistpatcher("WEB-INF/product/itemDetails.jsp").forward( request, response) ;
%>
0
 
LVL 3

Expert Comment

by:neonlines
ID: 13529682
Try

http://localhost:8080/myapp/product/itemDetails.jsp 

It will work if ur Web Context Path points to C:\Myapp\WEB-INF and ur Web Context Name is myapp


0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Assisted Solution

by:udilipkumar
udilipkumar earned 80 total points
ID: 13534576
As rrz says, we cant access a jsp page placed under the WEB-INF using http://localhost:8080/

The option you have is to move the product folder outside WEB-INF.

This is because the servlet context cannot allocate servlet instance for the path through which u access your jsp in the WEB-INF. It looks for the servlet class or a class it depends on  which it fails to....

Hope this helps

Dilip
0
 

Author Comment

by:coffee_bean
ID: 13585119
Hi All thanks so much, I put the jsp file outside WEB-INF and I can access to that page now.
0
 

Author Comment

by:coffee_bean
ID: 13585125
Hmm...how come I can't split the point? I have increase the pt to 30 and wanted to split to each of u. I will check with the mod and come back to award the pt again.
0
 
LVL 20

Expert Comment

by:Venabili
ID: 13711997
You need to have at least 20 points per expert to make a split.
0
 

Author Comment

by:coffee_bean
ID: 13759098
Thanks everyone.  But just wondering if I put the jsp file into a folder outside the WEB-INF, wouldn't this make the page less secure as it can be easily accessed?
0
 
LVL 29

Expert Comment

by:bloodredsun
ID: 13759784
But a JSP is supposed to be seen. You need to look at the topics of Authentication and Authorization if you only want certain people to look at the page.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Conducting a customer service survey used to be as straightforward as sending a template email out using checkboxes and numerical rating systems to measure satisfaction.
Nowadays, technologies make investments easier and it's not even necessary to look for investors in some cases. In this article, we will consider Initial Coin Offering (ICO) investment scheme.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Loops Section Overview

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question