You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sab <bh...@comcast.net> on 2005/02/05 08:07:59 UTC

Create a jsp page with 1 button

1>How to create a jsp page in struts with it's mappings in config, if it
has 1 button and no fields.
When user clicks on button it will go to another webpage or action
defined.


2>It's going to be a jsp page which brings in rows of data with checkbox
added to it's front. 



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Create a jsp page with 1 button

Posted by Christian Bollmeyer <ja...@christianbollmeyer.de>.
On Saturday 05 February 2005 08:07, Sab wrote:
> 1>How to create a jsp page in struts with it's mappings in config, if
> it has 1 button and no fields.
> When user clicks on button it will go to another webpage or action
> defined.

Use a ForwardAction to simply forward to your button page.
There, you put a submit button inside a normal form tag.
Use JSTL to preserve possible session info:

<form action="<c:url value="/target.do"/>" method="post">
  <input type="submit" value="Click me!">
</form>

> 2>It's going to be a jsp page which brings in rows of data with
> checkbox added to it's front.

Then your target has to be a custom action which gets the
data from the Model, puts it in some scope (request, usually)
and then forwards to your page 2.

HTH,
-- Chris.
 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org