You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacopo Cappellato <ti...@sastau.it> on 2007/06/19 14:52:40 UTC

Question about the success response to the login request

I've noticed that there is a difference between the way the "login" 
request is set in some of the applications.

For example, in the ordermgr, marketing, manufacturing, example 
applications it is:

<request-map uri="login">
   <security https="true" auth="false"/>
   <event type="java" path="org.ofbiz.webapp.control.LoginWorker" 
invoke="login"/>
   <response name="success" type="view" value="main"/>
   <response name="error" type="view" value="login"/>
</request-map>

in the content, facility applications it is:

<request-map uri="login">
   <security https="true" auth="false"/>
   <event type="java" path="org.ofbiz.webapp.control.LoginWorker" 
invoke="login"/>
   <response name="success" type="request" value="checkLogin"/>
   <response name="error" type="view" value="login"/>
</request-map>

Notice the difference in the "success" response.
Do we need to apply a common pattern? And which one is the correct one?

Thanks,

Jacopo

Re: Question about the success response to the login request

Posted by David E Jones <jo...@hotwaxmedia.com>.
Yeah, the second one is kind of weird. I'm not sure why we'd want to do another checkLogin after the login was successful...

Going to the main page, or perhaps even redirecting to it after a login, is fine.

-David


Jacopo Cappellato wrote:
> I've noticed that there is a difference between the way the "login" 
> request is set in some of the applications.
> 
> For example, in the ordermgr, marketing, manufacturing, example 
> applications it is:
> 
> <request-map uri="login">
>   <security https="true" auth="false"/>
>   <event type="java" path="org.ofbiz.webapp.control.LoginWorker" 
> invoke="login"/>
>   <response name="success" type="view" value="main"/>
>   <response name="error" type="view" value="login"/>
> </request-map>
> 
> in the content, facility applications it is:
> 
> <request-map uri="login">
>   <security https="true" auth="false"/>
>   <event type="java" path="org.ofbiz.webapp.control.LoginWorker" 
> invoke="login"/>
>   <response name="success" type="request" value="checkLogin"/>
>   <response name="error" type="view" value="login"/>
> </request-map>
> 
> Notice the difference in the "success" response.
> Do we need to apply a common pattern? And which one is the correct one?
> 
> Thanks,
> 
> Jacopo