In your login.jsp just put in that code:

<form action="j_security_check" method="post" enctype="UTF-8">
  | <input id="j_username" type="text" value="" name="j_username"/>
  | <input id="j_password" type="password" value="" name="j_password"/>
  | <input type="submit" value="Login" />
  | </form>

It is important to use "j_security_check in your action, because of container 
managed security. If you have not configured LoginModules in JBoss, please look 
first how to do that. Also important are right IDs for input fields. Take care 
that there are no typos.

If your credentials are right you will be authorized and logged in. To check 
whether or not logged in, you can check if renderRequest.getUserPrincipal() is 
not null. In Portlets i mean it was (PortletRequest) request instead of 
renderRequest - parameter from method you must implement in your portlet. 
Another possibility is to use roles and security constraints.

Which pages are called for wrong credentials or general errors, you can 
configure here:
[JBOSS_HOME]/server/default/deploy/jboss-portal.sar/portal-server.war/WEB-INF/web.xml

Just search for login.jsp or error.jsp.

Why you get an exception i can not tell you because of lack of informations. 
You did not say where this exception occours (Portlet, JSP another palace ?) or 
under which circumstances it occours.

I hope it helped a little bit,

DanielK

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4179717#4179717

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4179717
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to