Mobile Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreMobile Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 9th, 2006, 05:13 AM
viken.bavishi viken.bavishi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 4 viken.bavishi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 35 sec
Reputation Power: 0
How to pass Object of Arraylist across sevral pages?

Hello,

I am developing an application using jsp/servlets where my servlets for business logic and jsp for view which will generate wml pages.

Now i have an object of arraylist in my servlet which i need to pass to jsp page. For that i am using request.setParameter("Name",objOFArraylist), and i am getting the same arralist object in my jsp page but how i can pass the same object to next servlets.

One option is use of session but many wml enable phones do not support sessions. So plz help me out how to pass object across application.

Thanks in advance,
Vimal

Reply With Quote
  #2  
Old September 9th, 2006, 02:34 PM
vrspectre's Avatar
vrspectre vrspectre is offline
I see semi-colons
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2005
Location: Portland, OR
Posts: 297 vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level)vrspectre User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 4 Days 10 h 38 m 59 sec
Reputation Power: 16
Send a message via AIM to vrspectre Send a message via Yahoo to vrspectre
Rather then storing the session in a cookie, store it on the server, then pass the session ID through GET or POST.

I don't know if JSP does that, I use PHP, and it works like a charm.
__________________


Reply With Quote
  #3  
Old September 11th, 2006, 02:37 AM
viken.bavishi viken.bavishi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2006
Posts: 4 viken.bavishi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 35 sec
Reputation Power: 0
Hello,

Here i is sample jsp page.

Quote:
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<%
response.setContentType("text/vnd.wap.wml");
java.util.ArrayList FavItemData = (java.util.ArrayList)request.getAttribute("FavItemData");
session.setAttribute("FavItemData",request.getAttribute("FavItemData"));
int Icount = 0;
%>
<wml>
<card id="wlogin" title="Main Menu">
<p>
<br/>Choose Favorite:
<select name="Favorite">
<%
for(Icount = 0; Icount < FavItemData.size(); Icount++)
{
%>
<option value="<%=Icount%>">Item</option>
<%
}
%>
</select>

<do type="accept" label="Select Item">
<go href="/servlet/wmlGetFavoriteItemDetails" method="post">
<postfield name="FavoriteItemIndex" value="$Favorite"/>
</go>
</do>

</p>
</card>
</wml>


Here in above example i am puting object FavItemData in session but i want to avoid use of session then how to send the same object in next servlet.

-------
Vimal

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreMobile Programming > How to pass Object of Arraylist across sevral pages?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT