Solved

Path Error

Posted on 2006-06-08
1
183 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now