Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

actionmapping

Posted on 2003-10-23
5
Medium Priority
?
211 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 200 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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Suggested Courses

604 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