Solved

How to redirect in Stripes, without using a <form>

Posted on 2006-11-15
4
179 Views
Last Modified: 2010-03-31
Hi experts,  

this has been bugging me... I am using Stripes, and i need to write some code to redirect to another jsp.
I know on the code side, to use the RedirectResolution,
but on the jsp side, how can i call the code in my redirect bean without using a form?  
Or rather, what is the syntax, to call my MyActionBean.redirect() method, when all i have to work with is some javascript code to be executed, and it's not contained within a <form></form>?


thanks
Daniel
0
Comment
Question by:dbrownell83
  • 2
  • 2
4 Comments
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 17953295
a redirection can only be handled server side

did u really want a redirect, or did you just want to change the page loaded in the browser?
you can use javascript to change the window loacation to achieve that
0
 
LVL 1

Author Comment

by:dbrownell83
ID: 17954789
im not sure.

I need to load specific information based on java cgi parameters (a primary key),
so I will have to handle it server side...

the problem is that the primary key is taken from a click on a row in this 'XSLDataGrid'.
Since this is completely contained within the javascript in the <head></head>, it's not really within a <form></form> block.  
Is there a way to call an actionBean directly without being within a form?
0
 
LVL 92

Expert Comment

by:objects
ID: 17959998
if it accepts GET requests you should be able to use a link (or set window location via js)
0
 
LVL 1

Author Comment

by:dbrownell83
ID: 17960568
thanks,

i can't use a link because it's all in javascript, because i'm using some widget.

And i don't even think i can use window.location=...
because its a stripes action bean that i'm calling.

i will try find a way around it.

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
servlet example 11 55
how to install java on RHEL image on EC2 4 51
Need help aligning JRadioButton that put in a box using GridBagLayout 2 27
glassfish admin console 1 16
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…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
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:
This video teaches viewers about errors in exception handling.

679 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