[jboss-user] [Security & JAAS/JBoss] - Re: Error 403 when using DatabaseServerLoginModule

yj4jboss do-not-reply at jboss.com
Mon Nov 6 08:34:15 EST 2006


Hello,
    First of all ....Loads of thnx for the previous help ;0)

I have a new issue with JAAS which i hope you might enlighten me on...I am rather new to this but i must say that it works great !!


I am using Seam, Hibernate, Ajax and Facelet  to build a web application ... I have two questions (seemingly newbie questions ;0)):

 
  | (1) The XHTML file is not displayed correctly when the following code is used:
  | 
  | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  |   |                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  |   | <html xmlns="http://www.w3.org/1999/xhtml"
  |   | 	xmlns:s="http://jboss.com/products/seam/taglib"
  |   | 	xmlns:ui="http://java.sun.com/jsf/facelets"
  |   | 	xmlns:f="http://java.sun.com/jsf/core"
  |   | 	xmlns:h="http://java.sun.com/jsf/html"
  |   | 	xmlns:si="http://sourceforge.net/projects/easysi"
  |   | 	xmlns:t="http://myfaces.apache.org/tomahawk">
  |   | 
  |   | <body>
  |   | 
  |   | <ui:composition template="template.xhtml">
  |   | 
  |   | 
  |   | 	
  |   | 	<ui:define name="topnav">
  |   | 	
  |   | 	</ui:define>
  |   | 	
  |   | 	<ui:define name="container">
  |   | 	<f:loadBundle basename="Login" var="LoginBundle" />
  |   | 	<div class="formContainer">
  |   | 
  |   | 	<f:view>
  |   | 
  |   | 
  |   | 			<form method="POST" action="j_security_check">
  |   | 				  User Name: <input type="text" name="j_username" /><br />
  |   | 				  Password: <input type="password" name="j_password" /><br />
  |   | 		
  |   | 				  <input type="submit" value="Login" />
  |   | 			</form>
  |   | 
  |   | 	</f:view>			
  |   | 
  |   | 	</div>
  |   | 		
  |   | 
  |   | 
  |   | 
  |   | 	</ui:define>
  |   | 
  |   | </ui:composition>
  |   | </body>
  |   | </html>
  |   | 
  | 
  | 
  | It seems that the page is not correctly rendered when the above code is used. I have come across Custom JAAS Login Modules but would like to know if there a simple way first before implementing this !!
  | 
  | 
  | 
  | 
  |   | (2) I need to display certain links only if the User has Admin priviledges...How can i Check which UserRole has been assigned to the session in the XHTML file itself like this
  |   | 
  |   | 
  |   |   |     <h:commandLink value="Admin Interface" action="#{AdminBean.dosomething} rendered="###"/>
  |   |   | 
  |   | 
  |   | where ### should be the condition to check
  |   | 
  |   | 
  | 
  | 
  | 
  | 
  | 
  | 
  | Regards,
  | Jankee Yogesh
  | http://www.m-itc.net
  | 

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983428



More information about the jboss-user mailing list