struts- not able to get value in action [execute method] while use

A

a.sivakaminathan

hello,

In struts when from is submit then values are get in action
method

but through html:link values are not able to get

but it possible only through pass in url as pass.do?
id=999&value=ford


can any body tell about problem

regards
sivakaminathan
 
D

Donkey Hot

(e-mail address removed) wrote in (e-mail address removed):
hello,

In struts when from is submit then values are get in action
method

but through html:link values are not able to get

but it possible only through pass in url as pass.do?
id=999&value=ford


can any body tell about problem

regards
sivakaminathan

<html:link /> does not pass the form to Action, you have to your http
parameters or html:link's "name" attribute.


Example of the former:


<html:link action="/system/editAdministrator.do?action=view&login=
${admin.login}" scope="page">
<c:eek:ut value="${admin.name}" />
</html:link>


Example of the latter:

<bean:define id="login" name="admin" property="login"/>
<%
java.util.HashMap params = new java.util.HashMap();
params.put("login", login);
pageContext.setAttribute("linkParameters", params);
%>

<html:link action="/system/editAdministrator.do?action=view"
scope="page" name="linkParameters" >
<c:eek:ut value="${admin.name}" />
</html:link>

Then in the Action you get the value by calling

request.getParameter("login")


Examples need use struts-el tags to work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top