This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes Calling JSP with in WEB-INF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Calling JSP with in WEB-INF" Watch "Calling JSP with in WEB-INF" New topic
Author

Calling JSP with in WEB-INF

Parameswaran Thangavel
Ranch Hand

Joined: Mar 01, 2005
Posts: 485
hi all,
My requirement:

i need to show a particular jsp page as a pop-up.

Both the source and destination jsp pages are inside web-inf, say temp.jsp and popup.jsp. On Clikcing the link in temp.jsp, popup.jsp is shown in a pop-up window. for which i am using the following in temp.jsp


<c:url var="thisURL" value="WEB-INF/jsp/popup.jsp">
<c:param name="index" value="${statusCode.index}"/>
</c:url>

And i am using the above url value in window.open function which is called from the href link.




The problem is the server is responding with the error code 404. so i doubt the way URL is coded.

so any idea where and whats the problem.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Per the servlet spec, browsers can not see WEB-INF or any files under it.
If you want to store your JSP there, you will need to create a controller which forwards to it.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Travis Hein
Ranch Hand

Joined: Jun 06, 2006
Posts: 161
I guess at the very minimum you could create a jsp page outside of the WEB-INF that just does an include your one in the WEB-INF.
That way, it can stay inside the WEB-INF for other places that want to use it there.

so make a new /popup.jsp



well, the param is probably not needed, but is there for clarity.

then your link invocation would be


Error: Keyboard not attached. Press F1 to continue.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling JSP with in WEB-INF
 
Similar Threads
window.open()
Passing parameters between pop window JSP page and parent JSP page
Referring Script outside WEB-INF
reset param values in c:url tag
Problem with "" (double quotes on JSP)