User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JSP section within the Web Development category of DaniWeb, a massive community of 363,554 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,859 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JSP advertiser: Lunarpages JSP Web Hosting
Views: 10607 | Replies: 4
Reply
Join Date: Jul 2005
Posts: 2
Reputation: anonymous100 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
anonymous100 anonymous100 is offline Offline
Newbie Poster

How to Pass data from JSP page to action class

  #1  
Jul 3rd, 2005
I am new to web development. Can somebody advise me on how I can pass an ArrayList from my JSP to action class.

I have the following link in my JSP which links to an action class.

<li> <A href="inboxMsg.do">Link to action</A></li>

Can I pass the arraylist in the above code?

Is using <html:link> a better option instead of the above code?

Thanks for suggestions.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2005
Location: Wellington, New Zealand
Posts: 182
Reputation: alpha_foobar is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 3
alpha_foobar's Avatar
alpha_foobar alpha_foobar is offline Offline
Junior Poster

Re: How to Pass data from JSP page to action class

  #2  
Jul 4th, 2005
Why do you want to pass an array list to your action class? didn't it come from the server in the first place?
Reply With Quote  
Join Date: Jul 2005
Posts: 2
Reputation: anonymous100 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
anonymous100 anonymous100 is offline Offline
Newbie Poster

Re: How to Pass data from JSP page to action class

  #3  
Jul 4th, 2005
Originally Posted by alpha_foobar
Why do you want to pass an array list to your action class? didn't it come from the server in the first place?

Basically I am displaying a list of messages in my JSP. When user clicks on one of the message I want to send the list to an action class for further processing and then the action class redirects it to a JSP.
Reply With Quote  
Join Date: May 2005
Location: Wellington, New Zealand
Posts: 182
Reputation: alpha_foobar is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 3
alpha_foobar's Avatar
alpha_foobar alpha_foobar is offline Offline
Junior Poster

Re: How to Pass data from JSP page to action class

  #4  
Jul 6th, 2005
The reason I ask is that there are methods for sending information from the JSP to the server (Forms).

If you want that information to be an ArrayList, then you have to store it in the session on the server. This is silly. Limit what you save in the session to the minimum and limit the data you need to transfer to the minimum (obviously compromises need to be made).

But you can send the messages back in a Form submit. If you need to. Or you can keep the messages on the server. If you need to.
Reply With Quote  
Join Date: Nov 2007
Posts: 1
Reputation: RVG123 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
RVG123 RVG123 is offline Offline
Newbie Poster

Re: How to Pass data from JSP page to action class

  #5  
Nov 9th, 2007
Hi,

I'm also new to Java world and in need of help for the same scenario.

Did you get this resolved? If so, can you pls. share the logic/code snippet.

Thank you.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JSP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JSP Forum

All times are GMT -4. The time now is 5:11 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC