You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nguyen Xuan Son <ya...@gmail.com> on 2010/01/09 18:01:22 UTC

The requested resource is not available

dear all
in struts.xml I have

<action name="loginRegisteredAccount"
class="com.baibai.action.RegisteredAccountAction"
method="loginRegisteredAccount">
<result name="success">/g/homeNews.action</result>
<result name="input">/g/G0023_Login.jsp</result>
</action>
but when success the error appears The requested resource
(/baibai/g/homeNews.action) is not available
however when I input /baibai/g/homeNews.action by myself from the address
bar it works
and also

<action name="listNewsBySubCategory"
class="com.baibai.action.G0042_ListNewsByCategoryAction"
method="displayListNewsByCategory">
<result name="success">/g/G0042_ListNewsByCategory.jsp</result>
<result name="error" type="redirect">/g/homeNews.action</result>
</action>
it works fine

do you have any suggestion?
thank you very much

-- 
=======================================================================
Ritsumeikan University, Asia JinZai Project
Master of Information Science
Nguyen Xuan Son

Add       : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18 ShiteiHaimu
Rien, Room 103
Tel/Fax  : 81-(0)90-3976 2246
Email    : nr0003xx@ed.ritsumei.ac.jp
Mobile   : 81-(0)90-3976 2246          URL  : http://www.ritsumei.jp
=======================================================================

Re: The requested resource is not available

Posted by eduramiba <ed...@gmail.com>.
Hi, Nguyen Xuan Son-3.

When you want to redirect to other action you should write something like
this
<result type="redirectAction" >%{redirect}</result>

I use it for redirection to login needed actions after login and it works.


Nguyen Xuan Son-3 wrote:
> 
> dear all
> in struts.xml I have
> 
> <action name="loginRegisteredAccount"
> class="com.baibai.action.RegisteredAccountAction"
> method="loginRegisteredAccount">
> <result name="success">/g/homeNews.action</result>
> <result name="input">/g/G0023_Login.jsp</result>
> </action>
> but when success the error appears The requested resource
> (/baibai/g/homeNews.action) is not available
> however when I input /baibai/g/homeNews.action by myself from the address
> bar it works
> and also
> 
> <action name="listNewsBySubCategory"
> class="com.baibai.action.G0042_ListNewsByCategoryAction"
> method="displayListNewsByCategory">
> <result name="success">/g/G0042_ListNewsByCategory.jsp</result>
> <result name="error" type="redirect">/g/homeNews.action</result>
> </action>
> it works fine
> 
> do you have any suggestion?
> thank you very much
> 
> -- 
> =======================================================================
> Ritsumeikan University, Asia JinZai Project
> Master of Information Science
> Nguyen Xuan Son
> 
> Add       : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
> ShiteiHaimu
> Rien, Room 103
> Tel/Fax  : 81-(0)90-3976 2246
> Email    : nr0003xx@ed.ritsumei.ac.jp
> Mobile   : 81-(0)90-3976 2246          URL  : http://www.ritsumei.jp
> =======================================================================
> 
> 

-- 
View this message in context: http://old.nabble.com/The-requested-resource-is-not-available-tp27090644p27091195.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: The requested resource is not available

Posted by eduramiba <ed...@gmail.com>.
You only need 
<result name="success" type="redirectAction" >/g/homeNews.action</result>

I use OGNL expression for dynamic redirection.


Nguyen Xuan Son-3 wrote:
> 
> dear eduramiba
> I've tried
> 
> <action name="loginRegisteredAccount"
> class="com.baibai.action.RegisteredAccountAction"
> method="loginRegisteredAccount">
> <result name="success" type="redirectAction" >%{homeNews.action}</result>
> <result name="input">/g/G0023_Login.jsp</result>
> </action>
> but got this error
> There is no Action mapped for namespace / and action name .
> *The requested resource (There is no Action mapped for namespace / and
> action name .) is not available.*
> 
> do you have any suggestion?
> 
> 2010/1/10 <ed...@gmail.com>
> 
>> Hi, Nguyen Xuan Son-3.
>>
>> When you want to redirect to other action you should write something like
>> this
>> <result type="redirectAction" >%{redirect}</result>
>>
>> I use it for redirection to login needed actions after login and it
>> works.
>>
>>
>> Nguyen Xuan Son-3 wrote:
>> >
>> > dear all
>> > in struts.xml I have
>> >
>> > <action name="loginRegisteredAccount"
>> > class="com.baibai.action.RegisteredAccountAction"
>> > method="loginRegisteredAccount">
>> > <result name="success">/g/homeNews.action</result>
>> > <result name="input">/g/G0023_Login.jsp</result>
>> > </action>
>> > but when success the error appears The requested resource
>> > (/baibai/g/homeNews.action) is not available
>> > however when I input /baibai/g/homeNews.action by myself from the
>> address
>> > bar it works
>> > and also
>> >
>> > <action name="listNewsBySubCategory"
>> > class="com.baibai.action.G0042_ListNewsByCategoryAction"
>> > method="displayListNewsByCategory">
>> > <result name="success">/g/G0042_ListNewsByCategory.jsp</result>
>> > <result name="error" type="redirect">/g/homeNews.action</result>
>> > </action>
>> > it works fine
>> >
>> > do you have any suggestion?
>> > thank you very much
>> >
>> > --
>> > =======================================================================
>> > Ritsumeikan University, Asia JinZai Project
>> > Master of Information Science
>> > Nguyen Xuan Son
>> >
>> > Add       : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
>> > ShiteiHaimu
>> > Rien, Room 103
>> > Tel/Fax  : 81-(0)90-3976 2246
>> > Email    : nr0003xx@ed.ritsumei.ac.jp
>> > Mobile   : 81-(0)90-3976 2246          URL  : http://www.ritsumei.jp
>> > =======================================================================
>> >
>> >
>> Quoted from:
>>
>> http://old.nabble.com/The-requested-resource-is-not-available-tp27090644p27090644.html
>>
>>
> 
> 
> -- 
> =======================================================================
> Ritsumeikan University, Asia JinZai Project
> Master of Information Science
> Nguyen Xuan Son
> 
> Add       : Japan, Shiga-Ken, Kusatsu-Shi, Kasayama 3choume 1-18
> ShiteiHaimu
> Rien, Room 103
> Tel/Fax  : 81-(0)90-3976 2246
> Email    : nr0003xx@ed.ritsumei.ac.jp
> Mobile   : 81-(0)90-3976 2246          URL  : http://www.ritsumei.jp
> =======================================================================
> 
> 

-- 
View this message in context: http://old.nabble.com/The-requested-resource-is-not-available-tp27090644p27091983.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org