my dog learned polymorphism*
The moose likes JSP and the fly likes How to access a JSP from other JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to access a JSP from other JSP " Watch "How to access a JSP from other JSP " New topic
Author

How to access a JSP from other JSP

Archana Annamaneni
Ranch Hand

Joined: Jan 29, 2003
Posts: 147
The following is my webapplication directory structure.
C:\Tomcat4.1\webapps\IS_Project
-WEB-INF
-JSP
home.jsp,search.jsp....
WEB-INF
I can access the search.jsp
http://localhost:8080/IS_Project/jsp/search.jsp like this
My home.jsp contains simple form data , in the form action i am calling search.jsp
I tried all these
<form action="search.jsp">,<form action="/jsp/search.jsp">, <form action="IS_Project/jsp/search.jsp">
For all these I am getting(depending on what I gave in the action)
HTTP Status 404 - /IS_Project/jsp/search.jsp
type Status report
message /IS_Project/jsp/search.jsp
description The requested resource (/IS_Project/jsp/search.jsp) is not available.
Apache Tomcat/4.1.18
I know I am missing some thing here ,please somebody help me in how to call the JSP file.Do I need to add anything in the web.xml?
I really appreciate anykind of help.
Archana
Piter john
Greenhorn

Joined: Jan 06, 2003
Posts: 19
hi,
i think you will get that page after submitting current page.
<form Action="abc.jsp"> will open after submitting of current page. But if you want to open that page within Current page then you can use "Include" Tag.
Hope you get wht i mean to say.
piter
Archana Annamaneni
Ranch Hand

Joined: Jan 29, 2003
Posts: 147
Thank you for the reply piter,

I think you will get that page after submitting current page.
<form Action="abc.jsp"> will open after submitting of current page.

Exactly that is what I want , but it is saying source can not found.
I don't think i can use include , because I want to call a jsp when some action occurs.
Archana
 
wood burning stoves
 
subject: How to access a JSP from other JSP