Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Java Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Java Basics General beginning Java language questions that don't fit in one of the more specific forums. Please specify what version.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 24th, 2006, 11:42 PM
Authorized User
 
Join Date: Dec 2005
Location: , , .
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Is it possible to set $_Session Variables in java

I would like to know if it is possible to save a value from a php form in a session using a java function.


What I am doing:

I have a php form. The form contains a textbox and 2 list menus (drop down box) The second drop down box relies on the selection made in the first.

within the reload() java function I save the value entered in the first list menu (using the onChange="reload(this.form)" ) I pass the variables in the url. The users selection loads values into the second list menu. Where the user can make a second selection. This value is passed using the same method.

What I would like to do is save the textbox (or all the entered values) values in a session using a java function. When the user changes the a value or enters one.

Thanks
Reply With Quote
  #2 (permalink)  
Old February 13th, 2006, 05:41 AM
Friend of Wrox
 
Join Date: Jan 2006
Location: San Francisco, CA, USA.
Posts: 198
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Look at the javax.servlet.http.HttpSession object. You can get one by calling HttpServletRequest.getSession(). Then call HttpSession.setAttribute(String, Object) to set a session variable, and HttpSession.getAttribute(String) to retrieve one.

Jon Emerson
http://www.jonemerson.net/
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set a session in Java Filter? Edward King Pro JSP 1 January 31st, 2006 05:34 AM
Can session variables be used inside Java? Annoyamouse BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 1 October 14th, 2004 02:26 PM
Set multiple variables with one Select? djuricd SQL Server 2000 2 June 14th, 2004 08:08 AM
How to set up Java AppServer partho_choudhury J2EE 7 June 14th, 2004 02:29 AM
Storing binary data in $_SESSION variables richard.york Pro PHP 0 August 30th, 2003 05:23 PM



All times are GMT -4. The time now is 09:51 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.