?
Solved

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

Posted on 2005-03-13
9
Medium Priority
?
3,672 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
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.

 
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

Technology Partners: 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!

Question has a verified solution.

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

In the absence of a fully-fledged GPO Management product like AGPM, the script in this article will provide you with a simple way to watch the domain (or a select OU) for GPOs changes and automatically take backups when policies are added, removed o…
This month, Experts Exchange’s free Course of the Month is focused on CompTIA IT Fundamentals.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

801 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