Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

HttpSession management in Struts 2 using Jquery Ajax

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,

I am faced to a problem that is manage the Httpsession when doing an Ajax request.
I am using Struts 2 and Jquery ajax.
I can manage the HttpSession when I use struts action without ajax. I mean I can put object to my session I get it later.
When I am using $.ajax blablabla , I put object in my session but I can not get it later...

Here is my code :


type: "POST",
data: { type: google.maps.drawing.OverlayType.POLYGON, coordonnees: coordonnees },
url: "<s:url action="getDestinataireFromZone" namespace="/map" />",
success: function(data){
$("#destinataire").html("<strong>Nombre de destinataires sélectionné : </strong>" + data);


public class MapAction extends AbstractAction{
public String getDestinataireFromZone(){

getSession().put("listeDestinataire", listDestinataireFromSession);
inputStream = new StringBufferInputStream(String.valueOf(listDestinataireFromSession.size()));

return SUCCESS;



<action name="getDestinataireFromZone" method="getDestinataireFromZone" class="MapAction">
<result name="success" type="stream">
<param name="contentType">text/html</param>
<param name="inputName">inputStream</param>

I am stucked...

Please Help me

Best Regards


Ranch Hand
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please provide full details to diagnose your problem.
A wop bop a lu bob a womp bam boom. Tutti frutti ad:
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic