File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 8907
    
    8

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