users@jersey.java.net

[Jersey] Re: Servlets 3.0?

From: Simon Roberts <simon_at_dancingcloudphotography.com>
Date: Thu, 20 Nov 2014 22:11:52 -0600

>
> Maven Archetypes are kind of useless (and always out of date). Just create
> the code yourself from the ground up. There should be enough tutorials (and
> sample code) out there to do that.
>
> Gili
>
>
Hi Gili,

There's probably some truth in your observations. Indeed, I used to create
my projects directly in NetBeans, but I wanted something platform (IDE)
independent, and trivial to set up (this is for a teaching environment, so
easy start is very valuable). I might have to go with creating a standalone
maven project, I suppose but it's more configuration for learners all over
the place to collect the pieces. The archetype would have been ideal.

I just created a project using that archetype, too. I think all you need
> to do is remove web.xml from your project, and you would be all set...
> (All the async stuff could be configured via annotations on things, which
> you would need to do anyway...).
>
> Hi Moi! Good to hear from you again :)

The root of my problem is that I rather want the web.xml; I need to use it
in other parts of the projects to allow me to override some other default
behavior. So, I was hoping to find a simple fix for the existing deployment
to change it. I tried changing the namespace to web-app_3_0.xsd, and
changing the declared version web-app version attribute to 3.0, but it
didn't seem to change anything.


> If you mean modify the archetype so that using your updated archetype
> doesnt' result in this web.xml file - that is more complicated :-) (meaning
> I've never written an archetype myself - but I would imagine just removing
> the XML element that defines the web.xml file would do it...).
>
> Nah, I don't need to change the archetype. Well, it would be neat if I
could, but it's not critical.

Thanks both!
Cheers,
Simon



> Hi I started using the maven archetype here:
>> https://jersey.java.net/documentation/latest/getting-started.html#new-webapp
>> to build Jersey projects, which I deploy on Tomcat 8, but I notice that
>> this creates things that deploy as a 2.5 container. Unfortunately, I'm not
>> very comfortable with maven, and it's not at all clear to me how I alter
>> this to configure the Servlets 3.0 container (I want to get the async
>> support to work). Can anyone help, please?
>>
>> Cheers,
>> Simon
>>
>>