Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to access a JSP from other JSP

 
Archana Annamaneni
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic