Link to home
Start Free TrialLog in
Avatar of princehyderabad
princehyderabad

asked on

Path Error

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


ASKER CERTIFIED SOLUTION
Avatar of Mick Barry
Mick Barry
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial