struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <>
Subject Re: A non-javascript link that acts as if a form was submitted
Date Sun, 12 Aug 2007 22:21:22 GMT wrote:
> Hi all,
> This question might be a faq, but I haven't seen any answer when searching on
> google or in the mailing list archive.
> I'm working with a website that uses a java-based CMS (Content Management
> System) that has some struts-based functionality. One of the functions we have
> is to let the user activate his web account by clicking a link sent by a
> plain-text email.
> We need this link to do the same thing as a submit button does when submitting a
> struts form (account activation using this form works perfectly).
> How can I do this?
> Also, the success url needs to be dynamically generated, so it is not included
> in struts-config.xml.
> Also, I cannot (without *too* much extra work) rewrite the action of form
> classes (the developers of the CMS has adviced us not to, and when looking at
> the source code I notice they use some private and package private methods and
> inner classes).
> Currently, I have only been able to do this by making the link point to the form
> jsp page, putting the parameters userName and activationCode in the <html:text>
> fields, and then submitting the form using javascript after the page is loaded.
> But this looks strange for the user (one page opens, then he is redirected to
> another page) and takes time.

You should be able to create a link directly to whatever URL that form 
submits to (with the appropriate parameters), unless the action 
processing that form submission is specifically checking for a POST 
request. In that case, you wont be able to create a link as you 
describe, since a link is explicitly a GET request.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message