Re: S2 + REST urls

2008-08-26 Thread alvins

Hi guys,

Sorry to bring up an old thread but we really should get this patched - I am
testing out the latest struts with rest and this causes quite a-bit of a
head-ache.

I have resorted to extending Struts FilterDispatcher and putting some code
to chain the request if it matches prefixes set via an init-param. I can
provide a patch if necessary (not sure if it is the best way to serve static
resources though).

Alvin

-- 
View this message in context: 
http://www.nabble.com/S2-%2B-REST-urls-tp11811969p19174079.html
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: S2 + REST urls

2007-07-30 Thread meeboo

At the moment we are using URLRewrite to bypass all the trouble with S2
intercepting static content (we are also not using any action extension).
But it would be even better if the filter was patched :)


Ted Husted wrote:
> 
> It's possible that the use case of a an empty action extension was not
> considered when the filter was first designed. It does seem like a
> valid use case, and it may be time to patch the filter.
> 
> -Ted.
> 
> On 7/26/07, matihost <[EMAIL PROTECTED]> wrote:
>> I wondering why filter dispatcher do not check existence of mapping
>> returned from ActionMapper and if it doesn't exist, behave as when
>> ActionMapper is null. Probably it is faster for not empty
>> "struts.action.extension" actions.
>>
>> I found also solution to use /someName/* for struts filter dispatcher
>> mapping, but i don`t want to use it.
>>
>> --
>> Greetings
>> Mateusz Nowakowski
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/S2-%2B-REST-urls-tf4152090.html#a11862390
Sent from the Struts - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: S2 + REST urls

2007-07-29 Thread Aram Mkhitaryan
>
> I do not understand well. Do you mean to create new package in  sruts.xmland 
> add an action which serves static content ?
>
Exactly,

Best,
Aram

Aram Mkhitaryan

52, 25 Lvovyan, Yerevan 375000, Armenia

Mobile: +374 91 518456
E-mail: [EMAIL PROTECTED]


Re: S2 + REST urls

2007-07-27 Thread Ian Roughley
I have found the order is important in the struts.xml file - i.e. if you 
are changing a property that is being used by another (say the names of 
the mappers for the CompositeActionMapper), you need to add the 
declaration of the property and then define the object (the 
CompositeActionMapper) that uses it.


/Ian

matihost wrote:

First of all, put that constants in struts.properties file next to
struts.xml
there are some problems with constants defined in struts.xml, some of them
does not work correctly



Yes, you are right, for example constant "struts.locale" still is not loaded 
correctly when it is in struts.xml file.


  

Then, you can create your namespace and mappings for images and csses, this
will add security,
and you will be able to hide real resource names



I do not understand well. Do you mean to create new package in  sruts.xml and 
add an action which serves static content ?

  

Also, to use restful urls you need only DefaultActionMapper, the other ones
are parameter automappers of restful urls, I do not use them



Yes, i think about it also, and as i mentioned before, i create workaround own 
mapping to serve static content which extends DefaultActionMapper and serve 
static content when action name taken from DefaultActionMapper contains dot.

--  
Mateusz Nowakowski




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  


Re: Re: S2 + REST urls

2007-07-27 Thread matihost
> First of all, put that constants in struts.properties file next to
> struts.xml
> there are some problems with constants defined in struts.xml, some of them
> does not work correctly

Yes, you are right, for example constant "struts.locale" still is not loaded 
correctly when it is in struts.xml file.


> Then, you can create your namespace and mappings for images and csses, this
> will add security,
> and you will be able to hide real resource names

I do not understand well. Do you mean to create new package in  sruts.xml and 
add an action which serves static content ?

> Also, to use restful urls you need only DefaultActionMapper, the other ones
> are parameter automappers of restful urls, I do not use them

Yes, i think about it also, and as i mentioned before, i create workaround own 
mapping to serve static content which extends DefaultActionMapper and serve 
static content when action name taken from DefaultActionMapper contains dot.

--  
Mateusz Nowakowski



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: S2 + REST urls

2007-07-26 Thread Aram Mkhitaryan
First of all, put that constants in struts.properties file next to
struts.xml
there are some problems with constants defined in struts.xml, some of them
does not work correctly

Then, you can create your namespace and mappings for images and csses, this
will add security,
and you will be able to hide real resource names

Also, to use restful urls you need only DefaultActionMapper, the other ones
are parameter automappers of restful urls, I do not use them

You can define your actions like this


  
  
  
  
  


Best,
Aram

Aram Mkhitaryan

52, 25 Lvovyan, Yerevan 375000, Armenia

Mobile: +374 91 518456
E-mail: [EMAIL PROTECTED]


Re: S2 + REST urls

2007-07-26 Thread Ted Husted
It's possible that the use case of a an empty action extension was not
considered when the filter was first designed. It does seem like a
valid use case, and it may be time to patch the filter.

-Ted.

On 7/26/07, matihost <[EMAIL PROTECTED]> wrote:
> I wondering why filter dispatcher do not check existence of mapping returned 
> from ActionMapper and if it doesn't exist, behave as when ActionMapper is 
> null. Probably it is faster for not empty "struts.action.extension" actions.
>
> I found also solution to use /someName/* for struts filter dispatcher 
> mapping, but i don`t want to use it.
>
> --
> Greetings
> Mateusz Nowakowski

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]