This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes session.setAttribute(Constants.USER_KEY, form);   Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "session.setAttribute(Constants.USER_KEY, form);   "Constants" not reolving" Watch "session.setAttribute(Constants.USER_KEY, form);   "Constants" not reolving" New topic
Author

session.setAttribute(Constants.USER_KEY, form); "Constants" not reolving

bhavit pant
Greenhorn

Joined: May 22, 2012
Posts: 21

hello ranchers,


in the above code constant is not resolving, which class do i have to import for this,
and one more thing rather then setting user session attributes in this way can i set it in this way session.setAttribute("username", uid);
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

bhavit pant wrote:hello ranchers,
in the above code constant is not resolving, which class do i have to import for this,


you have to create it yourself, or get it from wherever you got this example code.

bhavit pant wrote:
and one more thing rather then setting user session attributes in this way can i set it in this way session.setAttribute("username", uid);


Yes


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: session.setAttribute(Constants.USER_KEY, form); "Constants" not reolving
 
Similar Threads
Thread safe Struts Action
Can't Return action error from action class
session in struts
Need Help on struts....
Can't create connection with oracle