Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP tag logic calling struts action which returns json

 
Darvesh Niz
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
i have a tag library written. the tag library doStartTag method needs to invoke a struts action located at the following URL
http://www.xxx.com/someaction.do?format=json.

This action will return a json string by reading the request cookies, gets the user name from the cookie and queries the database to see whether the user is valid or not. if the user is valid it returns the response code

i was wondering how can i post a request to the struts action and gets the response back through the tag.

any idea

Thanks
darniz
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64838
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PageContext.include()
 
Darvesh Niz
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks
can you please provide some sample code
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64838
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, please read NotACodeMill. Try it yourself and see what happens.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic