custom injector not working

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

custom injector not working

Trenton D. Adams
Good day,

Apparently I sent this prior to being approved on the list.  Here we go again...


It seems like Jersey doesn have an HttpServletRequest injector, so my injector doesn't work.  Is that right?  And if so, do the docs maybe need to be updated?

Either way, how do I go about following the guide, and getting a custom injector working?

Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: custom injector not working

japod
Hi Trenton,

The docs seems fine to me. It states: "The following examples should work on top of Jersey Servlet integration module.".
Since your code is based on Grizzly HTTP server, it does not fit the above condition (i.e. there is no Servlet container in your play).

Maybe you just want to rewrite your code to run on a Servlet container?

HTH,

~Jakub

On 20.2.2016 01:06, Trenton D. Adams wrote:
Good day,

Apparently I sent this prior to being approved on the list.  Here we go again...


It seems like Jersey doesn have an HttpServletRequest injector, so my injector doesn't work.  Is that right?  And if so, do the docs maybe need to be updated?

Either way, how do I go about following the guide, and getting a custom injector working?

Thanks.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: custom injector not working

Trenton D. Adams
So is there a way of doing unit testing on stuff like this then?

Also, it would be nicer if the docs had prominent warning there, that it will *not* work with grizzly.  I was just under the assumption that grizzly was a servlet container.  I am completely new to all of this, so it's good if documentation tries to be explicit.  Especially when some stuff does work with grizzly, and some stuff does not.

Who's in charge of them?  I'm assuming there's a git repo somewhere that I could fork, and suggest some changes to them?

On Sat, Feb 20, 2016 at 12:56 PM, Jakub Podlesak <[hidden email]> wrote:
Hi Trenton,

The docs seems fine to me. It states: "The following examples should work on top of Jersey Servlet integration module.".
Since your code is based on Grizzly HTTP server, it does not fit the above condition (i.e. there is no Servlet container in your play).

Maybe you just want to rewrite your code to run on a Servlet container?

HTH,

~Jakub


On 20.2.2016 01:06, Trenton D. Adams wrote:
Good day,

Apparently I sent this prior to being approved on the list.  Here we go again...


It seems like Jersey doesn have an HttpServletRequest injector, so my injector doesn't work.  Is that right?  And if so, do the docs maybe need to be updated?

Either way, how do I go about following the guide, and getting a custom injector working?

Thanks.


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: custom injector not working

japod
I believe you are looking for this: https://jersey.java.net/contribute.html
You should be able to submit a pull request (see Submit patches section).

Cheers,

~Jakub

On 20.2.2016 21:32, Trenton D. Adams wrote:
So is there a way of doing unit testing on stuff like this then?

Also, it would be nicer if the docs had prominent warning there, that it will *not* work with grizzly.  I was just under the assumption that grizzly was a servlet container.  I am completely new to all of this, so it's good if documentation tries to be explicit.  Especially when some stuff does work with grizzly, and some stuff does not.

Who's in charge of them?  I'm assuming there's a git repo somewhere that I could fork, and suggest some changes to them?

On Sat, Feb 20, 2016 at 12:56 PM, Jakub Podlesak <[hidden email]> wrote:
Hi Trenton,

The docs seems fine to me. It states: "The following examples should work on top of Jersey Servlet integration module.".
Since your code is based on Grizzly HTTP server, it does not fit the above condition (i.e. there is no Servlet container in your play).

Maybe you just want to rewrite your code to run on a Servlet container?

HTH,

~Jakub


On 20.2.2016 01:06, Trenton D. Adams wrote:
Good day,

Apparently I sent this prior to being approved on the list.  Here we go again...


It seems like Jersey doesn have an HttpServletRequest injector, so my injector doesn't work.  Is that right?  And if so, do the docs maybe need to be updated?

Either way, how do I go about following the guide, and getting a custom injector working?

Thanks.



Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: custom injector not working

Trenton D. Adams
Cool.  I've always wanted to take a look at docbook.  Is there an editor that's used for that?  Or just editing of the raw xml?

On Sat, Feb 20, 2016 at 1:44 PM, Jakub Podlesak <[hidden email]> wrote:
I believe you are looking for this: https://jersey.java.net/contribute.html
You should be able to submit a pull request (see Submit patches section).

Cheers,

~Jakub


On 20.2.2016 21:32, Trenton D. Adams wrote:
So is there a way of doing unit testing on stuff like this then?

Also, it would be nicer if the docs had prominent warning there, that it will *not* work with grizzly.  I was just under the assumption that grizzly was a servlet container.  I am completely new to all of this, so it's good if documentation tries to be explicit.  Especially when some stuff does work with grizzly, and some stuff does not.

Who's in charge of them?  I'm assuming there's a git repo somewhere that I could fork, and suggest some changes to them?

On Sat, Feb 20, 2016 at 12:56 PM, Jakub Podlesak <[hidden email]> wrote:
Hi Trenton,

The docs seems fine to me. It states: "The following examples should work on top of Jersey Servlet integration module.".
Since your code is based on Grizzly HTTP server, it does not fit the above condition (i.e. there is no Servlet container in your play).

Maybe you just want to rewrite your code to run on a Servlet container?

HTH,

~Jakub


