You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Paul <pa...@merge-solutions.com> on 2007/04/30 20:28:31 UTC
Struts Tags Include?
Hi all,
I'm having a bit of an issue with the struts tags.
In one of my JSPs I declare: <s:url action="listUserAction" id="userlist"/>
Shouldn't I then be able to include the output from the above via:
<s:include value="%{userlist}"/> ?
It keeps dumping "requested resource (/{project}/{project}/listUserAction.do) is not available".
If I manually attempt to access /{project}/listUserAction.do in my address bar it dumps perfectly fine?
Still coming to grips with struts tags. Any help would be greatly appreciated!
Regards,
Paul
Re: Struts Tags Include?
Posted by Martin Gainty <mg...@hotmail.com>.
Good Afternoon Paul
servlet-mapping is mapping to /project/project/listUserAction.do instead of
/project/listUserAction.do
here is a working example from strutsMenu
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
(notice there is no /project/ anywhere in this mapping)
HTH/
Martin
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "Paul" <pa...@merge-solutions.com>
To: <us...@struts.apache.org>
Sent: Monday, April 30, 2007 2:28 PM
Subject: Struts Tags Include?
Hi all,
I'm having a bit of an issue with the struts tags.
In one of my JSPs I declare: <s:url action="listUserAction" id="userlist"/>
Shouldn't I then be able to include the output from the above via:
<s:include value="%{userlist}"/> ?
It keeps dumping "requested resource
(/{project}/{project}/listUserAction.do) is not available".
If I manually attempt to access /{project}/listUserAction.do in my address
bar it dumps perfectly fine?
Still coming to grips with struts tags. Any help would be greatly
appreciated!
Regards,
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts Tags Include?
Posted by Martin Gainty <mg...@hotmail.com>.
this is good information
Thanks
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "Eric Rank" <er...@lo-fi.net>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, April 30, 2007 6:54 PM
Subject: Re: Struts Tags Include?
> It looks like the only required attribute is the "name" for the
> <s:action > tag.
>
> Somthing to note, as Dave Newton alluded to, is that if you omit the
> "executeResult" attribute, you will have passively chosen to make
> that attribute 'false'. When this happens, the action you specified
> in the "name" attribute will not render anything on your page, but
> rather, it will put the action's properties into the request scope so
> you can access them.
>
> If you need the <s:action> tag to render the result on your page as
> if it were included, the correct syntax is:
>
> <s:action name="includedAction" executeResult="true" />
>
> Eric
>
>
> On Apr 30, 2007, at 3:43 PM, Martin Gainty wrote:
>
>> should the jasper compiler throw an exception when this required
>> attribute is missing?
>> Thanks
>> Martin--
>> This email message and any files transmitted with it contain
>> confidential
>> information intended only for the person(s) to whom this email
>> message is
>> addressed. If you have received this email message in error,
>> please notify
>> the sender immediately by telephone or email and destroy the original
>> message without making a copy. Thank you.
>>
>> ----- Original Message ----- From: "Eric Rank" <er...@lo-fi.net>
>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>> Sent: Monday, April 30, 2007 3:35 PM
>> Subject: Re: Struts Tags Include?
>>
>>
>>> I have to admit, I haven't used the <s:action ... > tag, but I
>>> think it might do what you want.
>>>
>>> instead of :
>>>
>>> <s:url action="listUserAction" id="userlist />
>>> <s:include value="%{userlist}" />
>>>
>>> try this:
>>>
>>> <s:action name="listUserAction" />
>>>
>>> More info: http://struts.apache.org/2.x/docs/action.html
>>>
>>>
>>> -----------------------
>>> Eric Rank
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts Tags Include?
Posted by Eric Rank <er...@lo-fi.net>.
It looks like the only required attribute is the "name" for the
<s:action > tag.
Somthing to note, as Dave Newton alluded to, is that if you omit the
"executeResult" attribute, you will have passively chosen to make
that attribute 'false'. When this happens, the action you specified
in the "name" attribute will not render anything on your page, but
rather, it will put the action's properties into the request scope so
you can access them.
If you need the <s:action> tag to render the result on your page as
if it were included, the correct syntax is:
<s:action name="includedAction" executeResult="true" />
Eric
On Apr 30, 2007, at 3:43 PM, Martin Gainty wrote:
> should the jasper compiler throw an exception when this required
> attribute is missing?
> Thanks
> Martin--
> This email message and any files transmitted with it contain
> confidential
> information intended only for the person(s) to whom this email
> message is
> addressed. If you have received this email message in error,
> please notify
> the sender immediately by telephone or email and destroy the original
> message without making a copy. Thank you.
>
> ----- Original Message ----- From: "Eric Rank" <er...@lo-fi.net>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Monday, April 30, 2007 3:35 PM
> Subject: Re: Struts Tags Include?
>
>
>> I have to admit, I haven't used the <s:action ... > tag, but I
>> think it might do what you want.
>>
>> instead of :
>>
>> <s:url action="listUserAction" id="userlist />
>> <s:include value="%{userlist}" />
>>
>> try this:
>>
>> <s:action name="listUserAction" />
>>
>> More info: http://struts.apache.org/2.x/docs/action.html
>>
>>
>> -----------------------
>> Eric Rank
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts Tags Include?
Posted by Martin Gainty <mg...@hotmail.com>.
should the jasper compiler throw an exception when this required attribute
is missing?
Thanks
Martin--
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed. If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy. Thank you.
----- Original Message -----
From: "Eric Rank" <er...@lo-fi.net>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Monday, April 30, 2007 3:35 PM
Subject: Re: Struts Tags Include?
>I have to admit, I haven't used the <s:action ... > tag, but I think it
>might do what you want.
>
> instead of :
>
> <s:url action="listUserAction" id="userlist />
> <s:include value="%{userlist}" />
>
> try this:
>
> <s:action name="listUserAction" />
>
> More info: http://struts.apache.org/2.x/docs/action.html
>
>
> -----------------------
> Eric Rank
>
>
>
> On Apr 30, 2007, at 12:47 PM, Paul wrote:
>
>> Hey Dave,
>>
>> Yup just realized that. Thanks. I changed it to the following:
>> <s:url action="listUserAction" id="userlist" includeContext="false" />
>>
>> I no longer have the double {project}s but unfortunately still have the
>> same error with the include:
>>
>> "The requested resource (/{project}/listUserAction.do) is not
>> available."
>>
>> Regards,
>> Paul
>>
>> -----Original Message-----
>> From: Dave Newton [mailto:newton.dave@yahoo.com]
>> Sent: Monday, April 30, 2007 2:39 PM
>> To: Struts Users Mailing List;Paul
>> Subject: Re: Struts Tags Include?
>>
>> --- Paul <pa...@merge-solutions.com> wrote:
>>> In one of my JSPs I declare: <s:url
>>> action="listUserAction" id="userlist"/>
>>>
>>> Shouldn't I then be able to include the output from
>>> the above via:
>>>
>>> <s:include value="%{userlist}"/> ?
>>>
>>> It keeps dumping "requested resource
>>> (/{project}/{project}/listUserAction.do) is not
>>> available".
>>
>> I believe <s:include.../> adds the context name to the
>> url, hence the doubled {project}s.
>>
>> Someone else will chime in, but in the meantime you
>> could, I suppose, just put the action URL in (with
>> .do, without context) and see if that works.
>>
>> d.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts Tags Include?
Posted by Dave Newton <ne...@yahoo.com>.
--- Eric Rank <er...@lo-fi.net> wrote:
> <s:action name="listUserAction" />
+ executeResult="true"
d.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Struts Tags Include?
Posted by Paul <pa...@merge-solutions.com>.
Erik,
Cheers! Works flawlessly now.
Regards,
Paul
-----Original Message-----
From: Eric Rank [mailto:ericrank@lo-fi.net]
Sent: Monday, April 30, 2007 3:35 PM
To: Struts Users Mailing List
Subject: Re: Struts Tags Include?
I have to admit, I haven't used the <s:action ... > tag, but I think
it might do what you want.
instead of :
<s:url action="listUserAction" id="userlist />
<s:include value="%{userlist}" />
try this:
<s:action name="listUserAction" />
More info: http://struts.apache.org/2.x/docs/action.html
-----------------------
Eric Rank
On Apr 30, 2007, at 12:47 PM, Paul wrote:
> Hey Dave,
>
> Yup just realized that. Thanks. I changed it to the following:
> <s:url action="listUserAction" id="userlist" includeContext="false" />
>
> I no longer have the double {project}s but unfortunately still have
> the same error with the include:
>
> "The requested resource (/{project}/listUserAction.do) is not
> available."
>
> Regards,
> Paul
>
> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@yahoo.com]
> Sent: Monday, April 30, 2007 2:39 PM
> To: Struts Users Mailing List;Paul
> Subject: Re: Struts Tags Include?
>
> --- Paul <pa...@merge-solutions.com> wrote:
>> In one of my JSPs I declare: <s:url
>> action="listUserAction" id="userlist"/>
>>
>> Shouldn't I then be able to include the output from
>> the above via:
>>
>> <s:include value="%{userlist}"/> ?
>>
>> It keeps dumping "requested resource
>> (/{project}/{project}/listUserAction.do) is not
>> available".
>
> I believe <s:include.../> adds the context name to the
> url, hence the doubled {project}s.
>
> Someone else will chime in, but in the meantime you
> could, I suppose, just put the action URL in (with
> .do, without context) and see if that works.
>
> d.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts Tags Include?
Posted by Eric Rank <er...@lo-fi.net>.
I have to admit, I haven't used the <s:action ... > tag, but I think
it might do what you want.
instead of :
<s:url action="listUserAction" id="userlist />
<s:include value="%{userlist}" />
try this:
<s:action name="listUserAction" />
More info: http://struts.apache.org/2.x/docs/action.html
-----------------------
Eric Rank
On Apr 30, 2007, at 12:47 PM, Paul wrote:
> Hey Dave,
>
> Yup just realized that. Thanks. I changed it to the following:
> <s:url action="listUserAction" id="userlist" includeContext="false" />
>
> I no longer have the double {project}s but unfortunately still have
> the same error with the include:
>
> "The requested resource (/{project}/listUserAction.do) is not
> available."
>
> Regards,
> Paul
>
> -----Original Message-----
> From: Dave Newton [mailto:newton.dave@yahoo.com]
> Sent: Monday, April 30, 2007 2:39 PM
> To: Struts Users Mailing List;Paul
> Subject: Re: Struts Tags Include?
>
> --- Paul <pa...@merge-solutions.com> wrote:
>> In one of my JSPs I declare: <s:url
>> action="listUserAction" id="userlist"/>
>>
>> Shouldn't I then be able to include the output from
>> the above via:
>>
>> <s:include value="%{userlist}"/> ?
>>
>> It keeps dumping "requested resource
>> (/{project}/{project}/listUserAction.do) is not
>> available".
>
> I believe <s:include.../> adds the context name to the
> url, hence the doubled {project}s.
>
> Someone else will chime in, but in the meantime you
> could, I suppose, just put the action URL in (with
> .do, without context) and see if that works.
>
> d.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: Struts Tags Include?
Posted by Paul <pa...@merge-solutions.com>.
Hey Dave,
Yup just realized that. Thanks. I changed it to the following:
<s:url action="listUserAction" id="userlist" includeContext="false" />
I no longer have the double {project}s but unfortunately still have the same error with the include:
"The requested resource (/{project}/listUserAction.do) is not available."
Regards,
Paul
-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com]
Sent: Monday, April 30, 2007 2:39 PM
To: Struts Users Mailing List;Paul
Subject: Re: Struts Tags Include?
--- Paul <pa...@merge-solutions.com> wrote:
> In one of my JSPs I declare: <s:url
> action="listUserAction" id="userlist"/>
>
> Shouldn't I then be able to include the output from
> the above via:
>
> <s:include value="%{userlist}"/> ?
>
> It keeps dumping "requested resource
> (/{project}/{project}/listUserAction.do) is not
> available".
I believe <s:include.../> adds the context name to the
url, hence the doubled {project}s.
Someone else will chime in, but in the meantime you
could, I suppose, just put the action URL in (with
.do, without context) and see if that works.
d.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Struts Tags Include?
Posted by Dave Newton <ne...@yahoo.com>.
--- Paul <pa...@merge-solutions.com> wrote:
> In one of my JSPs I declare: <s:url
> action="listUserAction" id="userlist"/>
>
> Shouldn't I then be able to include the output from
> the above via:
>
> <s:include value="%{userlist}"/> ?
>
> It keeps dumping "requested resource
> (/{project}/{project}/listUserAction.do) is not
> available".
I believe <s:include.../> adds the context name to the
url, hence the doubled {project}s.
Someone else will chime in, but in the meantime you
could, I suppose, just put the action URL in (with
.do, without context) and see if that works.
d.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org