• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

WAS7 for Developers & annotations

 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 362
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!

reply
    Bookmark Topic Watch Topic
  • New Topic