You can subscribe to this list here.
| 2008 |
Jan
|
Feb
|
Mar
(16) |
Apr
(18) |
May
(13) |
Jun
(100) |
Jul
(165) |
Aug
(53) |
Sep
(41) |
Oct
(84) |
Nov
(113) |
Dec
(171) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(84) |
Feb
(30) |
Mar
(75) |
Apr
(113) |
May
(87) |
Jun
(96) |
Jul
(127) |
Aug
(106) |
Sep
(191) |
Oct
(142) |
Nov
(106) |
Dec
(83) |
| 2010 |
Jan
(62) |
Feb
(93) |
Mar
(92) |
Apr
(58) |
May
(52) |
Jun
(104) |
Jul
(109) |
Aug
(94) |
Sep
(75) |
Oct
(54) |
Nov
(65) |
Dec
(38) |
| 2011 |
Jan
(53) |
Feb
(84) |
Mar
(95) |
Apr
(24) |
May
(10) |
Jun
(49) |
Jul
(74) |
Aug
(23) |
Sep
(67) |
Oct
(21) |
Nov
(62) |
Dec
(50) |
| 2012 |
Jan
(26) |
Feb
(7) |
Mar
(9) |
Apr
(5) |
May
(13) |
Jun
(7) |
Jul
(18) |
Aug
(48) |
Sep
(58) |
Oct
(79) |
Nov
(19) |
Dec
(15) |
| 2013 |
Jan
(33) |
Feb
(21) |
Mar
(10) |
Apr
(22) |
May
(39) |
Jun
(31) |
Jul
(15) |
Aug
(6) |
Sep
(8) |
Oct
(1) |
Nov
(4) |
Dec
(3) |
| 2014 |
Jan
(17) |
Feb
(18) |
Mar
(15) |
Apr
(12) |
May
(11) |
Jun
(3) |
Jul
(10) |
Aug
(2) |
Sep
(3) |
Oct
(4) |
Nov
(4) |
Dec
(1) |
| 2015 |
Jan
|
Feb
(6) |
Mar
(5) |
Apr
(13) |
May
(2) |
Jun
(3) |
Jul
(1) |
Aug
(2) |
Sep
(6) |
Oct
(12) |
Nov
(12) |
Dec
(12) |
| 2016 |
Jan
(10) |
Feb
(3) |
Mar
(8) |
Apr
(4) |
May
(2) |
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
| 2017 |
Jan
(6) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
|
From: xia y. <y2...@ya...> - 2013-01-24 23:13:16
|
I am using it outside of JBoss,
How to manually register it? any sample code? web page I can find?
I checked the reasteasy-jackson-provider package, which appears to be very simple.
If I write my own reasteasy-jackson2-provider, how does resteasy find my provider?
thanks
David
________________________________
From: Bill Burke <bb...@re...>
To: res...@li...
Sent: Thursday, January 24, 2013 2:48 PM
Subject: Re: [Resteasy-developers] Use jackson 2.0 with Resteasy?
Can't use jackson 2.0 in JBoss AS7 yet. I don't have the resteasy files
either. If you're running outside of AS7, you can include the Jackson
JAX-RS libraries directly and manually register the providers.
On 1/24/2013 4:49 PM, xia you wrote:
> Hi all,
> How to use jackson 2.0 with resteasy/spring?
>
> I try to setup with jackson. and it obviously still looking for older
> jackson 1 class:
>
> 2013-01-24 13:35:15,871 [qtp1201491826-17] WARN RegisterBuiltin -
> NoClassDefFoundError: Unable to load builtin provider:
> org.jboss.resteasy.plugins.providers.jackson.ResteasyJacksonProvider
> java.lang.NoClassDefFoundError:
> org/codehaus/jackson/jaxrs/JacksonJsonProvider
>
> I guess
>
> <dependency>
> <groupId>org.jboss.resteasy</groupId>
>
> <artifactId>resteasy-jackson-provider</artifactId>
> <version>${resteasy.version}</version>
> </dependency>
> is the troubled one.
>
> Anything like resteasy-jackson2-provider?
>
> thanks
> David
>
>
>
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
>
>
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
_______________________________________________
Resteasy-developers mailing list
Res...@li...
https://lists.sourceforge.net/lists/listinfo/resteasy-developers |
|
From: Bill B. <bb...@re...> - 2013-01-24 22:48:52
|
Can't use jackson 2.0 in JBoss AS7 yet. I don't have the resteasy files
either. If you're running outside of AS7, you can include the Jackson
JAX-RS libraries directly and manually register the providers.
On 1/24/2013 4:49 PM, xia you wrote:
> Hi all,
> How to use jackson 2.0 with resteasy/spring?
>
> I try to setup with jackson. and it obviously still looking for older
> jackson 1 class:
>
> 2013-01-24 13:35:15,871 [qtp1201491826-17] WARN RegisterBuiltin -
> NoClassDefFoundError: Unable to load builtin provider:
> org.jboss.resteasy.plugins.providers.jackson.ResteasyJacksonProvider
> java.lang.NoClassDefFoundError:
> org/codehaus/jackson/jaxrs/JacksonJsonProvider
>
> I guess
>
> <dependency>
> <groupId>org.jboss.resteasy</groupId>
>
> <artifactId>resteasy-jackson-provider</artifactId>
> <version>${resteasy.version}</version>
> </dependency>
> is the troubled one.
>
> Anything like resteasy-jackson2-provider?
>
> thanks
> David
>
>
>
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnnow-d2d
>
>
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Bill B. <bb...@re...> - 2013-01-24 22:43:53
|
http://bill.burkecentral.com/2013/01/24/resteasy-3-0-beta-2-released-with-new-oauth-2-0-features/ -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: xia y. <y2...@ya...> - 2013-01-24 21:49:22
|
Hi all,
How to use jackson 2.0 with resteasy/spring?
I try to setup with jackson. and it obviously still looking for older jackson 1 class:
2013-01-24 13:35:15,871 [qtp1201491826-17] WARN RegisterBuiltin - NoClassDefFoundError: Unable to load builtin provider: org.jboss.resteasy.plugins.providers.jackson.ResteasyJacksonProvider
java.lang.NoClassDefFoundError: org/codehaus/jackson/jaxrs/JacksonJsonProvider
I guess
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson-provider</artifactId>
<version>${resteasy.version}</version>
</dependency>
is the troubled one.
Anything like resteasy-jackson2-provider?
thanks
David |
|
From: Bill B. <bb...@re...> - 2013-01-23 15:38:28
|
FYI -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Bill B. <bb...@re...> - 2013-01-23 15:12:55
|
I made all the constructors of ResteasyClient class package protected. You must now use the ResteasyClientBuilder class to build instances of ResteasyClient if you don't use the standard ClientFactory class. Also, the ResteasyProviderFactory that each ResteasyCLient uses no longer comes from ResteasyProviderFactory.getInstance() by default. Instead, it instantiates a factory or client instance. I had to change a LOT of unit tests, so you may want to do a merge if you are working from master. -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Bill B. <bb...@re...> - 2013-01-22 19:24:42
|
Good stuff Xavier! On 1/22/2013 12:48 PM, Josiah Haswell wrote: > Hi Xavier, > > Thanks for the response! Glassfish notified me of the issue when I > deployed it, but the JAX-RS tooling support from Eclipse is very > helpful. Thanks! > > Josiah > > From: Xavier Coulon <xc...@re... <mailto:xc...@re...>> > Date: Tue, 22 Jan 2013 09:23:47 +0000 > To: "res...@li... > <mailto:res...@li...>" > <res...@li... > <mailto:res...@li...>> > Subject: Re: [Resteasy-developers] HTTP Status 404 - Could not find > resource for elative > > Hi Josiah, > > If you're an Eclipse user, you could give a try to the JAX-RS tooling > that comes with JBoss Tools and JBoss Developer Studio, as it can detect > this kind of problem (amongst others). I'll add more validation rules > according to the spec for the next release, too. > > I'm also interested in users' feedback, so feel free to react if you > find bugs or missing features ;-) > > Best regards, > Xavier > >> Hi Josiah, >> >> Your 'list()' method is not 'public', as required by JAX-RS spec, you >> should use 'public' method as your restful api. >> >> -- >> Weinan Li >> >> On Thursday, January 10, 2013 at 11:00 AM, Josiah Haswell wrote: >> >>> Hi everyone, >>> >>> I've been Googling around for this, and none of the solutions I've >>> found have worked for me. I'm trying to build a RESTEasy-enabled >>> application on Jboss 7.1.1 with Gradle. I have the relevant >>> configuration detailed towards the bottom of the message, but I >>> *see* that the application is being deployed in the logs when I visit >>> that URL: >>> >>> 19:43:46,458 INFO [org.jboss.web] (MSC service thread 1-1) >>> JBAS018210: Registering web context: /impl >>> 19:43:46,474 INFO [org.jboss.as.server] >>> (HttpManagementService-threads - 4) JBAS018559: Deployed "impl.war" >>> 19:43:53,533 INFO [org.jboss.resteasy.cdi.CdiInjectorFactory] >>> (http--127.0.0.1-8080-1) Found BeanManager at java:comp/BeanManager >>> 19:43:53,542 INFO [org.jboss.resteasy.spi.ResteasyDeployment] >>> (http--127.0.0.1-8080-1) Deploying javax.ws.rs.core.Application: >>> class example.JaxRsActivator$Proxy$_$$_WeldClientProxy >>> >>> But I receive the following error when I deploy the WAR and visit >>> http://localhost:8080/impl/rest/user/list: >>> >>> >>> HTTP Status 404 - Could not find resource for relative : /user/list >>> of full path: http://127.0.0.1:8080/impl/rest/user/list >>> >>> >>> What am I doing wrong? >>> >>> Thanks! >>> >>> Joe >>> >>> *Configuration:* >>> >>> src/main/webapp/WEB-INF/web.xml <http://web.xml/> (empty except for >>> the opening/closing tags) >>> >>> >>> example.JaxRsActivator: >>> >>> @ApplicationPath("/rest") >>> public class JaxRsActivator extends Application >>> { >>> } >>> >>> example.UserEndpoint: >>> >>> @Path("user") >>> public class UserEndpoint >>> { >>> >>> @Inject >>> UserService userService; >>> >>> @GET >>> @Path("list") >>> List<User> list() { >>> User user = new User(); >>> user.setFirstName("Test"); >>> user.setLastName("User"); >>> return new ArrayList<User>(Arrays.asList(user)); >>> } >>> >>> } >>> >>> >>> ------------------------------------------------------------------------------ >>> Master Visual Studio, SharePoint, SQL, ASP.NET <http://ASP.NET/>, C# >>> 2012, HTML5, CSS, >>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >>> MVPs and experts. ON SALE this month only -- learn more at: >>> http://p.sf.net/sfu/learnmore_122712 >>> _______________________________________________ >>> Resteasy-developers mailing list >>> Res...@li... >>> <mailto:Res...@li...> >>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers >> >> ------------------------------------------------------------------------------ >> Master Visual Studio, SharePoint, SQL, ASP.NET <http://ASP.NET/>, C# >> 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >> MVPs and experts. ON SALE this month only -- learn more at: >> http://p.sf.net/sfu/learnmore_122712 >> _______________________________________________ >> Resteasy-developers mailing list >> Res...@li... >> <mailto:Res...@li...> >> https://lists.sourceforge.net/lists/listinfo/resteasy-developers > > > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnnow-d2d > > > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-developers > -- Bill Burke JBoss, a division of Red Hat http://bill.burkecentral.com |
|
From: Josiah H. <jha...@el...> - 2013-01-22 17:48:59
|
Hi Xavier, Thanks for the response! Glassfish notified me of the issue when I deployed it, but the JAX-RS tooling support from Eclipse is very helpful. Thanks! Josiah From: Xavier Coulon <xc...@re...<mailto:xc...@re...>> Date: Tue, 22 Jan 2013 09:23:47 +0000 To: "res...@li...<mailto:res...@li...>" <res...@li...<mailto:res...@li...>> Subject: Re: [Resteasy-developers] HTTP Status 404 - Could not find resource for elative Hi Josiah, If you're an Eclipse user, you could give a try to the JAX-RS tooling that comes with JBoss Tools and JBoss Developer Studio, as it can detect this kind of problem (amongst others). I'll add more validation rules according to the spec for the next release, too. I'm also interested in users' feedback, so feel free to react if you find bugs or missing features ;-) Best regards, Xavier Hi Josiah, Your 'list()' method is not 'public', as required by JAX-RS spec, you should use 'public' method as your restful api. -- Weinan Li On Thursday, January 10, 2013 at 11:00 AM, Josiah Haswell wrote: Hi everyone, I've been Googling around for this, and none of the solutions I've found have worked for me. I'm trying to build a RESTEasy-enabled application on Jboss 7.1.1 with Gradle. I have the relevant configuration detailed towards the bottom of the message, but I see that the application is being deployed in the logs when I visit that URL: 19:43:46,458 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /impl 19:43:46,474 INFO [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS018559: Deployed "impl.war" 19:43:53,533 INFO [org.jboss.resteasy.cdi.CdiInjectorFactory] (http--127.0.0.1-8080-1) Found BeanManager at java:comp/BeanManager 19:43:53,542 INFO [org.jboss.resteasy.spi.ResteasyDeployment] (http--127.0.0.1-8080-1) Deploying javax.ws.rs.core.Application: class example.JaxRsActivator$Proxy$_$$_WeldClientProxy But I receive the following error when I deploy the WAR and visit http://localhost:8080/impl/rest/user/list: HTTP Status 404 - Could not find resource for relative : /user/list of full path: http://127.0.0.1:8080/impl/rest/user/list What am I doing wrong? Thanks! Joe Configuration: src/main/webapp/WEB-INF/web.xml<http://web.xml/> (empty except for the opening/closing tags) example.JaxRsActivator: @ApplicationPath("/rest") public class JaxRsActivator extends Application { } example.UserEndpoint: @Path("user") public class UserEndpoint { @Inject UserService userService; @GET @Path("list") List<User> list() { User user = new User(); user.setFirstName("Test"); user.setLastName("User"); return new ArrayList<User>(Arrays.asList(user)); } } ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET<http://ASP.NET/>, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ Resteasy-developers mailing list Res...@li...<mailto:Res...@li...> https://lists.sourceforge.net/lists/listinfo/resteasy-developers ------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET<http://ASP.NET/>, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnmore_122712 _______________________________________________ Resteasy-developers mailing list Res...@li...<mailto:Res...@li...> https://lists.sourceforge.net/lists/listinfo/resteasy-developers |
|
From: Denica G. <den...@gm...> - 2013-01-22 09:49:51
|
Hi,
I'm facing the following problem:
@Path("/my_path")
@Produces(MediaType.TEXT_HTML)
public interface MyService {
@GET
Response readAction(@QueryParam("action") String action);
@POST
Response postReadAction(@FormParam("action") String action)
}
$ curl -d "action=test" "http://myserver/my_path"
action: test
e.g. the action parameter in the body is read and this is the expected
answer.
$ curl -d "action=test1" "http://myserver/my_path?action=test"
action: test1
This is also OK, the verb is POST and the action value is test1 (as it is
in the body).
$ curl -d "action=test" "http://myserver/my_path?action=test"
action:
In this case (action parameter appears as form and query parameter and has
a same value) the action parameter value is missing.
Can someone help with this one?
|
|
From: Xavier C. <xc...@re...> - 2013-01-22 09:23:59
|
Hi Josiah,
If you're an Eclipse user, you could give a try to the JAX-RS tooling that comes with JBoss Tools and JBoss Developer Studio, as it can detect this kind of problem (amongst others). I'll add more validation rules according to the spec for the next release, too.
I'm also interested in users' feedback, so feel free to react if you find bugs or missing features ;-)
Best regards,
Xavier
> Hi Josiah,
>
> Your 'list()' method is not 'public', as required by JAX-RS spec, you should use 'public' method as your restful api.
>
> --
> Weinan Li
>
> On Thursday, January 10, 2013 at 11:00 AM, Josiah Haswell wrote:
>
>> Hi everyone,
>>
>> I've been Googling around for this, and none of the solutions I've found have worked for me. I'm trying to build a RESTEasy-enabled application on Jboss 7.1.1 with Gradle. I have the relevant configuration detailed towards the bottom of the message, but I see that the application is being deployed in the logs when I visit that URL:
>>
>> 19:43:46,458 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /impl
>> 19:43:46,474 INFO [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS018559: Deployed "impl.war"
>> 19:43:53,533 INFO [org.jboss.resteasy.cdi.CdiInjectorFactory] (http--127.0.0.1-8080-1) Found BeanManager at java:comp/BeanManager
>> 19:43:53,542 INFO [org.jboss.resteasy.spi.ResteasyDeployment] (http--127.0.0.1-8080-1) Deploying javax.ws.rs.core.Application: class example.JaxRsActivator$Proxy$_$$_WeldClientProxy
>>
>> But I receive the following error when I deploy the WAR and visit http://localhost:8080/impl/rest/user/list:
>> HTTP Status 404 - Could not find resource for relative : /user/list of full path: http://127.0.0.1:8080/impl/rest/user/list
>>
>>
>> What am I doing wrong?
>>
>> Thanks!
>>
>> Joe
>>
>> Configuration:
>>
>> src/main/webapp/WEB-INF/web.xml (empty except for the opening/closing tags)
>>
>>
>> example.JaxRsActivator:
>>
>> @ApplicationPath("/rest")
>> public class JaxRsActivator extends Application
>> {
>> }
>>
>> example.UserEndpoint:
>>
>> @Path("user")
>> public class UserEndpoint
>> {
>>
>> @Inject
>> UserService userService;
>>
>> @GET
>> @Path("list")
>> List<User> list() {
>> User user = new User();
>> user.setFirstName("Test");
>> user.setLastName("User");
>> return new ArrayList<User>(Arrays.asList(user));
>> }
>>
>> }
>>
>>
>> ------------------------------------------------------------------------------
>> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
>> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
>> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
>> MVPs and experts. ON SALE this month only -- learn more at:
>> http://p.sf.net/sfu/learnmore_122712
>> _______________________________________________
>> Resteasy-developers mailing list
>> Res...@li...
>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122712
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
|
|
From: Bill B. <bb...@re...> - 2013-01-21 18:39:16
|
i DON'T KNOw, maybe spring has already initialized after you registered
the processors?
On 1/21/2013 1:04 PM, Fritz Richter wrote:
> Hi everybody,
> it is so frustrating so I hope you are able to help me with my current
> problem.
>
> I have got the following technology stack:
>
> - Spring 3.1
> - Servlet 3 environment
> - Resteasy
>
> I want to raise up a Resteasy Rest API as a second Servlet. The beans
> are configured in my root context. In our project we are not using the
> web.xml nor any xml-configuration but
> configuring everything via a WebApplicationInitializer (Servlet 3).
>
> The problem is, that the usual way is to use the XML approach, where the
> SpringContextLoaderListener does not extend the new Constructor, which
> takes the root context.
>
> I tried to use the following approach:
>
> public abstract class AbstractWebAppInitializer implements
> WebApplicationInitializer {
> @Override
> public void onStartup(ServletContext servletContext) throws
> ServletException {
> servletContext.addListener(new ResteasyBootstrap());
> servletContext.addListener(new ContextLoaderListener(getRootContext()));
> initResteasy(servletContext);
> }
> ...
> private void initResteasy(ServletContext servletContext) {
> ResteasyProviderFactory providerFactory = (ResteasyProviderFactory)
> servletContext.getAttribute(ResteasyProviderFactory.class.getName());
> if (providerFactory == null) throw new RuntimeException(
> "RESTeasy Provider Factory is null, do you have the ResteasyBootstrap
> listener configured?");
>
> Registry registry = (Registry)
> servletContext.getAttribute(Registry.class.getName());
> if (registry == null) throw new RuntimeException(
> "RESTeasy Registry is null, do ou have the ResteasyBootstrap listener
> configured?");
>
> Dispatcher dispatcher = (Dispatcher)
> servletContext.getAttribute(Dispatcher.class.getName());
> if (dispatcher == null) throw new RuntimeException(
> "RESTeasy Dispatcher is null, do ou have the ResteasyBootstrap listener
> configured?");
>
> SpringBeanProcessor processor = new SpringBeanProcessor(dispatcher,
> registry, providerFactory);
> getRootContext().addBeanFactoryPostProcessor(processor);
> getRootContext().addApplicationListener(processor);
> }
> }
>
> What basically happens is, that in the first step the Resteasy beans are
> registered in the servletContext, and later they should be used as
> BeanPostProcessors, I guess that the Postprocessor is searching
> for jax-rs annotated beans, so they can be exposed via Resteasy.
>
> But my solution is not working, as to the time of the initResteasy()
> call, the beans are not registered already.
>
> There there anybody, who was able to use Resteasy in such a Servlet3
> configuration already?
>
> Thanks so much in advance.
>
> P.S. The reason for my approach is, that I tried to switch from Jersey
> to Resteasy, as Jesey made a lot of trouble with different versions etc.
> And I do not want to use Springs default Rest implementation, as jax-rs
> is pretty straight forward.
>
>
>
>
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122412
>
>
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Fritz R. <fr...@ad...> - 2013-01-21 18:29:22
|
Hi everybody,
it is so frustrating so I hope you are able to help me with my current problem.
I have got the following technology stack:
- Spring 3.1
- Servlet 3 environment
- Resteasy
I want to raise up a Resteasy Rest API as a second Servlet. The beans are configured in my root context. In our project we are not using the web.xml nor any xml-configuration but
configuring everything via a WebApplicationInitializer (Servlet 3).
The problem is, that the usual way is to use the XML approach, where the SpringContextLoaderListener does not extend the new Constructor, which takes the root context.
I tried to use the following approach:
public abstract class AbstractWebAppInitializer implements WebApplicationInitializer {
@Override
public void onStartup(ServletContext servletContext) throws ServletException {
servletContext.addListener(new ResteasyBootstrap());
servletContext.addListener(new ContextLoaderListener(getRootContext()));
initResteasy(servletContext);
}
...
private void initResteasy(ServletContext servletContext) {
ResteasyProviderFactory providerFactory = (ResteasyProviderFactory) servletContext.getAttribute(ResteasyProviderFactory.class.getName());
if (providerFactory == null) throw new RuntimeException(
"RESTeasy Provider Factory is null, do you have the ResteasyBootstrap listener configured?");
Registry registry = (Registry) servletContext.getAttribute(Registry.class.getName());
if (registry == null) throw new RuntimeException(
"RESTeasy Registry is null, do ou have the ResteasyBootstrap listener configured?");
Dispatcher dispatcher = (Dispatcher) servletContext.getAttribute(Dispatcher.class.getName());
if (dispatcher == null) throw new RuntimeException(
"RESTeasy Dispatcher is null, do ou have the ResteasyBootstrap listener configured?");
SpringBeanProcessor processor = new SpringBeanProcessor(dispatcher, registry, providerFactory);
getRootContext().addBeanFactoryPostProcessor(processor);
getRootContext().addApplicationListener(processor);
}
}
What basically happens is, that in the first step the Resteasy beans are registered in the servletContext, and later they should be used as BeanPostProcessors, I guess that the Postprocessor is searching
for jax-rs annotated beans, so they can be exposed via Resteasy.
But my solution is not working, as to the time of the initResteasy() call, the beans are not registered already.
There there anybody, who was able to use Resteasy in such a Servlet3 configuration already?
Thanks so much in advance.
P.S. The reason for my approach is, that I tried to switch from Jersey to Resteasy, as Jesey made a lot of trouble with different versions etc. And I do not want to use Springs default Rest implementation, as jax-rs is pretty straight forward.
|
|
From: Solomon D. <sd...@gm...> - 2013-01-18 21:27:53
|
Interesting bug. I'll take a look at this.
-Solomon
On Fri, Jan 18, 2013 at 2:33 PM, Bill Burke <bb...@re...> wrote:
> Ah, ok. That can be fixed. Log a jira please
>
> On 1/18/2013 10:00 AM, Dave Minter wrote:
> > But this is hooked up via Spring so I'm actually using a Spring
> > DispatcherServlet which hands off to JaxRS to handle the actual request
> > via the default configuration in springmvc-resteasy.xml
> >
> > I'm fairly sure Spring DispatcherServlet can field non-default HTTP
> > verbs but I'll double-check.
> >
> >
> > On Fri, Jan 18, 2013 at 2:55 PM, Bill Burke <bb...@re...
> > <mailto:bb...@re...>> wrote:
> >
> > Resteasy does override the service method. see HttpServletDispatcher
> >
> > On 1/18/2013 9:47 AM, Dave Minter wrote:
> > > No, that's just the default behaviour if you don't override the
> > service
> > > method in a servlet. If you hook up the following servlet in
> > web.xml you
> > > get the outputs that you'd hope for:
> > >
> > > public class ResetServlet extends HttpServlet {
> > > private static final long serialVersionUID = 1L;
> > >
> > > public ResetServlet() {
> > > super();
> > > }
> > >
> > > @Override
> > > protected void service(final HttpServletRequest request, final
> > > HttpServletResponse response) throws ServletException,
> IOException {
> > > if ("RESET".equals(request.getMethod())) {
> > > response.getWriter().write("<html><body><p>Received a RESET
> > > request!</p></body></html>");
> > > } else {
> > > response.getWriter().write(String.format("<html><body><p>Received
> > some
> > > other (%s) request.</p></body></html>", request.getMethod()));
> > > }
> > > }
> > > }
> > >
> > >
> > >
> > >
> > > On Fri, Jan 18, 2013 at 1:54 PM, Bill Burke <bb...@re...
> > <mailto:bb...@re...>
> > > <mailto:bb...@re... <mailto:bb...@re...>>> wrote:
> > >
> > > I agree with Robert's earlier post, but are you sure this
> > isn't Tomcat
> > > barfing on you? There's really nothing I can do about that.
> > >
> > > On 1/18/2013 5:23 AM, Dave Minter wrote:
> > > >
> > > > res...@li...
> > <mailto:res...@li...>
> > > <mailto:res...@li...
> > <mailto:res...@li...>>
> > > > <mailto:res...@li...
> > <mailto:res...@li...>
> > > <mailto:res...@li...
> > <mailto:res...@li...>>>
> > > >
> > > > I'd like to use custom HTTP verbs with resteasy running
> under
> > > Tomcat. Is
> > > > this possible? If it is possible is it sensible?
> > > >
> > > > I'm using resteasy 2.3.4.Final with Spring 3.1.2-RELEASE
> > and I've
> > > > created a custom HttpMethod annotation for the new verb:
> > > >
> > > > @Target({ ElementType.METHOD })
> > > > @Retention(RetentionPolicy.RUNTIME)
> > > > @HttpMethod("RESET")
> > > > public @interface RESET {
> > > > }
> > > >
> > > > Spring is configured in the servlet application context
> > with the
> > > default
> > > > resteasy config thus:
> > > >
> > > > <tx:annotation-driven />
> > > > <import resource="classpath:springmvc-resteasy.xml" />
> > > >
> > > > The new method in the controller is implemented thus:
> > > >
> > > > @RESET
> > > > @Path("/{uuid}")
> > > > public void reset(@PathParam("uuid") final String uuid) {
> > > > // Reset the model state...
> > > > }
> > > >
> > > > My other controller methods work fine for the normal
> > > GET,PUT,POST,DELETE
> > > > verbs but for the custom verb I get the following error
> > message
> > > from Tomcat:
> > > >
> > > > HTTP Status 501 - Method RESET is not defined in RFC 2068
> > and is not
> > > > supported by the Servlet API
> > > >
> > > > That message seems to be the same one that you get with a
> > default
> > > > servlet implementation so I presume I need to configure the
> > > > ResteasyHandlerMapping somehow...?
> > > >
> > > >
> > > >
> > > >
> > >
> >
> ------------------------------------------------------------------------------
> > > > Master HTML5, CSS3, ASP.NET <http://ASP.NET>
> > <http://ASP.NET>, MVC, AJAX,
> > > Knockout.js, Web API and
> > > > much more. Get web development skills now with LearnDevNow
> -
> > > > 350+ hours of step-by-step video tutorials by Microsoft
> > MVPs and
> > > experts.
> > > > SALE $99.99 this month only -- learn more at:
> > > > http://p.sf.net/sfu/learnmore_122812
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Resteasy-developers mailing list
> > > > Res...@li...
> > <mailto:Res...@li...>
> > > <mailto:Res...@li...
> > <mailto:Res...@li...>>
> > > >
> > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> > > >
> > >
> > > --
> > > Bill Burke
> > > JBoss, a division of Red Hat
> > > http://bill.burkecentral.com
> > >
> > >
> >
> ------------------------------------------------------------------------------
> > > Master HTML5, CSS3, ASP.NET <http://ASP.NET>
> > <http://ASP.NET>, MVC, AJAX,
> > > Knockout.js, Web API and
> > > much more. Get web development skills now with LearnDevNow -
> > > 350+ hours of step-by-step video tutorials by Microsoft MVPs
> and
> > > experts.
> > > SALE $99.99 this month only -- learn more at:
> > > http://p.sf.net/sfu/learnmore_122812
> > > _______________________________________________
> > > Resteasy-developers mailing list
> > > Res...@li...
> > <mailto:Res...@li...>
> > > <mailto:Res...@li...
> > <mailto:Res...@li...>>
> > > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> > >
> > >
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------------
> > > Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
> > Knockout.js, Web API and
> > > much more. Get web development skills now with LearnDevNow -
> > > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
> > experts.
> > > SALE $99.99 this month only -- learn more at:
> > > http://p.sf.net/sfu/learnmore_122812
> > >
> > >
> > >
> > > _______________________________________________
> > > Resteasy-developers mailing list
> > > Res...@li...
> > <mailto:Res...@li...>
> > > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> > >
> >
> > --
> > Bill Burke
> > JBoss, a division of Red Hat
> > http://bill.burkecentral.com
> >
> >
> ------------------------------------------------------------------------------
> > Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
> > Knockout.js, Web API and
> > much more. Get web development skills now with LearnDevNow -
> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
> > experts.
> > SALE $99.99 this month only -- learn more at:
> > http://p.sf.net/sfu/learnmore_122812
> > _______________________________________________
> > Resteasy-developers mailing list
> > Res...@li...
> > <mailto:Res...@li...>
> > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> >
> >
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
>
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
> much more. Get web development skills now with LearnDevNow -
> 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122812
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
|
|
From: Bill B. <bb...@re...> - 2013-01-18 19:33:18
|
Ah, ok. That can be fixed. Log a jira please
On 1/18/2013 10:00 AM, Dave Minter wrote:
> But this is hooked up via Spring so I'm actually using a Spring
> DispatcherServlet which hands off to JaxRS to handle the actual request
> via the default configuration in springmvc-resteasy.xml
>
> I'm fairly sure Spring DispatcherServlet can field non-default HTTP
> verbs but I'll double-check.
>
>
> On Fri, Jan 18, 2013 at 2:55 PM, Bill Burke <bb...@re...
> <mailto:bb...@re...>> wrote:
>
> Resteasy does override the service method. see HttpServletDispatcher
>
> On 1/18/2013 9:47 AM, Dave Minter wrote:
> > No, that's just the default behaviour if you don't override the
> service
> > method in a servlet. If you hook up the following servlet in
> web.xml you
> > get the outputs that you'd hope for:
> >
> > public class ResetServlet extends HttpServlet {
> > private static final long serialVersionUID = 1L;
> >
> > public ResetServlet() {
> > super();
> > }
> >
> > @Override
> > protected void service(final HttpServletRequest request, final
> > HttpServletResponse response) throws ServletException, IOException {
> > if ("RESET".equals(request.getMethod())) {
> > response.getWriter().write("<html><body><p>Received a RESET
> > request!</p></body></html>");
> > } else {
> > response.getWriter().write(String.format("<html><body><p>Received
> some
> > other (%s) request.</p></body></html>", request.getMethod()));
> > }
> > }
> > }
> >
> >
> >
> >
> > On Fri, Jan 18, 2013 at 1:54 PM, Bill Burke <bb...@re...
> <mailto:bb...@re...>
> > <mailto:bb...@re... <mailto:bb...@re...>>> wrote:
> >
> > I agree with Robert's earlier post, but are you sure this
> isn't Tomcat
> > barfing on you? There's really nothing I can do about that.
> >
> > On 1/18/2013 5:23 AM, Dave Minter wrote:
> > >
> > > res...@li...
> <mailto:res...@li...>
> > <mailto:res...@li...
> <mailto:res...@li...>>
> > > <mailto:res...@li...
> <mailto:res...@li...>
> > <mailto:res...@li...
> <mailto:res...@li...>>>
> > >
> > > I'd like to use custom HTTP verbs with resteasy running under
> > Tomcat. Is
> > > this possible? If it is possible is it sensible?
> > >
> > > I'm using resteasy 2.3.4.Final with Spring 3.1.2-RELEASE
> and I've
> > > created a custom HttpMethod annotation for the new verb:
> > >
> > > @Target({ ElementType.METHOD })
> > > @Retention(RetentionPolicy.RUNTIME)
> > > @HttpMethod("RESET")
> > > public @interface RESET {
> > > }
> > >
> > > Spring is configured in the servlet application context
> with the
> > default
> > > resteasy config thus:
> > >
> > > <tx:annotation-driven />
> > > <import resource="classpath:springmvc-resteasy.xml" />
> > >
> > > The new method in the controller is implemented thus:
> > >
> > > @RESET
> > > @Path("/{uuid}")
> > > public void reset(@PathParam("uuid") final String uuid) {
> > > // Reset the model state...
> > > }
> > >
> > > My other controller methods work fine for the normal
> > GET,PUT,POST,DELETE
> > > verbs but for the custom verb I get the following error
> message
> > from Tomcat:
> > >
> > > HTTP Status 501 - Method RESET is not defined in RFC 2068
> and is not
> > > supported by the Servlet API
> > >
> > > That message seems to be the same one that you get with a
> default
> > > servlet implementation so I presume I need to configure the
> > > ResteasyHandlerMapping somehow...?
> > >
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------------
> > > Master HTML5, CSS3, ASP.NET <http://ASP.NET>
> <http://ASP.NET>, MVC, AJAX,
> > Knockout.js, Web API and
> > > much more. Get web development skills now with LearnDevNow -
> > > 350+ hours of step-by-step video tutorials by Microsoft
> MVPs and
> > experts.
> > > SALE $99.99 this month only -- learn more at:
> > > http://p.sf.net/sfu/learnmore_122812
> > >
> > >
> > >
> > > _______________________________________________
> > > Resteasy-developers mailing list
> > > Res...@li...
> <mailto:Res...@li...>
> > <mailto:Res...@li...
> <mailto:Res...@li...>>
> > >
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> > >
> >
> > --
> > Bill Burke
> > JBoss, a division of Red Hat
> > http://bill.burkecentral.com
> >
> >
> ------------------------------------------------------------------------------
> > Master HTML5, CSS3, ASP.NET <http://ASP.NET>
> <http://ASP.NET>, MVC, AJAX,
> > Knockout.js, Web API and
> > much more. Get web development skills now with LearnDevNow -
> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
> > experts.
> > SALE $99.99 this month only -- learn more at:
> > http://p.sf.net/sfu/learnmore_122812
> > _______________________________________________
> > Resteasy-developers mailing list
> > Res...@li...
> <mailto:Res...@li...>
> > <mailto:Res...@li...
> <mailto:Res...@li...>>
> > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
> Knockout.js, Web API and
> > much more. Get web development skills now with LearnDevNow -
> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
> experts.
> > SALE $99.99 this month only -- learn more at:
> > http://p.sf.net/sfu/learnmore_122812
> >
> >
> >
> > _______________________________________________
> > Resteasy-developers mailing list
> > Res...@li...
> <mailto:Res...@li...>
> > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> >
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
> Knockout.js, Web API and
> much more. Get web development skills now with LearnDevNow -
> 350+ hours of step-by-step video tutorials by Microsoft MVPs and
> experts.
> SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122812
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> <mailto:Res...@li...>
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Dave M. <da...@pa...> - 2013-01-18 16:10:01
|
Ah, ok. So, I stand corrected. RESTeasy *can* do this. It's the Spring
RequestDispatcher that was barfing on the unfamiliar method. For anyone
else wanting to commit this sin...
I created the following controller to see what would actually be handled by
Spring itself:
@Controller
@RequestMapping("/reset")
public class ResetController {
@RequestMapping
public void reset(final HttpServletRequest request, final
HttpServletResponse response) throws Exception {
final String method = request.getMethod();
final PrintWriter writer = response.getWriter();
writer.write(String.format("<html><body><p>%s</p></body></html>", method));
writer.flush();
}
}
Contrary to my expectation that failed with the Tomcat error message. So a
little rummaging produced the following Spring forum posting:
http://forum.springsource.org/showthread.php?53472-DispatcherServlet-ServletWrappingController-with-JackRabbit-SimpleWevdavServlet&p=178514#post178514
I pretty much cribbed that as follows:
public class PromiscuousDispatcherServlet extends DispatcherServlet {
private static final long serialVersionUID = 3006276017308264614L;
@Override
protected void service(final HttpServletRequest req, final
HttpServletResponse resp) throws ServletException, java.io.IOException {
try {
doService(req, resp);
} catch (final Exception e) {
throw new ServletException("Failure during servlet dispatch", e);
}
}
}
By substituting the PromiscuousDispatcherServlet for the real Spring ones I
now find my @RESET annotation is honoured in the RESTeasy controller.
Now to get a cuppa tea and consider the morality of actually using it... :-)
Thanks.
On Fri, Jan 18, 2013 at 3:01 PM, Dave Minter <da...@pa...> wrote:
> (Hands off to RESTeasy, not JaxRS I should have said)
>
>
> On Fri, Jan 18, 2013 at 3:00 PM, Dave Minter <da...@pa...> wrote:
>
>> But this is hooked up via Spring so I'm actually using a Spring
>> DispatcherServlet which hands off to JaxRS to handle the actual request via
>> the default configuration in springmvc-resteasy.xml
>>
>> I'm fairly sure Spring DispatcherServlet can field non-default HTTP verbs
>> but I'll double-check.
>>
>>
>> On Fri, Jan 18, 2013 at 2:55 PM, Bill Burke <bb...@re...> wrote:
>>
>>> Resteasy does override the service method. see HttpServletDispatcher
>>>
>>> On 1/18/2013 9:47 AM, Dave Minter wrote:
>>> > No, that's just the default behaviour if you don't override the service
>>> > method in a servlet. If you hook up the following servlet in web.xml
>>> you
>>> > get the outputs that you'd hope for:
>>> >
>>> > public class ResetServlet extends HttpServlet {
>>> > private static final long serialVersionUID = 1L;
>>> >
>>> > public ResetServlet() {
>>> > super();
>>> > }
>>> >
>>> > @Override
>>> > protected void service(final HttpServletRequest request, final
>>> > HttpServletResponse response) throws ServletException, IOException {
>>> > if ("RESET".equals(request.getMethod())) {
>>> > response.getWriter().write("<html><body><p>Received a RESET
>>> > request!</p></body></html>");
>>> > } else {
>>> > response.getWriter().write(String.format("<html><body><p>Received some
>>> > other (%s) request.</p></body></html>", request.getMethod()));
>>> > }
>>> > }
>>> > }
>>> >
>>> >
>>> >
>>> >
>>> > On Fri, Jan 18, 2013 at 1:54 PM, Bill Burke <bb...@re...
>>> > <mailto:bb...@re...>> wrote:
>>> >
>>> > I agree with Robert's earlier post, but are you sure this isn't
>>> Tomcat
>>> > barfing on you? There's really nothing I can do about that.
>>> >
>>> > On 1/18/2013 5:23 AM, Dave Minter wrote:
>>> > >
>>> > > res...@li...
>>> > <mailto:res...@li...>
>>> > > <mailto:res...@li...
>>> > <mailto:res...@li...>>
>>> > >
>>> > > I'd like to use custom HTTP verbs with resteasy running under
>>> > Tomcat. Is
>>> > > this possible? If it is possible is it sensible?
>>> > >
>>> > > I'm using resteasy 2.3.4.Final with Spring 3.1.2-RELEASE and
>>> I've
>>> > > created a custom HttpMethod annotation for the new verb:
>>> > >
>>> > > @Target({ ElementType.METHOD })
>>> > > @Retention(RetentionPolicy.RUNTIME)
>>> > > @HttpMethod("RESET")
>>> > > public @interface RESET {
>>> > > }
>>> > >
>>> > > Spring is configured in the servlet application context with the
>>> > default
>>> > > resteasy config thus:
>>> > >
>>> > > <tx:annotation-driven />
>>> > > <import resource="classpath:springmvc-resteasy.xml" />
>>> > >
>>> > > The new method in the controller is implemented thus:
>>> > >
>>> > > @RESET
>>> > > @Path("/{uuid}")
>>> > > public void reset(@PathParam("uuid") final String uuid) {
>>> > > // Reset the model state...
>>> > > }
>>> > >
>>> > > My other controller methods work fine for the normal
>>> > GET,PUT,POST,DELETE
>>> > > verbs but for the custom verb I get the following error message
>>> > from Tomcat:
>>> > >
>>> > > HTTP Status 501 - Method RESET is not defined in RFC 2068 and
>>> is not
>>> > > supported by the Servlet API
>>> > >
>>> > > That message seems to be the same one that you get with a
>>> default
>>> > > servlet implementation so I presume I need to configure the
>>> > > ResteasyHandlerMapping somehow...?
>>> > >
>>> > >
>>> > >
>>> > >
>>> >
>>> ------------------------------------------------------------------------------
>>> > > Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
>>> > Knockout.js, Web API and
>>> > > much more. Get web development skills now with LearnDevNow -
>>> > > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
>>> > experts.
>>> > > SALE $99.99 this month only -- learn more at:
>>> > > http://p.sf.net/sfu/learnmore_122812
>>> > >
>>> > >
>>> > >
>>> > > _______________________________________________
>>> > > Resteasy-developers mailing list
>>> > > Res...@li...
>>> > <mailto:Res...@li...>
>>> > >
>>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>>> > >
>>> >
>>> > --
>>> > Bill Burke
>>> > JBoss, a division of Red Hat
>>> > http://bill.burkecentral.com
>>> >
>>> >
>>> ------------------------------------------------------------------------------
>>> > Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
>>> > Knockout.js, Web API and
>>> > much more. Get web development skills now with LearnDevNow -
>>> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
>>> > experts.
>>> > SALE $99.99 this month only -- learn more at:
>>> > http://p.sf.net/sfu/learnmore_122812
>>> > _______________________________________________
>>> > Resteasy-developers mailing list
>>> > Res...@li...
>>> > <mailto:Res...@li...>
>>> > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>>> >
>>> >
>>> >
>>> >
>>> >
>>> ------------------------------------------------------------------------------
>>> > Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
>>> > much more. Get web development skills now with LearnDevNow -
>>> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
>>> experts.
>>> > SALE $99.99 this month only -- learn more at:
>>> > http://p.sf.net/sfu/learnmore_122812
>>> >
>>> >
>>> >
>>> > _______________________________________________
>>> > Resteasy-developers mailing list
>>> > Res...@li...
>>> > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>>> >
>>>
>>> --
>>> Bill Burke
>>> JBoss, a division of Red Hat
>>> http://bill.burkecentral.com
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
>>> much more. Get web development skills now with LearnDevNow -
>>> 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
>>> SALE $99.99 this month only -- learn more at:
>>> http://p.sf.net/sfu/learnmore_122812
>>> _______________________________________________
>>> Resteasy-developers mailing list
>>> Res...@li...
>>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>>>
>>
>>
>
|
|
From: Dave M. <da...@pa...> - 2013-01-18 15:01:47
|
(Hands off to RESTeasy, not JaxRS I should have said)
On Fri, Jan 18, 2013 at 3:00 PM, Dave Minter <da...@pa...> wrote:
> But this is hooked up via Spring so I'm actually using a Spring
> DispatcherServlet which hands off to JaxRS to handle the actual request via
> the default configuration in springmvc-resteasy.xml
>
> I'm fairly sure Spring DispatcherServlet can field non-default HTTP verbs
> but I'll double-check.
>
>
> On Fri, Jan 18, 2013 at 2:55 PM, Bill Burke <bb...@re...> wrote:
>
>> Resteasy does override the service method. see HttpServletDispatcher
>>
>> On 1/18/2013 9:47 AM, Dave Minter wrote:
>> > No, that's just the default behaviour if you don't override the service
>> > method in a servlet. If you hook up the following servlet in web.xml you
>> > get the outputs that you'd hope for:
>> >
>> > public class ResetServlet extends HttpServlet {
>> > private static final long serialVersionUID = 1L;
>> >
>> > public ResetServlet() {
>> > super();
>> > }
>> >
>> > @Override
>> > protected void service(final HttpServletRequest request, final
>> > HttpServletResponse response) throws ServletException, IOException {
>> > if ("RESET".equals(request.getMethod())) {
>> > response.getWriter().write("<html><body><p>Received a RESET
>> > request!</p></body></html>");
>> > } else {
>> > response.getWriter().write(String.format("<html><body><p>Received some
>> > other (%s) request.</p></body></html>", request.getMethod()));
>> > }
>> > }
>> > }
>> >
>> >
>> >
>> >
>> > On Fri, Jan 18, 2013 at 1:54 PM, Bill Burke <bb...@re...
>> > <mailto:bb...@re...>> wrote:
>> >
>> > I agree with Robert's earlier post, but are you sure this isn't
>> Tomcat
>> > barfing on you? There's really nothing I can do about that.
>> >
>> > On 1/18/2013 5:23 AM, Dave Minter wrote:
>> > >
>> > > res...@li...
>> > <mailto:res...@li...>
>> > > <mailto:res...@li...
>> > <mailto:res...@li...>>
>> > >
>> > > I'd like to use custom HTTP verbs with resteasy running under
>> > Tomcat. Is
>> > > this possible? If it is possible is it sensible?
>> > >
>> > > I'm using resteasy 2.3.4.Final with Spring 3.1.2-RELEASE and I've
>> > > created a custom HttpMethod annotation for the new verb:
>> > >
>> > > @Target({ ElementType.METHOD })
>> > > @Retention(RetentionPolicy.RUNTIME)
>> > > @HttpMethod("RESET")
>> > > public @interface RESET {
>> > > }
>> > >
>> > > Spring is configured in the servlet application context with the
>> > default
>> > > resteasy config thus:
>> > >
>> > > <tx:annotation-driven />
>> > > <import resource="classpath:springmvc-resteasy.xml" />
>> > >
>> > > The new method in the controller is implemented thus:
>> > >
>> > > @RESET
>> > > @Path("/{uuid}")
>> > > public void reset(@PathParam("uuid") final String uuid) {
>> > > // Reset the model state...
>> > > }
>> > >
>> > > My other controller methods work fine for the normal
>> > GET,PUT,POST,DELETE
>> > > verbs but for the custom verb I get the following error message
>> > from Tomcat:
>> > >
>> > > HTTP Status 501 - Method RESET is not defined in RFC 2068 and is
>> not
>> > > supported by the Servlet API
>> > >
>> > > That message seems to be the same one that you get with a default
>> > > servlet implementation so I presume I need to configure the
>> > > ResteasyHandlerMapping somehow...?
>> > >
>> > >
>> > >
>> > >
>> >
>> ------------------------------------------------------------------------------
>> > > Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
>> > Knockout.js, Web API and
>> > > much more. Get web development skills now with LearnDevNow -
>> > > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
>> > experts.
>> > > SALE $99.99 this month only -- learn more at:
>> > > http://p.sf.net/sfu/learnmore_122812
>> > >
>> > >
>> > >
>> > > _______________________________________________
>> > > Resteasy-developers mailing list
>> > > Res...@li...
>> > <mailto:Res...@li...>
>> > > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>> > >
>> >
>> > --
>> > Bill Burke
>> > JBoss, a division of Red Hat
>> > http://bill.burkecentral.com
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
>> > Knockout.js, Web API and
>> > much more. Get web development skills now with LearnDevNow -
>> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
>> > experts.
>> > SALE $99.99 this month only -- learn more at:
>> > http://p.sf.net/sfu/learnmore_122812
>> > _______________________________________________
>> > Resteasy-developers mailing list
>> > Res...@li...
>> > <mailto:Res...@li...>
>> > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>> >
>> >
>> >
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
>> > much more. Get web development skills now with LearnDevNow -
>> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
>> experts.
>> > SALE $99.99 this month only -- learn more at:
>> > http://p.sf.net/sfu/learnmore_122812
>> >
>> >
>> >
>> > _______________________________________________
>> > Resteasy-developers mailing list
>> > Res...@li...
>> > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>> >
>>
>> --
>> Bill Burke
>> JBoss, a division of Red Hat
>> http://bill.burkecentral.com
>>
>>
>> ------------------------------------------------------------------------------
>> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
>> much more. Get web development skills now with LearnDevNow -
>> 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
>> SALE $99.99 this month only -- learn more at:
>> http://p.sf.net/sfu/learnmore_122812
>> _______________________________________________
>> Resteasy-developers mailing list
>> Res...@li...
>> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>>
>
>
|
|
From: Dave M. <da...@pa...> - 2013-01-18 15:00:13
|
But this is hooked up via Spring so I'm actually using a Spring
DispatcherServlet which hands off to JaxRS to handle the actual request via
the default configuration in springmvc-resteasy.xml
I'm fairly sure Spring DispatcherServlet can field non-default HTTP verbs
but I'll double-check.
On Fri, Jan 18, 2013 at 2:55 PM, Bill Burke <bb...@re...> wrote:
> Resteasy does override the service method. see HttpServletDispatcher
>
> On 1/18/2013 9:47 AM, Dave Minter wrote:
> > No, that's just the default behaviour if you don't override the service
> > method in a servlet. If you hook up the following servlet in web.xml you
> > get the outputs that you'd hope for:
> >
> > public class ResetServlet extends HttpServlet {
> > private static final long serialVersionUID = 1L;
> >
> > public ResetServlet() {
> > super();
> > }
> >
> > @Override
> > protected void service(final HttpServletRequest request, final
> > HttpServletResponse response) throws ServletException, IOException {
> > if ("RESET".equals(request.getMethod())) {
> > response.getWriter().write("<html><body><p>Received a RESET
> > request!</p></body></html>");
> > } else {
> > response.getWriter().write(String.format("<html><body><p>Received some
> > other (%s) request.</p></body></html>", request.getMethod()));
> > }
> > }
> > }
> >
> >
> >
> >
> > On Fri, Jan 18, 2013 at 1:54 PM, Bill Burke <bb...@re...
> > <mailto:bb...@re...>> wrote:
> >
> > I agree with Robert's earlier post, but are you sure this isn't
> Tomcat
> > barfing on you? There's really nothing I can do about that.
> >
> > On 1/18/2013 5:23 AM, Dave Minter wrote:
> > >
> > > res...@li...
> > <mailto:res...@li...>
> > > <mailto:res...@li...
> > <mailto:res...@li...>>
> > >
> > > I'd like to use custom HTTP verbs with resteasy running under
> > Tomcat. Is
> > > this possible? If it is possible is it sensible?
> > >
> > > I'm using resteasy 2.3.4.Final with Spring 3.1.2-RELEASE and I've
> > > created a custom HttpMethod annotation for the new verb:
> > >
> > > @Target({ ElementType.METHOD })
> > > @Retention(RetentionPolicy.RUNTIME)
> > > @HttpMethod("RESET")
> > > public @interface RESET {
> > > }
> > >
> > > Spring is configured in the servlet application context with the
> > default
> > > resteasy config thus:
> > >
> > > <tx:annotation-driven />
> > > <import resource="classpath:springmvc-resteasy.xml" />
> > >
> > > The new method in the controller is implemented thus:
> > >
> > > @RESET
> > > @Path("/{uuid}")
> > > public void reset(@PathParam("uuid") final String uuid) {
> > > // Reset the model state...
> > > }
> > >
> > > My other controller methods work fine for the normal
> > GET,PUT,POST,DELETE
> > > verbs but for the custom verb I get the following error message
> > from Tomcat:
> > >
> > > HTTP Status 501 - Method RESET is not defined in RFC 2068 and is
> not
> > > supported by the Servlet API
> > >
> > > That message seems to be the same one that you get with a default
> > > servlet implementation so I presume I need to configure the
> > > ResteasyHandlerMapping somehow...?
> > >
> > >
> > >
> > >
> >
> ------------------------------------------------------------------------------
> > > Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
> > Knockout.js, Web API and
> > > much more. Get web development skills now with LearnDevNow -
> > > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
> > experts.
> > > SALE $99.99 this month only -- learn more at:
> > > http://p.sf.net/sfu/learnmore_122812
> > >
> > >
> > >
> > > _______________________________________________
> > > Resteasy-developers mailing list
> > > Res...@li...
> > <mailto:Res...@li...>
> > > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> > >
> >
> > --
> > Bill Burke
> > JBoss, a division of Red Hat
> > http://bill.burkecentral.com
> >
> >
> ------------------------------------------------------------------------------
> > Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
> > Knockout.js, Web API and
> > much more. Get web development skills now with LearnDevNow -
> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
> > experts.
> > SALE $99.99 this month only -- learn more at:
> > http://p.sf.net/sfu/learnmore_122812
> > _______________________________________________
> > Resteasy-developers mailing list
> > Res...@li...
> > <mailto:Res...@li...>
> > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
> > much more. Get web development skills now with LearnDevNow -
> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> > SALE $99.99 this month only -- learn more at:
> > http://p.sf.net/sfu/learnmore_122812
> >
> >
> >
> > _______________________________________________
> > Resteasy-developers mailing list
> > Res...@li...
> > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> >
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
>
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
> much more. Get web development skills now with LearnDevNow -
> 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122812
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
|
|
From: Bill B. <bb...@re...> - 2013-01-18 14:55:31
|
Resteasy does override the service method. see HttpServletDispatcher
On 1/18/2013 9:47 AM, Dave Minter wrote:
> No, that's just the default behaviour if you don't override the service
> method in a servlet. If you hook up the following servlet in web.xml you
> get the outputs that you'd hope for:
>
> public class ResetServlet extends HttpServlet {
> private static final long serialVersionUID = 1L;
>
> public ResetServlet() {
> super();
> }
>
> @Override
> protected void service(final HttpServletRequest request, final
> HttpServletResponse response) throws ServletException, IOException {
> if ("RESET".equals(request.getMethod())) {
> response.getWriter().write("<html><body><p>Received a RESET
> request!</p></body></html>");
> } else {
> response.getWriter().write(String.format("<html><body><p>Received some
> other (%s) request.</p></body></html>", request.getMethod()));
> }
> }
> }
>
>
>
>
> On Fri, Jan 18, 2013 at 1:54 PM, Bill Burke <bb...@re...
> <mailto:bb...@re...>> wrote:
>
> I agree with Robert's earlier post, but are you sure this isn't Tomcat
> barfing on you? There's really nothing I can do about that.
>
> On 1/18/2013 5:23 AM, Dave Minter wrote:
> >
> > res...@li...
> <mailto:res...@li...>
> > <mailto:res...@li...
> <mailto:res...@li...>>
> >
> > I'd like to use custom HTTP verbs with resteasy running under
> Tomcat. Is
> > this possible? If it is possible is it sensible?
> >
> > I'm using resteasy 2.3.4.Final with Spring 3.1.2-RELEASE and I've
> > created a custom HttpMethod annotation for the new verb:
> >
> > @Target({ ElementType.METHOD })
> > @Retention(RetentionPolicy.RUNTIME)
> > @HttpMethod("RESET")
> > public @interface RESET {
> > }
> >
> > Spring is configured in the servlet application context with the
> default
> > resteasy config thus:
> >
> > <tx:annotation-driven />
> > <import resource="classpath:springmvc-resteasy.xml" />
> >
> > The new method in the controller is implemented thus:
> >
> > @RESET
> > @Path("/{uuid}")
> > public void reset(@PathParam("uuid") final String uuid) {
> > // Reset the model state...
> > }
> >
> > My other controller methods work fine for the normal
> GET,PUT,POST,DELETE
> > verbs but for the custom verb I get the following error message
> from Tomcat:
> >
> > HTTP Status 501 - Method RESET is not defined in RFC 2068 and is not
> > supported by the Servlet API
> >
> > That message seems to be the same one that you get with a default
> > servlet implementation so I presume I need to configure the
> > ResteasyHandlerMapping somehow...?
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
> Knockout.js, Web API and
> > much more. Get web development skills now with LearnDevNow -
> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
> experts.
> > SALE $99.99 this month only -- learn more at:
> > http://p.sf.net/sfu/learnmore_122812
> >
> >
> >
> > _______________________________________________
> > Resteasy-developers mailing list
> > Res...@li...
> <mailto:Res...@li...>
> > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> >
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
> Knockout.js, Web API and
> much more. Get web development skills now with LearnDevNow -
> 350+ hours of step-by-step video tutorials by Microsoft MVPs and
> experts.
> SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122812
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> <mailto:Res...@li...>
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
>
>
>
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
> much more. Get web development skills now with LearnDevNow -
> 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122812
>
>
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Dave M. <da...@pa...> - 2013-01-18 14:47:37
|
No, that's just the default behaviour if you don't override the service
method in a servlet. If you hook up the following servlet in web.xml you
get the outputs that you'd hope for:
public class ResetServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public ResetServlet() {
super();
}
@Override
protected void service(final HttpServletRequest request, final
HttpServletResponse response) throws ServletException, IOException {
if ("RESET".equals(request.getMethod())) {
response.getWriter().write("<html><body><p>Received a RESET
request!</p></body></html>");
} else {
response.getWriter().write(String.format("<html><body><p>Received some
other (%s) request.</p></body></html>", request.getMethod()));
}
}
}
On Fri, Jan 18, 2013 at 1:54 PM, Bill Burke <bb...@re...> wrote:
> I agree with Robert's earlier post, but are you sure this isn't Tomcat
> barfing on you? There's really nothing I can do about that.
>
> On 1/18/2013 5:23 AM, Dave Minter wrote:
> >
> > res...@li...
> > <mailto:res...@li...>
> >
> > I'd like to use custom HTTP verbs with resteasy running under Tomcat. Is
> > this possible? If it is possible is it sensible?
> >
> > I'm using resteasy 2.3.4.Final with Spring 3.1.2-RELEASE and I've
> > created a custom HttpMethod annotation for the new verb:
> >
> > @Target({ ElementType.METHOD })
> > @Retention(RetentionPolicy.RUNTIME)
> > @HttpMethod("RESET")
> > public @interface RESET {
> > }
> >
> > Spring is configured in the servlet application context with the default
> > resteasy config thus:
> >
> > <tx:annotation-driven />
> > <import resource="classpath:springmvc-resteasy.xml" />
> >
> > The new method in the controller is implemented thus:
> >
> > @RESET
> > @Path("/{uuid}")
> > public void reset(@PathParam("uuid") final String uuid) {
> > // Reset the model state...
> > }
> >
> > My other controller methods work fine for the normal GET,PUT,POST,DELETE
> > verbs but for the custom verb I get the following error message from
> Tomcat:
> >
> > HTTP Status 501 - Method RESET is not defined in RFC 2068 and is not
> > supported by the Servlet API
> >
> > That message seems to be the same one that you get with a default
> > servlet implementation so I presume I need to configure the
> > ResteasyHandlerMapping somehow...?
> >
> >
> >
> >
> ------------------------------------------------------------------------------
> > Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
> > much more. Get web development skills now with LearnDevNow -
> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> > SALE $99.99 this month only -- learn more at:
> > http://p.sf.net/sfu/learnmore_122812
> >
> >
> >
> > _______________________________________________
> > Resteasy-developers mailing list
> > Res...@li...
> > https://lists.sourceforge.net/lists/listinfo/resteasy-developers
> >
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
>
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
> much more. Get web development skills now with LearnDevNow -
> 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122812
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
|
|
From: Bill B. <bb...@re...> - 2013-01-18 13:54:39
|
I agree with Robert's earlier post, but are you sure this isn't Tomcat
barfing on you? There's really nothing I can do about that.
On 1/18/2013 5:23 AM, Dave Minter wrote:
>
> res...@li...
> <mailto:res...@li...>
>
> I'd like to use custom HTTP verbs with resteasy running under Tomcat. Is
> this possible? If it is possible is it sensible?
>
> I'm using resteasy 2.3.4.Final with Spring 3.1.2-RELEASE and I've
> created a custom HttpMethod annotation for the new verb:
>
> @Target({ ElementType.METHOD })
> @Retention(RetentionPolicy.RUNTIME)
> @HttpMethod("RESET")
> public @interface RESET {
> }
>
> Spring is configured in the servlet application context with the default
> resteasy config thus:
>
> <tx:annotation-driven />
> <import resource="classpath:springmvc-resteasy.xml" />
>
> The new method in the controller is implemented thus:
>
> @RESET
> @Path("/{uuid}")
> public void reset(@PathParam("uuid") final String uuid) {
> // Reset the model state...
> }
>
> My other controller methods work fine for the normal GET,PUT,POST,DELETE
> verbs but for the custom verb I get the following error message from Tomcat:
>
> HTTP Status 501 - Method RESET is not defined in RFC 2068 and is not
> supported by the Servlet API
>
> That message seems to be the same one that you get with a default
> servlet implementation so I presume I need to configure the
> ResteasyHandlerMapping somehow...?
>
>
>
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
> much more. Get web development skills now with LearnDevNow -
> 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122812
>
>
>
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
|
|
From: Robert P. <rl...@lo...> - 2013-01-18 11:47:45
|
Don't do it man. I'm not gonna pretend to be able to explain it as well as Bill Burke in RESTful Java with JAX-RS or Roy Fields in his doctoral dissertation, but my feeble understanding is that you don't want to do this because:
1) Your violating visibility (i.e. the things in the middle don't know what RESET means. Is it bad if it gets sent a second time? Can I cache the results etc....) Though, in the case of "RESET" you probably want it to act like a POST and that is probably what you would get.
2) You client application could experience problems with it's libraries similar to the one your facing.
3) Your throwing away the wisdom gained in the entire online world using the heck out of the already defined methods.
4) The fact that developers of client applications already know the predefined methods.
A big part of REST is about sticking to the verbs we already know to take action on Entities as we define them. In this case you may want to consider sending a POST (possibly even a PUT) of a reset request entity. If reset takes time, you may find yourself then using GET to monitor the progress of your "reset". Alternatively, you might want to consider if RESET is simply a change of state for an existing entity. In which case you probably want to just PUT the entity with an updated state reflecting the fact it has been reset.
But my highest advise is to read (....or at least the first chapter of it, which introduces the theory):
• RESTful Java with JAX-RS
• By: Bill Burke
• Publisher: O'Reilly Media, Inc.
• Pub. Date: November 27, 2009
• Print ISBN-13: 978-0-596-15804-0
Also, browse RFC 2616, especially section 9 defining the existing methods.
If you already know all of this then I sent my apologies for being presumptuous, but you sound like you are where I was a few years ago, using RESTEasy like it was a lightweight version of SOAP. Thankfully, I got smacked down just enough to prompt me to go study. REST has serious advantages. Should you elect to ignore them, be certain it is an informed decision.
On Jan 18, 2013, at 5:23 AM, Dave Minter <da...@pa...> wrote:
>
>
>
> I'd like to use custom HTTP verbs with resteasy running under Tomcat. Is this possible? If it is possible is it sensible?
>
> I'm using resteasy 2.3.4.Final with Spring 3.1.2-RELEASE and I've created a custom HttpMethod annotation for the new verb:
>
> @Target({ ElementType.METHOD })
> @Retention(RetentionPolicy.RUNTIME)
> @HttpMethod("RESET")
> public @interface RESET {
> }
>
> Spring is configured in the servlet application context with the default resteasy config thus:
>
> <tx:annotation-driven />
> <import resource="classpath:springmvc-resteasy.xml" />
>
> The new method in the controller is implemented thus:
>
> @RESET
> @Path("/{uuid}")
> public void reset(@PathParam("uuid") final String uuid) {
> // Reset the model state...
> }
>
> My other controller methods work fine for the normal GET,PUT,POST,DELETE verbs but for the custom verb I get the following error message from Tomcat:
>
> HTTP Status 501 - Method RESET is not defined in RFC 2068 and is not supported by the Servlet API
>
> That message seems to be the same one that you get with a default servlet implementation so I presume I need to configure the ResteasyHandlerMapping somehow...?
>
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
> much more. Get web development skills now with LearnDevNow -
> 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122812_______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
|
|
From: Dave M. <da...@pa...> - 2013-01-18 10:23:54
|
res...@li...
I'd like to use custom HTTP verbs with resteasy running under Tomcat. Is
this possible? If it is possible is it sensible?
I'm using resteasy 2.3.4.Final with Spring 3.1.2-RELEASE and I've created a
custom HttpMethod annotation for the new verb:
@Target({ ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
@HttpMethod("RESET")
public @interface RESET {
}
Spring is configured in the servlet application context with the default
resteasy config thus:
<tx:annotation-driven />
<import resource="classpath:springmvc-resteasy.xml" />
The new method in the controller is implemented thus:
@RESET
@Path("/{uuid}")
public void reset(@PathParam("uuid") final String uuid) {
// Reset the model state...
}
My other controller methods work fine for the normal GET,PUT,POST,DELETE
verbs but for the custom verb I get the following error message from Tomcat:
HTTP Status 501 - Method RESET is not defined in RFC 2068 and is not
supported by the Servlet API
That message seems to be the same one that you get with a default servlet
implementation so I presume I need to configure the ResteasyHandlerMapping
somehow...?
|
|
From: Weinan Li <we...@re...> - 2013-01-10 12:22:56
|
btw, you can refer to RESTEasy's example to build up your own project. In RESTEasy source base it has plenty of examples you can check. Please check the 'examples' directory, there is an 'ejb-integration' example you could refer to. -- Weinan Li On Thursday, January 10, 2013 at 3:53 PM, Weinan Li wrote: > Hi Josiah, > > Your 'list()' method is not 'public', as required by JAX-RS spec, you should use 'public' method as your restful api. > > -- > Weinan Li > > > On Thursday, January 10, 2013 at 11:00 AM, Josiah Haswell wrote: > > > Hi everyone, > > > > I've been Googling around for this, and none of the solutions I've found have worked for me. I'm trying to build a RESTEasy-enabled application on Jboss 7.1.1 with Gradle. I have the relevant configuration detailed towards the bottom of the message, but I see that the application is being deployed in the logs when I visit that URL: > > > > 19:43:46,458 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /impl > > 19:43:46,474 INFO [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS018559: Deployed "impl.war" > > 19:43:53,533 INFO [org.jboss.resteasy.cdi.CdiInjectorFactory] (http--127.0.0.1-8080-1) Found BeanManager at java:comp/BeanManager > > 19:43:53,542 INFO [org.jboss.resteasy.spi.ResteasyDeployment] (http--127.0.0.1-8080-1) Deploying javax.ws.rs.core.Application: class example.JaxRsActivator$Proxy$_$$_WeldClientProxy > > > > > > But I receive the following error when I deploy the WAR and visit http://localhost:8080/impl/rest/user/list: > > HTTP Status 404 - Could not find resource for relative : /user/list of full path: http://127.0.0.1:8080/impl/rest/user/list > > > > > > What am I doing wrong? > > > > Thanks! > > > > Joe > > > > Configuration: > > > > src/main/webapp/WEB-INF/web.xml (http://web.xml) (empty except for the opening/closing tags) > > > > > > example.JaxRsActivator: > > > > @ApplicationPath("/rest") > > public class JaxRsActivator extends Application > > { > > } > > > > > > example.UserEndpoint: > > > > @Path("user") > > public class UserEndpoint > > { > > > > @Inject > > UserService userService; > > > > @GET > > @Path("list") > > List<User> list() { > > User user = new User(); > > user.setFirstName("Test"); > > user.setLastName("User"); > > return new ArrayList<User>(Arrays.asList(user)); > > } > > > > } > > > > > > ------------------------------------------------------------------------------ > > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > > MVPs and experts. ON SALE this month only -- learn more at: > > http://p.sf.net/sfu/learnmore_122712 > > > > _______________________________________________ > > Resteasy-developers mailing list > > Res...@li... (mailto:Res...@li...) > > https://lists.sourceforge.net/lists/listinfo/resteasy-developers > > > > > > > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122712 > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... (mailto:Res...@li...) > https://lists.sourceforge.net/lists/listinfo/resteasy-developers > > |
|
From: Weinan Li <we...@re...> - 2013-01-10 07:53:43
|
Hi Josiah, Your 'list()' method is not 'public', as required by JAX-RS spec, you should use 'public' method as your restful api. -- Weinan Li On Thursday, January 10, 2013 at 11:00 AM, Josiah Haswell wrote: > Hi everyone, > > I've been Googling around for this, and none of the solutions I've found have worked for me. I'm trying to build a RESTEasy-enabled application on Jboss 7.1.1 with Gradle. I have the relevant configuration detailed towards the bottom of the message, but I see that the application is being deployed in the logs when I visit that URL: > > 19:43:46,458 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /impl > 19:43:46,474 INFO [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS018559: Deployed "impl.war" > 19:43:53,533 INFO [org.jboss.resteasy.cdi.CdiInjectorFactory] (http--127.0.0.1-8080-1) Found BeanManager at java:comp/BeanManager > 19:43:53,542 INFO [org.jboss.resteasy.spi.ResteasyDeployment] (http--127.0.0.1-8080-1) Deploying javax.ws.rs.core.Application: class example.JaxRsActivator$Proxy$_$$_WeldClientProxy > > > But I receive the following error when I deploy the WAR and visit http://localhost:8080/impl/rest/user/list: > HTTP Status 404 - Could not find resource for relative : /user/list of full path: http://127.0.0.1:8080/impl/rest/user/list > > > What am I doing wrong? > > Thanks! > > Joe > > Configuration: > > src/main/webapp/WEB-INF/web.xml (http://web.xml) (empty except for the opening/closing tags) > > > example.JaxRsActivator: > > @ApplicationPath("/rest") > public class JaxRsActivator extends Application > { > } > > > example.UserEndpoint: > > @Path("user") > public class UserEndpoint > { > > @Inject > UserService userService; > > @GET > @Path("list") > List<User> list() { > User user = new User(); > user.setFirstName("Test"); > user.setLastName("User"); > return new ArrayList<User>(Arrays.asList(user)); > } > > } > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. ON SALE this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122712 > > _______________________________________________ > Resteasy-developers mailing list > Res...@li... (mailto:Res...@li...) > https://lists.sourceforge.net/lists/listinfo/resteasy-developers > > |
|
From: Josiah H. <jha...@el...> - 2013-01-10 03:24:53
|
Hi everyone,
I've been Googling around for this, and none of the solutions I've found have worked for me. I'm trying to build a RESTEasy-enabled application on Jboss 7.1.1 with Gradle. I have the relevant configuration detailed towards the bottom of the message, but I see that the application is being deployed in the logs when I visit that URL:
19:43:46,458 INFO [org.jboss.web] (MSC service thread 1-1) JBAS018210: Registering web context: /impl
19:43:46,474 INFO [org.jboss.as.server] (HttpManagementService-threads - 4) JBAS018559: Deployed "impl.war"
19:43:53,533 INFO [org.jboss.resteasy.cdi.CdiInjectorFactory] (http--127.0.0.1-8080-1) Found BeanManager at java:comp/BeanManager
19:43:53,542 INFO [org.jboss.resteasy.spi.ResteasyDeployment] (http--127.0.0.1-8080-1) Deploying javax.ws.rs.core.Application: class example.JaxRsActivator$Proxy$_$$_WeldClientProxy
But I receive the following error when I deploy the WAR and visit http://localhost:8080/impl/rest/user/list:
HTTP Status 404 - Could not find resource for relative : /user/list of full path: http://127.0.0.1:8080/impl/rest/user/list
What am I doing wrong?
Thanks!
Joe
Configuration:
src/main/webapp/WEB-INF/web.xml (empty except for the opening/closing tags)
example.JaxRsActivator:
@ApplicationPath("/rest")
public class JaxRsActivator extends Application
{
}
example.UserEndpoint:
@Path("user")
public class UserEndpoint
{
@Inject
UserService userService;
@GET
@Path("list")
List<User> list() {
User user = new User();
user.setFirstName("Test");
user.setLastName("User");
return new ArrayList<User>(Arrays.asList(user));
}
}
|