Thank Mike for response. However, after I add extra line like this
...
/**/*.html*=admin,user
/user/*.jsp*=ROLE_ANONYMOUS,admin,user
I still get save error. I don't why it need to call getUserByUsername() and
the username become userRegister (Which is my Action name!)
-Bruce
Michael Horwitz wrote:
>
> You can disable security for a particular page by changing the config in
> security.xml. Look for:
>
> <bean id="filterInvocationInterceptor" class="
> org.acegisecurity.intercept.web.FilterSecurityInterceptor">
> <property name="authenticationManager"
> ref="authenticationManager"/>
> <property name="accessDecisionManager"
> ref="accessDecisionManager"/>
> <property name="objectDefinitionSource">
> <value>
> PATTERN_TYPE_APACHE_ANT
> /clickstreams.jsp*=admin
> /flushCache.*=admin
> /passwordHint.html*=ROLE_ANONYMOUS,admin,user
> /reload.*=admin
> /signup.html*=ROLE_ANONYMOUS,admin,user
> /users.html*=admin
> /**/*.html*=admin,user
> </value>
> </property>
> </bean>
>
> Just add the link to your page with ROLE_ANONYMOUS.
>
> Mike.
>
> On 8/10/07, BruceLee <[EMAIL PROTECTED]> wrote:
>>
>>
>> Team,
>>
>> I tried to add a new page web/user/register.jsp to my project based on
>> appfuse 1.9.4.
>>
>> When I submit a form on localhost:8080/myprj/user/register.jsp, it
>> redirect
>> to login.jsp.
>>
>> If I login with an active user first, then I get error
>> org.acegisecurity.userdetails.UsernameNotFoundException: user
>> 'userRegister'
>> not found...
>> ...
>> at com.cmn.webapp.action.UserAction.edit(UserAction.java:115)
>>
>> But my jsp page never directly calls this edit() method. I wonder if some
>> security or inceptor setup not good?
>> Basically I don't want any security feature by now. I just want to submit
>> a
>> form and save the data to table User.
>>
>> my xwork.xml
>> <action name="userRegister" class="userAction" method="create">
>> <result name="success">/WEB-INF/pages/user/main.jsp</result>
>> <result name="error"
>> type="redirect">/user/register.jsp</result>
>> <result name="input">/WEB-INF/pages/user/register.jsp</result>
>> </action>
>>
>> More http://www.nabble.com/file/p12085995/UsernameNotFoundException.txt
>> UsernameNotFoundException.txt error log, see attached file
>> Thanks! -Bruce
>> --
>> View this message in context:
>> http://www.nabble.com/Cannot-add-new-.jsp-page-to-appfuse-1.9.4-tf4246912s2369.html#a12085995
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Cannot-add-new-.jsp-page-to-appfuse-1.9.4-tf4246912s2369.html#a12096906
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]