Jump to content

How do i get Logged in Information on Custom jsp


vishal29bhp

Recommended Posts


Hi EveryBody,

                         I made a jsp on which i need the currrent logged in information means Username ;suppose .How do i do this .

                        Is there any information stroed in Session so That i can getAttribute value on my using session object of  the Jsp.

                      Plz help me.

Vishal

 

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

You can get the user attributes using class "com.jaspersoft.jasperserver.api.metadata.user.domain.User" and the following attributes / method available:

getUsername()getFullName()getEmailAddress()isExternallyDefined()isEnabled()getRoles()Hope this help you.

Link to comment
Share on other sites

 

This should work

SecurityContextHolder.getContext().getAuthentication().getPrincipal();

 

-----or------

 

(UserDetails(SecurityContextHolder.getContext().getAuthentication().getPrincipal() )).getUsername()

 



Post Edited by Sam Vijay at 04/08/09 12:05
Link to comment
Share on other sites

I have not used cascading input.

 

 

Is there any cascading input control patch? I don't know about it, can you share the details here, it will be helpful for other guys who are discussing about the same at

 

http://jasperforge.org/plugins/espforum/view.php?group_id=112&forumid=102&topicid=32709

 

 

Do you tried Cascading Input Control patch. I try a bit but stuck at how i get the HTTP value to run the report.        

 


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...