Hmm... I found this two different behaviors in the S2 documentation itself.
POST -> create , PUT -> update:
http://struts.apache.org/2.x/docs/rest-plugin.html
PUT -> create, POST -> update:
http://cwiki.apache.org/S2PLUGINS/restful-crud-for-html-methods.html
which one to choose? confused!
Thanks
Hi,
In S2 REST plugin, the url mapping convention is POST for create, PUT for
update (as with the Rails style).
But from Sun tuts (
http://java.sun.com/developer/technicalArticles/WebServices/restful/) I see
POST for update, PUT for create.
I observed similar behavior in lot many frameworks
On 29/01/2009, at 2:48 PM, Dave Newton wrote:
Bill Stilwell wrote:
To me, this implies that there needs to be code
to map whatever the particular model is to the needs of the RSS feed.
Well yeah.
I think maybe I'm just completely misunderstanding what your system
looks like. The systems I
Bill Stilwell wrote:
To me, this implies that there needs to be code
to map whatever the particular model is to the needs of the RSS feed.
Well yeah.
I think maybe I'm just completely misunderstanding what your system
looks like. The systems I've worked on tend to have a pretty orthogonal
ty
On Wed, Jan 28, 2009 at 6:45 PM, Dave Newton wrote:
> The action doesn't need to know; that's the point. The framework serializes
> the action based on the content type handler (CTH) registered to the URL
> extension.
>
> For example, the json extension uses a JSON serializer which will serialize
Bill Stilwell wrote:
The bit I'm having trouble figuring out is how the action would
> know that the model should be a SyndFeed object - is there a
> standard way to detect what extension was used when calling
the action? (I could parse it from request.getRequestURI(), but that
seems a bit ugly
Yup, but as mentioned in the original email I'm not sure where to
construct the SyndFeed object. Doing it in the content handler doesn't
really make sense, as there's no generic way to map objects to an
RSS/Atom feed. My basic idea is that the ContentTypeHandler would
expect to be passed a SyndFeed
Bill Stilwell wrote:
I'd like to solicit feedback on the best way to support .rss/.atom
requests when using the rest plugin.
Have you considered writing a custom content type handler? Content type
handlers are chosen based on URL extension.
Check the "Custom ContentTypeHandlers" section:
ht
Hi all,
I'd like to solicit feedback on the best way to support .rss/.atom
requests when using the rest plugin.
My first thought was to implement a generic ContentTypeHandler for
.rss or .atom requests that expects to be passed a Rome SyndFeed
object, but that implies that the getModel() method w
--- On Tue, 9/2/08, alvins wrote:
> However the problem is that when validation fails - I need
> an input result which is specific for each method.
As Jeremy said you'll probably have to do something with a custom workflow;
probably the easiest solution. I had a similar problem eons ago with wild
alvins wrote:
Hmm I might just have to do that. I am guessing alot of people will run into
this issue with the REST plugin - might be an idea to get some annotation
into conventions or rest plugin (not sure where it would go) to allow for
method specific result for validation failure? How do thes
" depending on the method.
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
View this message in context:
http://www.nabble.com/-S2--REST-Plugin-%2B-Validation-tp19230629p19268803.html
Sen
alvins wrote:
Thanks for the response Jeromy. I am actually already using that setting
actually - I have two sets of different validations - one on the create
method and one on the update method.
However the problem is that when validation fails - I need an input result
which is specific for eac
hope that clarifies the problem.
--
View this message in context:
http://www.nabble.com/-S2--REST-Plugin-%2B-Validation-tp19230629p19268377.html
Sent from the Struts - User mailing list archive at Nabble.com.
-
To unsubscribe, e
alvins wrote:
Hi guys,
I have been wrestling with the REST plugin for the last couple of days and
have posted some notes in another thread.
I have hit a problem which I need a little help with. Basically in my REST
controller I have a create and update method as per the REST guidelines. I
need
://www.nabble.com/S2%3A-input-by-method-for-validations-tp13611246p13611246.html.
Any ideas?
--
View this message in context:
http://www.nabble.com/-S2--REST-Plugin-%2B-Validation-tp19230629p19230629.html
Sent from the Struts - User mailing list archive at Nabble.com
Thanks Jeromy,
Yep, we did get the standard JEE security working in WAS.
(Fat-fingered typing in the web.xml was the culprit).
I'll have a look at the Sping option if we find the container stuff a
bit lacking.
Thanks again for your feedback.
Mike
2008/7/29 Jeromy Evans <[EMAIL PROTECTED]>:
>
>
If you don't have complex URL patterns, I'd continue down the JEE path.
It should work. Although I haven't tried it with websphere it's a
fundamental requirement of the container.
I'd temporarily switch to HTTP BASIC instead of LDAP to try isolate the
problem.
Yes, creating a custom Secur
I should probably add that I'm just trying to authenticate via LDAP at
this stage. Authorization will be implemented later.
2008/7/28 Mike Watson <[EMAIL PROTECTED]>:
> Hi Folks,
>
> What's the most straightforward way to secure my REST URLs?
>
> I'd assumed that I'd be able to use the standard JE
Hi Folks,
What's the most straightforward way to secure my REST URLs?
I'd assumed that I'd be able to use the standard JEE approach and
secure based on URL patterns but this doesn't seem to work (on
Websphere anyway) and I'm assuming it's to do with the fact everything
I'm doing is happening in f
Thanks mate. I'll give that a try tomorrow.
2008/7/24 Jeromy Evans <[EMAIL PROTECTED]>:
> Mike Watson wrote:
>>
>> What I actually return is a DefaultHttpHeaders with a 404 set.
>> getImage() returns an empty (not null) inputstream since there's no
>> content for the body.
>>
>>
>
> You may need t
Mike Watson wrote:
What I actually return is a DefaultHttpHeaders with a 404 set.
getImage() returns an empty (not null) inputstream since there's no
content for the body.
You may need to return a different result type for the error case
(HttpHeaderResult or NullResult) so it only attempts
What I actually return is a DefaultHttpHeaders with a 404 set.
getImage() returns an empty (not null) inputstream since there's no
content for the body.
I'll do some debugging when I get time and see where it's failing. It
certainly seems to be StreamResult that has the issue.
Thanks
Mike
2008/
Mike Watson wrote:
Hi folks,
As mentioned in previous posts I'm using the REST plugin to serve
images and everything seems to work fine when the content exists.
However if I return an empty inputstream to StreamResult with a 404
response code I get the exception below.
Stepping through the code
Hi folks,
As mentioned in previous posts I'm using the REST plugin to serve
images and everything seems to work fine when the content exists.
However if I return an empty inputstream to StreamResult with a 404
response code I get the exception below.
Stepping through the code the getBufferSize()
25 matches
Mail list logo