aspose file tools
The moose likes Struts and the fly likes session.setAttribute(Constants.USER_KEY, form);   Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply 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: 8259

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
Need Help on struts....
Thread safe Struts Action
Can't create connection with oracle
Can't Return action error from action class
session in struts