Expand my Community achievements bar.

Flex + JAAS

Avatar

Former Community Member
I am new to Flex and have a question about Use JAAS with Flex
Data Service on JBoss. I have followed the instruction specified on

http://www.adobe.com/support/documentation/en/flex/2/install.html#jboss
to setup the configuation.



I defined following in web.xml file

<security-constraint>

<web-resource-collection>


<web-resource-name>flaxsample</web-resource-name>

<url-pattern>/login/*</url-pattern>

<http-method>GET</http-method>

<http-method>POST</http-method>

</web-resource-collection>

<auth-constraint>

<role-name>Authenticated</role-name>

</auth-constraint>

</security-constraint>





<login-config>

<auth-method>FORM</auth-method>

<form-login-config>


<form-login-page>/login/login.mxml</form-login-page>


<form-error-page>/login/error.html</form-error-page>

</form-login-config>

</login-config>



<security-role>

<role-name>Authenticated</role-name>

</security-role>



The login.mxml contains a simple mx:form which have
username/password textfields and a submit button

when I tried to access
http://localhost:8080/<appname>/login/login.mxml,
it only shows a flash player background, no username/password text
field and submit button were shown.



If I modified web.xml not to protect Flex login application,
for example, set

<url-pattern>/loginsample/*</url-pattern>



then access
http://localhost:8080/<appname>/login/login.mxml
again, it will show the correct login page.



Anything wrong with my web.xml settings? Please share some
light.



Thanks a lot!
0 Replies