Solved

Path Error

Posted on 2006-06-08
1
187 Views
Last Modified: 2010-03-31
hi experts,

Simple but wired error related to path. I'm using JSP/Servlet/Struts. Here is the code.
==============
delegate.jsp
...
<a href="action123.jsp">ADD</a>
...
--------------------------
action123.jsp
=========
<form action="/Home/DoIt.do" ..>
..
</form>

=========
Servlet
....
String Delegate = Failure; (default making to failure)
....
Delegate=Success;
...
return (mapping.findForward(Delegate));
..
===============
Struts-config.xml
..
      <action path="/DoIt" type="com.admin.Delegation">
            <forward name="Success" path="/delegation/delegate.jsp"/>
      <forward name="Failed" path="/Error.jsp"/>
      </action>
=========

My DIR structure:
Root:
 <Home>: Error.jsp, etc.,....
  <delegation>:delegate.jsp, action123.jsp etc.,

NOW THE PROBLEM I'M HAVING:
After executing the action123 which calls Servlet and finally fwd to /delegation/delegate.jsp. It is showing delegate.jsp page.
But the when I click to add more stuff to <ADD> link its refering to <a href="/Home/action123.jsp"> which is false. In real it hs to refer to "/delegation/action123.jsp"

Where do I need to change or add path stuff ??

Thx,
PH


0
Comment
Question by:princehyderabad
1 Comment
 
LVL 92

Accepted Solution

by:
objects earned 125 total points
ID: 16865733
either specify the absolute path, or
use base tag to specify base url for page

http://www.w3schools.com/tags/tag_base.asp
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For customizing the look of your lightweight component and making it look lucid like it was made of glass. Or: how to make your component more Apple-ish ;) This tip assumes your component to be of rectangular shape and completely opaque. (COD…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This video teaches viewers about errors in exception handling.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question