I recommend using displaytag [1] for showing the user list.

How to know which user you want to delete/update? You need to add a
parameter to the delete/update action URL to identify the specific
user, usually the user's primary key or if your user list is stored in
session scope you could use the index that the user is in that list.
See the <s:url> tag [2] to learn how to build that URL.

[1] http://displaytag.sourceforge.net
[2] http://struts.apache.org/2.1.2/docs/url.html

2008/7/21 hisameer <[EMAIL PROTECTED]>:
>
> Hi everyone
>
> I was just going through the nabble.com and I found very nice help about
> struts2. Now I need some more help about it. I hope somebody is kind enough
> to help me.
>
> My problem is that I have to display all the users from the database and all
> the information related to the user(firstName,LastName,EmailAddress,Phone
> etc.) in a JSP page one by one by using struts2.
> and for each and every user in the list there should be a update and delete
> link. If there is no user then nothing should show up. I really don't know
> how this should work in the jsp page using struts2. I have got the list in
> Action Class of it and the list has name userList which is of type user
> object which has all the fields in it.
>
> I don't know how I can display the list into the jsp page. If somebody has
> done this already can you please send me the sample code to my email id:
> [EMAIL PROTECTED]
>
> Also how would I know about which user I want to delete or update,whenever
> the user clicks on any one of the link.
>
> Please help me. I need to finish it as soon as I can!:,(
> --
> View this message in context: 
> http://www.nabble.com/need-some-help-regarding-Display-List-and-Update-In-Struts2-tp18579243p18579243.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to