NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Session Beans? JSF 2.0 and NetBeans 6.9

 
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users
View previous topic :: View next topic  
Author Message
ninn



Joined: 18 Nov 2010
Posts: 1

PostPosted: Thu Nov 18, 2010 3:15 pm    Post subject: Session Beans? JSF 2.0 and NetBeans 6.9 Reply with quote

I am new to Netbeans.. In fact, the first time I've ever used it was this week. I am almost finished with my project (deadline is tomorrow) but the only thing that is holding me up is these Sessions. I find the idea of "Beans" extremely annoying, but I also understand that is because I don't know how to properly use them. I just need to pass variables between controllers. I've tried to do this by calling the controller and passing the variable as a parameter and setting it in the new controller. As soon as I get to the redirect at the end of my method, I move to the new controller that I set the variable in and the value is gone! I do not understand this. I thought that the Session Scoped annotation was supposed to hold these values until the session is ended by the user. Literally, all I need to do is: the user will click on a label, the label holds a value and calls a method from the current controller..that controller will set the value into a private variable..then redirect to another page controlled by another controller.. in this controller I need to retrieve the first value that was set. Session would be the best way in any other IDE I've ever used. But I cannot quite wrap the idea of the way Netbeans uses session. Please help. Point me in the right direction or something.
Back to top
Rick Fincher
Posted via mailing list.





PostPosted: Fri Nov 19, 2010 4:03 am    Post subject: Re: Session Beans? JSF 2.0 and NetBeans 6.9 Reply with quote

Are you using Glassfish with a J2EE 6 project? The annotations only
work in J2EE 6 otherwise you have to add them to the config XML file.


On 11/18/2010 10:16 AM, ninn wrote:
Quote:
I am new to Netbeans.. In fact, the first time I've ever used it was this week. I am almost finished with my project (deadline is tomorrow) but the only thing that is holding me up is these Sessions. I find the idea of "Beans" extremely annoying, but I also understand that is because I don't know how to properly use them. I just need to pass variables between controllers. I've tried to do this by calling the controller and passing the variable as a parameter and setting it in the new controller. As soon as I get to the redirect at the end of my method, I move to the new controller that I set the variable in and the value is gone! I do not understand this. I thought that the Session Scoped annotation was supposed to hold these values until the session is ended by the user. Literally, all I need to do is: the user will click on a label, the label holds a value and calls a method from the current controller..that controller will set the value into a private variable..then redire
ct to another page controlled by another controller.. in this controller I need to retrieve the first value that was set. Session would be the best way in any other IDE I've ever used. But I cannot quite wrap the idea of the way Netbeans uses session. Please help. Point me in the right direction or something.


Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> Java EE Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo