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
Solved

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

Posted on 2006-11-15
4
178 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Suggested Solutions

Title # Comments Views Activity
table example 4 32
Custom Java Application connects to database: Which one of the 20? 4 35
Unhandled exception type Exception 18 42
jsp insert to database example 2 46
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
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…
The viewer will learn how to implement Singleton Design Pattern in Java.

839 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