On 20.2.2016 01:06, Trenton D. Adams wrote:
Good day,

Apparently I sent this prior to being approved on the list.  Here we go again...


It seems like Jersey doesn have an HttpServletRequest injector, so my injector doesn't work.  Is that right?  And if so, do the docs maybe need to be updated?

Either way, how do I go about following the guide, and getting a custom injector working?

Thanks.




Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: custom injector not working

Trenton D. Adams
Okay, I found my problem.  I initially started out using a custom ResourceConfig, because I was using grizzly.  For some reason, I was under the impression that in a servlet environment it would simply be detected.  So, I didn't put 2 and 2 together regarding web.xml configuration vs ResourceConfig configuration.  Since I had some of the features configured in web.xml, and they were working, but I also had them in ResourceConfig, I was under the impression my ResourceConfig was working.

I'm guessing that the docs can be updated to be more clear on ResourceConfig loading, but I'm not sure how yet.  I'll think about it, and see if I can change the docbook stuff to save someone else the grief.  Overall, the documentation is quite good, it's just a bit glitchy for a newb. :D

Anyhow, I've now removed all my configs from web.xml, and replaced them with...
<init-param>
    <param-name>javax.ws.rs.Application</param-name>
    <param-value>com.example.MyResourceConfig</param-value>
</init-param>

And all my problems vanished.

I'm on research and study leave one week out of every 3, so I'll probably work on updating those docs in a couple of weeks.



On Sat, Feb 20, 2016 at 1:51 PM, Trenton D. Adams <[hidden email]> wrote:
Cool.  I've always wanted to take a look at docbook.  Is there an editor that's used for that?  Or just editing of the raw xml?

On Sat, Feb 20, 2016 at 1:44 PM, Jakub Podlesak <[hidden email]> wrote:
I believe you are looking for this: https://jersey.java.net/contribute.html
You should be able to submit a pull request (see Submit patches section).

Cheers,

~Jakub


On 20.2.2016 21:32, Trenton D. Adams wrote:
So is there a way of doing unit testing on stuff like this then?

Also, it would be nicer if the docs had prominent warning there, that it will *not* work with grizzly.  I was just under the assumption that grizzly was a servlet container.  I am completely new to all of this, so it's good if documentation tries to be explicit.  Especially when some stuff does work with grizzly, and some stuff does not.

Who's in charge of them?  I'm assuming there's a git repo somewhere that I could fork, and suggest some changes to them?

On Sat, Feb 20, 2016 at 12:56 PM, Jakub Podlesak <[hidden email]> wrote:
Hi Trenton,

The docs seems fine to me. It states: "The following examples should work on top of Jersey Servlet integration module.".
Since your code is based on Grizzly HTTP server, it does not fit the above condition (i.e. there is no Servlet container in your play).

Maybe you just want to rewrite your code to run on a Servlet container?

HTH,

~Jakub


On 20.2.2016 01:06, Trenton D. Adams wrote:
Good day,

Apparently I sent this prior to being approved on the list.  Here we go again...


It seems like Jersey doesn have an HttpServletRequest injector, so my injector doesn't work.  Is that right?  And if so, do the docs maybe need to be updated?

Either way, how do I go about following the guide, and getting a custom injector working?

Thanks.





Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: custom injector not working

japod
In reply to this post by Trenton D. Adams
I used to edit the raw xml (i.e. it is doable that way),
but there are certainly even some WYSIWYG editors available
on the Internet.

Happy docbooking!

Cheers,

~Jakub

On 20.2.2016 21:51, Trenton D. Adams wrote:
Cool.  I've always wanted to take a look at docbook.  Is there an editor that's used for that?  Or just editing of the raw xml?

On Sat, Feb 20, 2016 at 1:44 PM, Jakub Podlesak <[hidden email]> wrote:
I believe you are looking for this: https://jersey.java.net/contribute.html
You should be able to submit a pull request (see Submit patches section).

Cheers,

~Jakub


On 20.2.2016 21:32, Trenton D. Adams wrote:
So is there a way of doing unit testing on stuff like this then?

Also, it would be nicer if the docs had prominent warning there, that it will *not* work with grizzly.  I was just under the assumption that grizzly was a servlet container.  I am completely new to all of this, so it's good if documentation tries to be explicit.  Especially when some stuff does work with grizzly, and some stuff does not.

Who's in charge of them?  I'm assuming there's a git repo somewhere that I could fork, and suggest some changes to them?

On Sat, Feb 20, 2016 at 12:56 PM, Jakub Podlesak <[hidden email]> wrote:
Hi Trenton,

The docs seems fine to me. It states: "The following examples should work on top of Jersey Servlet integration module.".
Since your code is based on Grizzly HTTP server, it does not fit the above condition (i.e. there is no Servlet container in your play).

Maybe you just want to rewrite your code to run on a Servlet container?

HTH,

~Jakub


On 20.2.2016 01:06, Trenton D. Adams wrote:
Good day,

Apparently I sent this prior to being approved on the list.  Here we go again...


It seems like Jersey doesn have an HttpServletRequest injector, so my injector doesn't work.  Is that right?  And if so, do the docs maybe need to be updated?

Either way, how do I go about following the guide, and getting a custom injector working?

Thanks.





Loading...