Solved

Path Error

Posted on 2006-06-08
1
189 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

726 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