wood burning stoves 2.0*
The moose likes Websphere and the fly likes WAS7 for Developers & annotations Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "WAS7 for Developers & annotations" Watch "WAS7 for Developers & annotations" New topic
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: 18541
    
    8

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!

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: WAS7 for Developers & annotations
 
Similar Threads
solution for EJB3.0 and Open JPA in WAS7
WAS7 and VMWare Lab manager
WAS7 System Properties in RAD 7.5.1.
MDB activation using annotations in WAS7
Another WAS7 issue regarding local session beans