Solved

actionmapping

Posted on 2003-10-23
5
208 Views
Last Modified: 2010-03-31
I'm using struts
My webapplication contains 5 JSP Pages, all of the pages have a button which corresponds to single action.

How can i know in my Action class that the request came  from which page?, beacause if the calling page is 1 i have to forward to page 2, and like that i have different combinations

Thanks
0
Comment
Question by:soft_techy
[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
5 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 9608934
mapping.getPath()

?
0
 
LVL 1

Author Comment

by:soft_techy
ID: 9611438
it is giving my action path, i have same action in all pages
0
 
LVL 2

Accepted Solution

by:
f_98 earned 50 total points
ID: 9620018
try getting the headers; i believe it stores a referrer attribute; dont know if this applies for all
apps thoughl. you may want to print out all header names just to be sure

Enumeration e = request.getHeaderNames();

String source = null;

while (e.hasMoreElements())
{
    String key = (String)e.nextElement();
    if (key.equals("referrer"))
    {
        source = request.getHeader(key);
        break;
    }
}
0
 
LVL 92

Expert Comment

by:objects
ID: 10215129
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept f_98's comment as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

objects
EE Cleanup Volunteer
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

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…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses

737 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