| Author |
WAS7 for Developers & annotations
|
Kevin P Smith
Ranch Hand
Joined: Feb 18, 2005
Posts: 362
|
|
Hi guys
I have been working on an app for a while using Glassfish v3, using Servlets 3.0 with annotations (instead of web.xml) for servlet mappings. Everything works fine but i have been finding Glassfish quite flakey in regards to redeploying the app or removing the app so I decided to download WAS7 for developers and try y app on there.
Now I have deployed it and it's up and running but as soon as I click on a URI I get a 404 error, the only thing I can think that's causing this is that WAS7 doesn't see the annotations!
I can't believe WAS doesn't support Servlet3.0 or annotations, so is there any config I have to do to get this working?
Has anyone successfulyy ran a annotations based app on WAS7?
Cheers in advance
KS
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 16483
|
|
Keith Seller wrote:Now I have deployed it and it's up and running but as soon as I click on a URI I get a 404 error, the only thing I can think that's causing this is that WAS7 doesn't see the annotations!
Well, that sure wouldn't be my first guess at what causes a 404. You might want to step back for a minute and consider some of the more ordinary reasons why that would happen.
|
 |
Kevin P Smith
Ranch Hand
Joined: Feb 18, 2005
Posts: 362
|
|
Well the page is there and it works under Glassfish (same EAR file) also I have another Servlet for general navigation that uses the old web.xml config and that is working.
So my thought is that Websphere isn't reading the url-pattern in the @WebServlet annotation.
|
 |
Kevin P Smith
Ranch Hand
Joined: Feb 18, 2005
Posts: 362
|
|
Doing some further research, it doesn't look like WAS7 even supports Servlets3.0, just 2.5, in which case it might explain why it's not getting my
[@WebServlet(name = "TestServlet", urlPatterns = {"/test"}) ]
code!
|
 |
 |
|
|
subject: WAS7 for Developers & annotations
|
|
|