Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > struts- not able to get value in action [execute method] while use

Reply
Thread Tools

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

 
 
a.sivakaminathan@gmail.com
Guest
Posts: n/a
 
      07-21-2008
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
 
Reply With Quote
 
 
 
 
Evans
Guest
Posts: n/a
 
      07-21-2008
Please write in your local language to increase your chances of
getting any help.

--
Evans
http://www.jroller.com/evans

 
Reply With Quote
 
 
 
 
Donkey Hot
Guest
Posts: n/a
 
      07-21-2008
wrote in news:91c563d1-bf7e-493b-a08c-
:

> 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">
<cut 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" >
<cut 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.



 
Reply With Quote
 
Arne Vajhøj
Guest
Posts: n/a
 
      07-22-2008
Evans wrote:
> Please write in your local language to increase your chances of
> getting any help.


Not funny.

Arne
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Not able to display color in excel not able to display color in excel using xml sed_y XML 0 02-15-2012 09:46 PM
Not able to Connect to Internet while using wireless card =?Utf-8?B?c3JlZWhhcmk=?= Wireless Networking 3 11-10-2004 10:19 PM
Not able to Connect to Internet while using wireless card =?Utf-8?B?c3JlZQ==?= Wireless Networking 0 11-09-2004 06:07 PM
Struts Forward to an Action from an to Action and URLs rjweytens Java 6 06-25-2004 01:49 PM
Struts Static Action Form vs Dyanamic Action Form Joe Bloggs Java 1 08-03-2003 02:30 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57