This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Accessing Web Session variable in a Java class  RSS feed

Phanidhar Kandala
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I want to know if there is a way to use session.getAttribute("string") in a java class.

Actually that java class makes an xml message from the information entered on the online web application and sends to another coldfusion application. I have to add one more element that exists in one of the jsp pages to that xml message.

For this, i am trying to make that value available at session level and want to pull it from the session while making the xml message in the java class.

Is this possible? If not can anyone suggest me how i can incorporate that value ( like some orderID ) which is available in one of the jsp pages in the xml message?

It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!