anchor tag href to another jsp page is not working

hi,

I have a very basic problem here it is http 404 error, when i try to open the index_old.jsp page from index.jsp.  Both files are in the WEB-INF/jsp folder.  Here is the index.jsp file looks like.

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
      <div>
            <ul>
                  <li><a href="index_old.jsp" target="_blank" >Security SignOn Data</a></li>
            </ul>
      </div>
</body>
</html>

and the index_old.jsp is like this;

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body> Hi there!!  </body>
</html>

the web.xml is as shown below:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>Tremor Web Application</display-name>
  <servlet>
    <servlet-name>dispatcher</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
 
  <servlet-mapping>
    <servlet-name>dispatcher</servlet-name>
    <url-pattern>*.htm</url-pattern>
  </servlet-mapping>
   
  <welcome-file-list>
    <welcome-file>/WEB-INF/jsp/index.jsp</welcome-file>
  </welcome-file-list>

</web-app>

i suspect there is some problem with the anchor tag href which is failing to show up the index_old.jsp but i could not figure what it is? Can anyone please help me fix this.

lakkarajumuraliAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lakkarajumuraliAuthor Commented:
another info, when i add the index_old.jsp in the welcome-file-list tag in the web.xml, it is opening up the index_old.jsp page but it is throwing http 404 error which trying to access through index.jsp.

this shows the index_old.jsp but i dont want this i want index.jsp as the welcome-file for my application.

  <welcome-file-list>
        <welcome-file>/WEB-INF/jsp/index_old.jsp</welcome-file>
    <welcome-file>/WEB-INF/jsp/index.jsp</welcome-file>
  </welcome-file-list>
rrzCommented:
>Both files are in the WEB-INF/jsp folder.  
Why are you placing your JSPs in WEB-INF  ?
The WEB-INF folder is not available to a browser.
Normally, JSPs are placed in the root folder(or a sub-folder of the root folder) of a web app.  

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Pramod KumarCommented:
I agree with rrz@871311

Also, if you design forcing you to keep JSP under WEB-INF then you should write a servlet which can pass/forward the request to respective jsp file

    request.getRequestDispatcher("WEB-INF/index.jsp").forward(request, response);  
lakkarajumuraliAuthor Commented:
I placed the index.jsp under war/jsp folder the web-inf is also under war.  Now the <a tag is forwarding me to index_old.jsp.

thank you for the reply.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
JSP

From novice to tech pro — start learning today.