u told that <<<<<<< I have an index.jsp outside WEB-INF.
but u mention <%@ include file="/WEB-INF/jsp/include
inside web-inf/jsp?? y???
Main Topics
Browse All TopicsI am trying to do a simple web application. I am not able to redirect from an index.jsp outside WEB-INF to temp.jsp which is inside WEB_INF. If I keep all the jsp's outside web-inf it is working. Similarly it is not able to identify the servlet once I submit the form. I tried by keeping the servlets and classes in the default package(removed the package structure).Following are the details. Thanks in advance.
I have an index.jsp outside WEB-INF. I have an other jsp under jsp folder inside WEB-INF(WEB-INF/jsp/temp.j
<%@ include file="/WEB-INF/jsp/include
<%System.out.println("Insi
<c:redirect url="/WEB-INF/jsp/AddressH
include.jsp is inside WEB-INF/jsp(WEB-INF/jsp/in
<%@ page session="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/j
My web.xml says
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<servlet>
<servlet-name>ControllerSe
<servlet-class>com.web.ser
</servlet>
<servlet-mapping>
<servlet-name>ControllerSe
<url-pattern>/addaddr</url
</servlet-mapping>
<welcome-file-list>
<welcome-file>index.jsp</w
</welcome-file-list>
</web-app>
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
just try this !!
- <servlet>
<servlet-name>default</servle
<servlet-class>org.apache.to
</servlet>
- <servlet>
<servlet-name>invoker</servle
- <servlet-class>
org.apache.tomcat.core.Inv
- <!-- org.apache.tomcat.core.NoI
-->
</servlet-class>
</servlet>
- <servlet>
<servlet-name>jsp</servlet-na
<servlet-class>org.apache.ja
</servlet>
- <servlet-mapping>
<servlet-name>invoker</servle
<url-pattern>/servlet/*</url-
</servlet-mapping>
- <servlet-mapping>
<servlet-name>jsp</servlet-na
<url-pattern>*.jsp</url-patte
</servlet-mapping>
Once I kept all the jsp's outside web-inf it started working. Now once the jsp was loaded, I entered values in the test boxes and clicked submit which has a form action action="addaddr" . This maps to a servlet in web.xml
<servlet>
<servlet-name>ControllerServ
<servlet-class>ControllerSer
</servlet>
<servlet-mapping>
<servlet-name>ControllerServ
<url-pattern>/addaddr</url-pa
</servlet-mapping>
Business Accounts
Answer for Membership
by: rmvprasadPosted on 2009-09-14 at 10:47:38ID: 25327670
The path I have given is <c:redirect url="/WEB-INF/jsp/AddressH ome.jsp"/> which suits the exact location of the AddressHome.jsp file. The AddressHome.jsp is nothing but temp.jsp. I just mentioned it as temp.jsp to simplify the reading p we need to place index.jsp outside WEB-INF.The reason we place web.xml which contains security information inside WEB-INF is it is not seen from outside. SO how to access the jsp's inside WEB-INF. For this purpose we place index.jsp outside WEB-INF and redirect it to the required jsp which is inside WEB-INF.
My understanding is we place index.jsp outside WEB-INF is because anything inside WEB-INF is not visible from outside so access the jsp files located inside WEB-INF/jsp/AddressHome.js