Hi,
Basically is it possible, for instance, if there are html links in a page that
lead to different actions. But there is no form in the page. How can I
pass data in this case? Or is there a way to make all the links a POST
to the action?
Thanks
Kai
Hi
Only way to do post to action (btw, u mean struts action i guess?) is use
of form html element. With plain html link you can only make GET requests.
so you can use either GET:
1a) <html:link page="/your_action.do" paramId="form_property_name"
paramName="beanName" paramProperty="beanProperty">Blabla</html:link> for
only one simple property.
1b) or use of map of properties with <html:link page="/..."
name="..." property="...">...</html:link>
1c) or simplest case: <html:link
page="/your_action.do?form_property_name=some_data">Blabla</html:link>
----
or if you need use of POST you will need form for this...
if you cannot(dont want) use <html:form> tag (target action have not
defined any form bean) you can use <form
action="/your_context/your_module_if_needed/your_action.do" method="POST">
<input type="hidden" name="form_property_name" value="some_data"> ...
<html:submit>Click me</html:submit>
</form>