You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by ge...@multitask.com.au on 2003/01/17 00:18:19 UTC
Re: struts servlet-mapping
If you want your action to be available from
http://localhost:8080/ppp/layout/test.do
then you need to make a mapping like this:
<action path="/layout/test"
type="com.emirca.pp.controller.actionhandler.Welcomer"
unknown="true"
validate="false">
</action>
Regards,
Geoff Bennett
Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462 Fax +61 2 9252 4636
www.multitask.com.au email: geoff@multitask.com.au
Cagan Senturk <ca...@emirca.com>
17/01/2003 10:00 AM
Please respond to "Struts Users Mailing List"
To: struts-user@jakarta.apache.org
cc:
Subject: struts servlet-mapping
>
> Hello,
> I am using Struts 1.1-b2 and Tomcat4.1.18.
> My web app is deployed under a context named 'ppp'.
> In web.xml, url-pattern for struts action servlet is set to '*.do':
> <servlet-mapping>
> <servlet-name>action</servlet-name>
> <url-pattern>*.do</url-pattern>
> </servlet-mapping>
>
> And in struts-config.xml, I have the following <action> element setup:
> <action path="/test"
> type="com.emirca.pp.controller.actionhandler.Welcomer"
> unknown="true"
> validate="false">
> </action>
>
> On my server, the following works:
> http://localhost:8080/ppp/test.do
>
> but the following doesn't:
> http://localhost:8080/ppp/layout/test.do
>
> Which means subdirectories within the context are not recognized by
> struts in this setup...
> How can I fix this?
> Thanks in advance.
> Cagan
>
>
Cagan Senturk
Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012
mailto:cagan@emirca.com
http://www.emirca.com
--
To unsubscribe, e-mail: <
mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@jakarta.apache.org>
Re: struts servlet-mapping
Posted by Cagan Senturk <ca...@emirca.com>.
I agree. But I think support of wildcards in the path would be very
useful.
On Sunday, January 19, 2003, at 06:10 PM, Marco Tedone wrote:
> I think it's important as the controllers maps the exactly match
> between the
> action-path specified by the client with the action specified in the
> configuration file.
>
> -----Original Message-----
> From: geoff@multitask.com.au [mailto:geoff@multitask.com.au]
> Sent: Sunday, January 19, 2003 10:02 PM
> To: Struts Users Mailing List
> Subject: Re: struts servlet-mapping
>
>
> Is it important that '/layout' be part of the action path? why not just
> have '/test'?
>
> It sounds as if this is an action used in multiple context's, and if
> you
> don't want to make
> multiple mapping's, then why not just have the one mapping that is used
> everywhere.
>
> The path in a mapping is just the name of the action on the server. It
> doesn't relate back to a
> directory structure, although, a path can be made to look that way.
>
>
> Regards,
>
> Geoff Bennett
>
>
> Multitask Consulting Pty Ltd
> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
> Tel +61 2 9252 1462 Fax +61 2 9252 4636
> www.multitask.com.au email: geoff@multitask.com.au
>
>
>
>
>
> Cagan Senturk <ca...@emirca.com>
> 17/01/2003 10:53 AM
> Please respond to "Struts Users Mailing List"
>
> To: "Struts Users Mailing List"
> <st...@jakarta.apache.org>
> cc:
> Subject: Re: struts servlet-mapping
>
>
>
> The thing is the /layout directory is determined at run-time; I don't
> know what it will be a deployment time.
> Thanks,
> Cagan
> On Thursday, January 16, 2003, at 06:18 PM, geoff@multitask.com.au
> wrote:
>
>> If you want your action to be available from
>> http://localhost:8080/ppp/layout/test.do
>> then you need to make a mapping like this:
>>
>> <action path="/layout/test"
>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>> unknown="true"
>> validate="false">
>> </action>
>>
>>
>> Regards,
>>
>> Geoff Bennett
>>
>>
>> Multitask Consulting Pty Ltd
>> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
>> Tel +61 2 9252 1462 Fax +61 2 9252 4636
>> www.multitask.com.au email: geoff@multitask.com.au
>>
>>
>>
>>
>>
>> Cagan Senturk <ca...@emirca.com>
>> 17/01/2003 10:00 AM
>> Please respond to "Struts Users Mailing List"
>>
>> To: struts-user@jakarta.apache.org
>> cc:
>> Subject: struts servlet-mapping
>>
>>
>>
>>>
>>> Hello,
>>> I am using Struts 1.1-b2 and Tomcat4.1.18.
>>> My web app is deployed under a context named 'ppp'.
>>> In web.xml, url-pattern for struts action servlet is set to '*.do':
>>> <servlet-mapping>
>>> <servlet-name>action</servlet-name>
>>> <url-pattern>*.do</url-pattern>
>>> </servlet-mapping>
>>>
>>> And in struts-config.xml, I have the following <action> element
>>> setup:
>>> <action path="/test"
>>>
>>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>>> unknown="true"
>>> validate="false">
>>> </action>
>>>
>>> On my server, the following works: http://localhost:8080/ppp/test.do
>>>
>>> but the following doesn't: http://localhost:8080/ppp/layout/test.do
>>>
>>> Which means subdirectories within the context are not recognized by
>>> struts in this setup... How can I fix this?
>>> Thanks in advance.
>>> Cagan
>>>
>>>
>> Cagan Senturk
>>
>> Emirca Technologies, Inc.
>> 75 Spring St. Floor #8
>> NYC, NY 10012
>>
>> mailto:cagan@emirca.com
>> http://www.emirca.com
>>
>>
>> --
>> To unsubscribe, e-mail: <
>> mailto:struts-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail: <
>> mailto:struts-user-help@jakarta.apache.org>
>>
>>
>>
> Cagan Senturk
>
> Emirca Technologies, Inc.
> 75 Spring St. Floor #8
> NYC, NY 10012
>
> mailto:cagan@emirca.com
> http://www.emirca.com
>
>
> --
> To unsubscribe, e-mail: <
> mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:struts-user-help@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
>
>
Cagan Senturk
Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012
mailto:cagan@emirca.com
http://www.emirca.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: struts servlet-mapping
Posted by Marco Tedone <m_...@hotmail.com>.
I think it's important as the controllers maps the exactly match between the
action-path specified by the client with the action specified in the
configuration file.
-----Original Message-----
From: geoff@multitask.com.au [mailto:geoff@multitask.com.au]
Sent: Sunday, January 19, 2003 10:02 PM
To: Struts Users Mailing List
Subject: Re: struts servlet-mapping
Is it important that '/layout' be part of the action path? why not just
have '/test'?
It sounds as if this is an action used in multiple context's, and if you
don't want to make
multiple mapping's, then why not just have the one mapping that is used
everywhere.
The path in a mapping is just the name of the action on the server. It
doesn't relate back to a
directory structure, although, a path can be made to look that way.
Regards,
Geoff Bennett
Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462 Fax +61 2 9252 4636
www.multitask.com.au email: geoff@multitask.com.au
Cagan Senturk <ca...@emirca.com>
17/01/2003 10:53 AM
Please respond to "Struts Users Mailing List"
To: "Struts Users Mailing List"
<st...@jakarta.apache.org>
cc:
Subject: Re: struts servlet-mapping
The thing is the /layout directory is determined at run-time; I don't
know what it will be a deployment time.
Thanks,
Cagan
On Thursday, January 16, 2003, at 06:18 PM, geoff@multitask.com.au
wrote:
> If you want your action to be available from
> http://localhost:8080/ppp/layout/test.do
> then you need to make a mapping like this:
>
> <action path="/layout/test"
> type="com.emirca.pp.controller.actionhandler.Welcomer"
> unknown="true"
> validate="false">
> </action>
>
>
> Regards,
>
> Geoff Bennett
>
>
> Multitask Consulting Pty Ltd
> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
> Tel +61 2 9252 1462 Fax +61 2 9252 4636
> www.multitask.com.au email: geoff@multitask.com.au
>
>
>
>
>
> Cagan Senturk <ca...@emirca.com>
> 17/01/2003 10:00 AM
> Please respond to "Struts Users Mailing List"
>
> To: struts-user@jakarta.apache.org
> cc:
> Subject: struts servlet-mapping
>
>
>
>>
>> Hello,
>> I am using Struts 1.1-b2 and Tomcat4.1.18.
>> My web app is deployed under a context named 'ppp'.
>> In web.xml, url-pattern for struts action servlet is set to '*.do':
>> <servlet-mapping>
>> <servlet-name>action</servlet-name>
>> <url-pattern>*.do</url-pattern>
>> </servlet-mapping>
>>
>> And in struts-config.xml, I have the following <action> element setup:
>> <action path="/test"
>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>> unknown="true"
>> validate="false">
>> </action>
>>
>> On my server, the following works: http://localhost:8080/ppp/test.do
>>
>> but the following doesn't: http://localhost:8080/ppp/layout/test.do
>>
>> Which means subdirectories within the context are not recognized by
>> struts in this setup... How can I fix this?
>> Thanks in advance.
>> Cagan
>>
>>
> Cagan Senturk
>
> Emirca Technologies, Inc.
> 75 Spring St. Floor #8
> NYC, NY 10012
>
> mailto:cagan@emirca.com
> http://www.emirca.com
>
>
> --
> To unsubscribe, e-mail: <
> mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:struts-user-help@jakarta.apache.org>
>
>
>
Cagan Senturk
Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012
mailto:cagan@emirca.com
http://www.emirca.com
--
To unsubscribe, e-mail: <
mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: struts servlet-mapping
Posted by ge...@multitask.com.au.
Excellent, good to hear.
Regards,
Geoff Bennett
Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462 Fax +61 2 9252 4636
www.multitask.com.au email: geoff@multitask.com.au
Cagan Senturk <ca...@emirca.com>
20/01/2003 03:36 PM
Please respond to "Struts Users Mailing List"
To: "Struts Users Mailing List"
<st...@jakarta.apache.org>
cc:
Subject: Re: struts servlet-mapping
Geoff,
thank you very much, that works!
I always return to the same layout jsp, so your solution fixes the
whole problem.
-Cagan
On Sunday, January 19, 2003, at 06:26 PM, geoff@multitask.com.au wrote:
> Cagan,
>
> using the <html:link> tag will solve your action calling problems:
> <html:link page="/link.do?urn=1334333" >Some link text here</html:link>
>
> this will produce the following link:
> <a href="/ppp/link.do?urn=1334333">Some link text here</a>
> use the paramId, paramName, paramProperty attributes if the 'urn'
> value is
> dynamic.
>
>
> But, I get the feeling that you want the action to forward to one of
> many
> tiles layout jsp's.
> One might be in 'p3/layout' and another in 'p4/layout'?
>
> If this is the case, then the only way I can guarantee that you will
> achieve this is to pass the value
> 'p3/layout' as a parameter and then pre-append it to your action's
> forward.
>
> I'm not saying that this is the only way, but it is the only one that I
> don't have to test to know that it will work :)
>
> Regards,
>
> Geoff Bennett
>
>
> Multitask Consulting Pty Ltd
> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
> Tel +61 2 9252 1462 Fax +61 2 9252 4636
> www.multitask.com.au email: geoff@multitask.com.au
>
>
>
>
>
> Cagan Senturk <ca...@emirca.com>
> 20/01/2003 09:43 AM
> Please respond to "Struts Users Mailing List"
>
> To: "Struts Users Mailing List"
> <st...@jakarta.apache.org>
> cc:
> Subject: Re: struts servlet-mapping
>
>
>
> Geoff,
> Thanks for your answer.
> The problem is '/layout' or another directory gets appended there by
> Tomcat at runtime..Here's the whole story:
> The content is generated by a content editor, and for internal links we
> specified that the client uses the following format:
> <a href="link.do?urn=1334333">Some link text here</a>
>
> When this content is loaded, and it's loaded by a Tiles layout jsp,
> Tomcat automatically reads it as :
> http://hostname:port/ppp/p3/layout/link.do?urn=1334333
> where 'ppp' is the name of the context and 'p3/layout' the path to the
> directory where the Tiles layout jsp resides.
>
> And I'm trying to get my web app to forward all 'link.do' requests to
> the same handler.
>
> I don't want to hardcode the directory structure into the struts-config
> when defining the <action> element...
>
> -Cagan
>
> On Sunday, January 19, 2003, at 05:02 PM, geoff@multitask.com.au
> wrote:
>
>> Is it important that '/layout' be part of the action path? why not
>> just
>> have '/test'?
>>
>> It sounds as if this is an action used in multiple context's, and if
>> you
>> don't want to make
>> multiple mapping's, then why not just have the one mapping that is
>> used
>> everywhere.
>>
>> The path in a mapping is just the name of the action on the server. It
>> doesn't relate back to a
>> directory structure, although, a path can be made to look that way.
>>
>>
>> Regards,
>>
>> Geoff Bennett
>>
>>
>> Multitask Consulting Pty Ltd
>> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
>> Tel +61 2 9252 1462 Fax +61 2 9252 4636
>> www.multitask.com.au email: geoff@multitask.com.au
>>
>>
>>
>>
>>
>> Cagan Senturk <ca...@emirca.com>
>> 17/01/2003 10:53 AM
>> Please respond to "Struts Users Mailing List"
>>
>> To: "Struts Users Mailing List"
>> <st...@jakarta.apache.org>
>> cc:
>> Subject: Re: struts servlet-mapping
>>
>>
>>
>> The thing is the /layout directory is determined at run-time; I don't
>> know what it will be a deployment time.
>> Thanks,
>> Cagan
>> On Thursday, January 16, 2003, at 06:18 PM, geoff@multitask.com.au
>> wrote:
>>
>>> If you want your action to be available from
>>> http://localhost:8080/ppp/layout/test.do
>>> then you need to make a mapping like this:
>>>
>>> <action path="/layout/test"
>>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>>> unknown="true"
>>> validate="false">
>>> </action>
>>>
>>>
>>> Regards,
>>>
>>> Geoff Bennett
>>>
>>>
>>> Multitask Consulting Pty Ltd
>>> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
>>> Tel +61 2 9252 1462 Fax +61 2 9252 4636
>>> www.multitask.com.au email: geoff@multitask.com.au
>>>
>>>
>>>
>>>
>>>
>>> Cagan Senturk <ca...@emirca.com>
>>> 17/01/2003 10:00 AM
>>> Please respond to "Struts Users Mailing List"
>>>
>>> To: struts-user@jakarta.apache.org
>>> cc:
>>> Subject: struts servlet-mapping
>>>
>>>
>>>
>>>>
>>>> Hello,
>>>> I am using Struts 1.1-b2 and Tomcat4.1.18.
>>>> My web app is deployed under a context named 'ppp'.
>>>> In web.xml, url-pattern for struts action servlet is set to '*.do':
>>>> <servlet-mapping>
>>>> <servlet-name>action</servlet-name>
>>>> <url-pattern>*.do</url-pattern>
>>>> </servlet-mapping>
>>>>
>>>> And in struts-config.xml, I have the following <action> element
>>>> setup:
>>>> <action path="/test"
>>>>
>>>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>>>> unknown="true"
>>>> validate="false">
>>>> </action>
>>>>
>>>> On my server, the following works:
>>>> http://localhost:8080/ppp/test.do
>>>>
>>>> but the following doesn't:
>>>> http://localhost:8080/ppp/layout/test.do
>>>>
>>>> Which means subdirectories within the context are not recognized by
>>>> struts in this setup...
>>>> How can I fix this?
>>>> Thanks in advance.
>>>> Cagan
>>>>
>>>>
>>> Cagan Senturk
>>>
>>> Emirca Technologies, Inc.
>>> 75 Spring St. Floor #8
>>> NYC, NY 10012
>>>
>>> mailto:cagan@emirca.com
>>> http://www.emirca.com
>>>
>>>
>>> --
>>> To unsubscribe, e-mail: <
>>> mailto:struts-user-unsubscribe@jakarta.apache.org>
>>> For additional commands, e-mail: <
>>> mailto:struts-user-help@jakarta.apache.org>
>>>
>>>
>>>
>> Cagan Senturk
>>
>> Emirca Technologies, Inc.
>> 75 Spring St. Floor #8
>> NYC, NY 10012
>>
>> mailto:cagan@emirca.com
>> http://www.emirca.com
>>
>>
>> --
>> To unsubscribe, e-mail: <
>> mailto:struts-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail: <
>> mailto:struts-user-help@jakarta.apache.org>
>>
>>
>>
> Cagan Senturk
>
> Emirca Technologies, Inc.
> 75 Spring St. Floor #8
> NYC, NY 10012
>
> mailto:cagan@emirca.com
> http://www.emirca.com
>
>
> --
> To unsubscribe, e-mail: <
> mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:struts-user-help@jakarta.apache.org>
>
>
>
Cagan Senturk
Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012
mailto:cagan@emirca.com
http://www.emirca.com
--
To unsubscribe, e-mail: <
mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@jakarta.apache.org>
Re: struts servlet-mapping
Posted by Cagan Senturk <ca...@emirca.com>.
Geoff,
thank you very much, that works!
I always return to the same layout jsp, so your solution fixes the
whole problem.
-Cagan
On Sunday, January 19, 2003, at 06:26 PM, geoff@multitask.com.au wrote:
> Cagan,
>
> using the <html:link> tag will solve your action calling problems:
> <html:link page="/link.do?urn=1334333" >Some link text here</html:link>
>
> this will produce the following link:
> <a href="/ppp/link.do?urn=1334333">Some link text here</a>
> use the paramId, paramName, paramProperty attributes if the 'urn'
> value is
> dynamic.
>
>
> But, I get the feeling that you want the action to forward to one of
> many
> tiles layout jsp's.
> One might be in 'p3/layout' and another in 'p4/layout'?
>
> If this is the case, then the only way I can guarantee that you will
> achieve this is to pass the value
> 'p3/layout' as a parameter and then pre-append it to your action's
> forward.
>
> I'm not saying that this is the only way, but it is the only one that I
> don't have to test to know that it will work :)
>
> Regards,
>
> Geoff Bennett
>
>
> Multitask Consulting Pty Ltd
> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
> Tel +61 2 9252 1462 Fax +61 2 9252 4636
> www.multitask.com.au email: geoff@multitask.com.au
>
>
>
>
>
> Cagan Senturk <ca...@emirca.com>
> 20/01/2003 09:43 AM
> Please respond to "Struts Users Mailing List"
>
> To: "Struts Users Mailing List"
> <st...@jakarta.apache.org>
> cc:
> Subject: Re: struts servlet-mapping
>
>
>
> Geoff,
> Thanks for your answer.
> The problem is '/layout' or another directory gets appended there by
> Tomcat at runtime..Here's the whole story:
> The content is generated by a content editor, and for internal links we
> specified that the client uses the following format:
> <a href="link.do?urn=1334333">Some link text here</a>
>
> When this content is loaded, and it's loaded by a Tiles layout jsp,
> Tomcat automatically reads it as :
> http://hostname:port/ppp/p3/layout/link.do?urn=1334333
> where 'ppp' is the name of the context and 'p3/layout' the path to the
> directory where the Tiles layout jsp resides.
>
> And I'm trying to get my web app to forward all 'link.do' requests to
> the same handler.
>
> I don't want to hardcode the directory structure into the struts-config
> when defining the <action> element...
>
> -Cagan
>
> On Sunday, January 19, 2003, at 05:02 PM, geoff@multitask.com.au
> wrote:
>
>> Is it important that '/layout' be part of the action path? why not
>> just
>> have '/test'?
>>
>> It sounds as if this is an action used in multiple context's, and if
>> you
>> don't want to make
>> multiple mapping's, then why not just have the one mapping that is
>> used
>> everywhere.
>>
>> The path in a mapping is just the name of the action on the server. It
>> doesn't relate back to a
>> directory structure, although, a path can be made to look that way.
>>
>>
>> Regards,
>>
>> Geoff Bennett
>>
>>
>> Multitask Consulting Pty Ltd
>> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
>> Tel +61 2 9252 1462 Fax +61 2 9252 4636
>> www.multitask.com.au email: geoff@multitask.com.au
>>
>>
>>
>>
>>
>> Cagan Senturk <ca...@emirca.com>
>> 17/01/2003 10:53 AM
>> Please respond to "Struts Users Mailing List"
>>
>> To: "Struts Users Mailing List"
>> <st...@jakarta.apache.org>
>> cc:
>> Subject: Re: struts servlet-mapping
>>
>>
>>
>> The thing is the /layout directory is determined at run-time; I don't
>> know what it will be a deployment time.
>> Thanks,
>> Cagan
>> On Thursday, January 16, 2003, at 06:18 PM, geoff@multitask.com.au
>> wrote:
>>
>>> If you want your action to be available from
>>> http://localhost:8080/ppp/layout/test.do
>>> then you need to make a mapping like this:
>>>
>>> <action path="/layout/test"
>>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>>> unknown="true"
>>> validate="false">
>>> </action>
>>>
>>>
>>> Regards,
>>>
>>> Geoff Bennett
>>>
>>>
>>> Multitask Consulting Pty Ltd
>>> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
>>> Tel +61 2 9252 1462 Fax +61 2 9252 4636
>>> www.multitask.com.au email: geoff@multitask.com.au
>>>
>>>
>>>
>>>
>>>
>>> Cagan Senturk <ca...@emirca.com>
>>> 17/01/2003 10:00 AM
>>> Please respond to "Struts Users Mailing List"
>>>
>>> To: struts-user@jakarta.apache.org
>>> cc:
>>> Subject: struts servlet-mapping
>>>
>>>
>>>
>>>>
>>>> Hello,
>>>> I am using Struts 1.1-b2 and Tomcat4.1.18.
>>>> My web app is deployed under a context named 'ppp'.
>>>> In web.xml, url-pattern for struts action servlet is set to '*.do':
>>>> <servlet-mapping>
>>>> <servlet-name>action</servlet-name>
>>>> <url-pattern>*.do</url-pattern>
>>>> </servlet-mapping>
>>>>
>>>> And in struts-config.xml, I have the following <action> element
>>>> setup:
>>>> <action path="/test"
>>>>
>>>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>>>> unknown="true"
>>>> validate="false">
>>>> </action>
>>>>
>>>> On my server, the following works:
>>>> http://localhost:8080/ppp/test.do
>>>>
>>>> but the following doesn't:
>>>> http://localhost:8080/ppp/layout/test.do
>>>>
>>>> Which means subdirectories within the context are not recognized by
>>>> struts in this setup...
>>>> How can I fix this?
>>>> Thanks in advance.
>>>> Cagan
>>>>
>>>>
>>> Cagan Senturk
>>>
>>> Emirca Technologies, Inc.
>>> 75 Spring St. Floor #8
>>> NYC, NY 10012
>>>
>>> mailto:cagan@emirca.com
>>> http://www.emirca.com
>>>
>>>
>>> --
>>> To unsubscribe, e-mail: <
>>> mailto:struts-user-unsubscribe@jakarta.apache.org>
>>> For additional commands, e-mail: <
>>> mailto:struts-user-help@jakarta.apache.org>
>>>
>>>
>>>
>> Cagan Senturk
>>
>> Emirca Technologies, Inc.
>> 75 Spring St. Floor #8
>> NYC, NY 10012
>>
>> mailto:cagan@emirca.com
>> http://www.emirca.com
>>
>>
>> --
>> To unsubscribe, e-mail: <
>> mailto:struts-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail: <
>> mailto:struts-user-help@jakarta.apache.org>
>>
>>
>>
> Cagan Senturk
>
> Emirca Technologies, Inc.
> 75 Spring St. Floor #8
> NYC, NY 10012
>
> mailto:cagan@emirca.com
> http://www.emirca.com
>
>
> --
> To unsubscribe, e-mail: <
> mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:struts-user-help@jakarta.apache.org>
>
>
>
Cagan Senturk
Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012
mailto:cagan@emirca.com
http://www.emirca.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: struts servlet-mapping
Posted by ge...@multitask.com.au.
Cagan,
using the <html:link> tag will solve your action calling problems:
<html:link page="/link.do?urn=1334333" >Some link text here</html:link>
this will produce the following link:
<a href="/ppp/link.do?urn=1334333">Some link text here</a>
use the paramId, paramName, paramProperty attributes if the 'urn' value is
dynamic.
But, I get the feeling that you want the action to forward to one of many
tiles layout jsp's.
One might be in 'p3/layout' and another in 'p4/layout'?
If this is the case, then the only way I can guarantee that you will
achieve this is to pass the value
'p3/layout' as a parameter and then pre-append it to your action's
forward.
I'm not saying that this is the only way, but it is the only one that I
don't have to test to know that it will work :)
Regards,
Geoff Bennett
Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462 Fax +61 2 9252 4636
www.multitask.com.au email: geoff@multitask.com.au
Cagan Senturk <ca...@emirca.com>
20/01/2003 09:43 AM
Please respond to "Struts Users Mailing List"
To: "Struts Users Mailing List"
<st...@jakarta.apache.org>
cc:
Subject: Re: struts servlet-mapping
Geoff,
Thanks for your answer.
The problem is '/layout' or another directory gets appended there by
Tomcat at runtime..Here's the whole story:
The content is generated by a content editor, and for internal links we
specified that the client uses the following format:
<a href="link.do?urn=1334333">Some link text here</a>
When this content is loaded, and it's loaded by a Tiles layout jsp,
Tomcat automatically reads it as :
http://hostname:port/ppp/p3/layout/link.do?urn=1334333
where 'ppp' is the name of the context and 'p3/layout' the path to the
directory where the Tiles layout jsp resides.
And I'm trying to get my web app to forward all 'link.do' requests to
the same handler.
I don't want to hardcode the directory structure into the struts-config
when defining the <action> element...
-Cagan
On Sunday, January 19, 2003, at 05:02 PM, geoff@multitask.com.au wrote:
> Is it important that '/layout' be part of the action path? why not just
> have '/test'?
>
> It sounds as if this is an action used in multiple context's, and if
> you
> don't want to make
> multiple mapping's, then why not just have the one mapping that is used
> everywhere.
>
> The path in a mapping is just the name of the action on the server. It
> doesn't relate back to a
> directory structure, although, a path can be made to look that way.
>
>
> Regards,
>
> Geoff Bennett
>
>
> Multitask Consulting Pty Ltd
> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
> Tel +61 2 9252 1462 Fax +61 2 9252 4636
> www.multitask.com.au email: geoff@multitask.com.au
>
>
>
>
>
> Cagan Senturk <ca...@emirca.com>
> 17/01/2003 10:53 AM
> Please respond to "Struts Users Mailing List"
>
> To: "Struts Users Mailing List"
> <st...@jakarta.apache.org>
> cc:
> Subject: Re: struts servlet-mapping
>
>
>
> The thing is the /layout directory is determined at run-time; I don't
> know what it will be a deployment time.
> Thanks,
> Cagan
> On Thursday, January 16, 2003, at 06:18 PM, geoff@multitask.com.au
> wrote:
>
>> If you want your action to be available from
>> http://localhost:8080/ppp/layout/test.do
>> then you need to make a mapping like this:
>>
>> <action path="/layout/test"
>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>> unknown="true"
>> validate="false">
>> </action>
>>
>>
>> Regards,
>>
>> Geoff Bennett
>>
>>
>> Multitask Consulting Pty Ltd
>> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
>> Tel +61 2 9252 1462 Fax +61 2 9252 4636
>> www.multitask.com.au email: geoff@multitask.com.au
>>
>>
>>
>>
>>
>> Cagan Senturk <ca...@emirca.com>
>> 17/01/2003 10:00 AM
>> Please respond to "Struts Users Mailing List"
>>
>> To: struts-user@jakarta.apache.org
>> cc:
>> Subject: struts servlet-mapping
>>
>>
>>
>>>
>>> Hello,
>>> I am using Struts 1.1-b2 and Tomcat4.1.18.
>>> My web app is deployed under a context named 'ppp'.
>>> In web.xml, url-pattern for struts action servlet is set to '*.do':
>>> <servlet-mapping>
>>> <servlet-name>action</servlet-name>
>>> <url-pattern>*.do</url-pattern>
>>> </servlet-mapping>
>>>
>>> And in struts-config.xml, I have the following <action> element
>>> setup:
>>> <action path="/test"
>>>
>>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>>> unknown="true"
>>> validate="false">
>>> </action>
>>>
>>> On my server, the following works:
>>> http://localhost:8080/ppp/test.do
>>>
>>> but the following doesn't:
>>> http://localhost:8080/ppp/layout/test.do
>>>
>>> Which means subdirectories within the context are not recognized by
>>> struts in this setup...
>>> How can I fix this?
>>> Thanks in advance.
>>> Cagan
>>>
>>>
>> Cagan Senturk
>>
>> Emirca Technologies, Inc.
>> 75 Spring St. Floor #8
>> NYC, NY 10012
>>
>> mailto:cagan@emirca.com
>> http://www.emirca.com
>>
>>
>> --
>> To unsubscribe, e-mail: <
>> mailto:struts-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail: <
>> mailto:struts-user-help@jakarta.apache.org>
>>
>>
>>
> Cagan Senturk
>
> Emirca Technologies, Inc.
> 75 Spring St. Floor #8
> NYC, NY 10012
>
> mailto:cagan@emirca.com
> http://www.emirca.com
>
>
> --
> To unsubscribe, e-mail: <
> mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:struts-user-help@jakarta.apache.org>
>
>
>
Cagan Senturk
Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012
mailto:cagan@emirca.com
http://www.emirca.com
--
To unsubscribe, e-mail: <
mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@jakarta.apache.org>
Re: struts servlet-mapping
Posted by Cagan Senturk <ca...@emirca.com>.
Geoff,
Thanks for your answer.
The problem is '/layout' or another directory gets appended there by
Tomcat at runtime..Here's the whole story:
The content is generated by a content editor, and for internal links we
specified that the client uses the following format:
<a href="link.do?urn=1334333">Some link text here</a>
When this content is loaded, and it's loaded by a Tiles layout jsp,
Tomcat automatically reads it as :
http://hostname:port/ppp/p3/layout/link.do?urn=1334333
where 'ppp' is the name of the context and 'p3/layout' the path to the
directory where the Tiles layout jsp resides.
And I'm trying to get my web app to forward all 'link.do' requests to
the same handler.
I don't want to hardcode the directory structure into the struts-config
when defining the <action> element...
-Cagan
On Sunday, January 19, 2003, at 05:02 PM, geoff@multitask.com.au wrote:
> Is it important that '/layout' be part of the action path? why not just
> have '/test'?
>
> It sounds as if this is an action used in multiple context's, and if
> you
> don't want to make
> multiple mapping's, then why not just have the one mapping that is used
> everywhere.
>
> The path in a mapping is just the name of the action on the server. It
> doesn't relate back to a
> directory structure, although, a path can be made to look that way.
>
>
> Regards,
>
> Geoff Bennett
>
>
> Multitask Consulting Pty Ltd
> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
> Tel +61 2 9252 1462 Fax +61 2 9252 4636
> www.multitask.com.au email: geoff@multitask.com.au
>
>
>
>
>
> Cagan Senturk <ca...@emirca.com>
> 17/01/2003 10:53 AM
> Please respond to "Struts Users Mailing List"
>
> To: "Struts Users Mailing List"
> <st...@jakarta.apache.org>
> cc:
> Subject: Re: struts servlet-mapping
>
>
>
> The thing is the /layout directory is determined at run-time; I don't
> know what it will be a deployment time.
> Thanks,
> Cagan
> On Thursday, January 16, 2003, at 06:18 PM, geoff@multitask.com.au
> wrote:
>
>> If you want your action to be available from
>> http://localhost:8080/ppp/layout/test.do
>> then you need to make a mapping like this:
>>
>> <action path="/layout/test"
>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>> unknown="true"
>> validate="false">
>> </action>
>>
>>
>> Regards,
>>
>> Geoff Bennett
>>
>>
>> Multitask Consulting Pty Ltd
>> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
>> Tel +61 2 9252 1462 Fax +61 2 9252 4636
>> www.multitask.com.au email: geoff@multitask.com.au
>>
>>
>>
>>
>>
>> Cagan Senturk <ca...@emirca.com>
>> 17/01/2003 10:00 AM
>> Please respond to "Struts Users Mailing List"
>>
>> To: struts-user@jakarta.apache.org
>> cc:
>> Subject: struts servlet-mapping
>>
>>
>>
>>>
>>> Hello,
>>> I am using Struts 1.1-b2 and Tomcat4.1.18.
>>> My web app is deployed under a context named 'ppp'.
>>> In web.xml, url-pattern for struts action servlet is set to '*.do':
>>> <servlet-mapping>
>>> <servlet-name>action</servlet-name>
>>> <url-pattern>*.do</url-pattern>
>>> </servlet-mapping>
>>>
>>> And in struts-config.xml, I have the following <action> element
>>> setup:
>>> <action path="/test"
>>>
>>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>>> unknown="true"
>>> validate="false">
>>> </action>
>>>
>>> On my server, the following works:
>>> http://localhost:8080/ppp/test.do
>>>
>>> but the following doesn't:
>>> http://localhost:8080/ppp/layout/test.do
>>>
>>> Which means subdirectories within the context are not recognized by
>>> struts in this setup...
>>> How can I fix this?
>>> Thanks in advance.
>>> Cagan
>>>
>>>
>> Cagan Senturk
>>
>> Emirca Technologies, Inc.
>> 75 Spring St. Floor #8
>> NYC, NY 10012
>>
>> mailto:cagan@emirca.com
>> http://www.emirca.com
>>
>>
>> --
>> To unsubscribe, e-mail: <
>> mailto:struts-user-unsubscribe@jakarta.apache.org>
>> For additional commands, e-mail: <
>> mailto:struts-user-help@jakarta.apache.org>
>>
>>
>>
> Cagan Senturk
>
> Emirca Technologies, Inc.
> 75 Spring St. Floor #8
> NYC, NY 10012
>
> mailto:cagan@emirca.com
> http://www.emirca.com
>
>
> --
> To unsubscribe, e-mail: <
> mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:struts-user-help@jakarta.apache.org>
>
>
>
Cagan Senturk
Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012
mailto:cagan@emirca.com
http://www.emirca.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: struts servlet-mapping
Posted by ge...@multitask.com.au.
Is it important that '/layout' be part of the action path? why not just
have '/test'?
It sounds as if this is an action used in multiple context's, and if you
don't want to make
multiple mapping's, then why not just have the one mapping that is used
everywhere.
The path in a mapping is just the name of the action on the server. It
doesn't relate back to a
directory structure, although, a path can be made to look that way.
Regards,
Geoff Bennett
Multitask Consulting Pty Ltd
Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
Tel +61 2 9252 1462 Fax +61 2 9252 4636
www.multitask.com.au email: geoff@multitask.com.au
Cagan Senturk <ca...@emirca.com>
17/01/2003 10:53 AM
Please respond to "Struts Users Mailing List"
To: "Struts Users Mailing List"
<st...@jakarta.apache.org>
cc:
Subject: Re: struts servlet-mapping
The thing is the /layout directory is determined at run-time; I don't
know what it will be a deployment time.
Thanks,
Cagan
On Thursday, January 16, 2003, at 06:18 PM, geoff@multitask.com.au
wrote:
> If you want your action to be available from
> http://localhost:8080/ppp/layout/test.do
> then you need to make a mapping like this:
>
> <action path="/layout/test"
> type="com.emirca.pp.controller.actionhandler.Welcomer"
> unknown="true"
> validate="false">
> </action>
>
>
> Regards,
>
> Geoff Bennett
>
>
> Multitask Consulting Pty Ltd
> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
> Tel +61 2 9252 1462 Fax +61 2 9252 4636
> www.multitask.com.au email: geoff@multitask.com.au
>
>
>
>
>
> Cagan Senturk <ca...@emirca.com>
> 17/01/2003 10:00 AM
> Please respond to "Struts Users Mailing List"
>
> To: struts-user@jakarta.apache.org
> cc:
> Subject: struts servlet-mapping
>
>
>
>>
>> Hello,
>> I am using Struts 1.1-b2 and Tomcat4.1.18.
>> My web app is deployed under a context named 'ppp'.
>> In web.xml, url-pattern for struts action servlet is set to '*.do':
>> <servlet-mapping>
>> <servlet-name>action</servlet-name>
>> <url-pattern>*.do</url-pattern>
>> </servlet-mapping>
>>
>> And in struts-config.xml, I have the following <action> element setup:
>> <action path="/test"
>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>> unknown="true"
>> validate="false">
>> </action>
>>
>> On my server, the following works:
>> http://localhost:8080/ppp/test.do
>>
>> but the following doesn't:
>> http://localhost:8080/ppp/layout/test.do
>>
>> Which means subdirectories within the context are not recognized by
>> struts in this setup...
>> How can I fix this?
>> Thanks in advance.
>> Cagan
>>
>>
> Cagan Senturk
>
> Emirca Technologies, Inc.
> 75 Spring St. Floor #8
> NYC, NY 10012
>
> mailto:cagan@emirca.com
> http://www.emirca.com
>
>
> --
> To unsubscribe, e-mail: <
> mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:struts-user-help@jakarta.apache.org>
>
>
>
Cagan Senturk
Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012
mailto:cagan@emirca.com
http://www.emirca.com
--
To unsubscribe, e-mail: <
mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <
mailto:struts-user-help@jakarta.apache.org>
Re: struts servlet-mapping
Posted by Cagan Senturk <ca...@emirca.com>.
The thing is the /layout directory is determined at run-time; I don't
know what it will be a deployment time.
Thanks,
Cagan
On Thursday, January 16, 2003, at 06:18 PM, geoff@multitask.com.au
wrote:
> If you want your action to be available from
> http://localhost:8080/ppp/layout/test.do
> then you need to make a mapping like this:
>
> <action path="/layout/test"
> type="com.emirca.pp.controller.actionhandler.Welcomer"
> unknown="true"
> validate="false">
> </action>
>
>
> Regards,
>
> Geoff Bennett
>
>
> Multitask Consulting Pty Ltd
> Level 8, 20 Loftus Street, Sydney NSW 2000 Australia
> Tel +61 2 9252 1462 Fax +61 2 9252 4636
> www.multitask.com.au email: geoff@multitask.com.au
>
>
>
>
>
> Cagan Senturk <ca...@emirca.com>
> 17/01/2003 10:00 AM
> Please respond to "Struts Users Mailing List"
>
> To: struts-user@jakarta.apache.org
> cc:
> Subject: struts servlet-mapping
>
>
>
>>
>> Hello,
>> I am using Struts 1.1-b2 and Tomcat4.1.18.
>> My web app is deployed under a context named 'ppp'.
>> In web.xml, url-pattern for struts action servlet is set to '*.do':
>> <servlet-mapping>
>> <servlet-name>action</servlet-name>
>> <url-pattern>*.do</url-pattern>
>> </servlet-mapping>
>>
>> And in struts-config.xml, I have the following <action> element setup:
>> <action path="/test"
>> type="com.emirca.pp.controller.actionhandler.Welcomer"
>> unknown="true"
>> validate="false">
>> </action>
>>
>> On my server, the following works:
>> http://localhost:8080/ppp/test.do
>>
>> but the following doesn't:
>> http://localhost:8080/ppp/layout/test.do
>>
>> Which means subdirectories within the context are not recognized by
>> struts in this setup...
>> How can I fix this?
>> Thanks in advance.
>> Cagan
>>
>>
> Cagan Senturk
>
> Emirca Technologies, Inc.
> 75 Spring St. Floor #8
> NYC, NY 10012
>
> mailto:cagan@emirca.com
> http://www.emirca.com
>
>
> --
> To unsubscribe, e-mail: <
> mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <
> mailto:struts-user-help@jakarta.apache.org>
>
>
>
Cagan Senturk
Emirca Technologies, Inc.
75 Spring St. Floor #8
NYC, NY 10012
mailto:cagan@emirca.com
http://www.emirca.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>