• 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

glassfish-web.xml servlet mappings

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to creat a REST api using jersey and glassfish.
I generated a dynamic web project using eclipse.

Now i have a glassfish-web.xml in my WEB-INF folder,



In a normal web.xml i get no errors, yet here i do on:

<glassfish-web-app> :

The content of element type "glassfish-web-app" must match "(context-root?,security-role-
mapping*,servlet*,idempotent-url-pattern*,session-config?,ejb-ref*,resource-ref*,resource-env-ref*,service-
ref*,message-destination-ref*,cache?,class-loader?,jsp-config?,locale-charset-info?,parameter-
encoding?,property*,valve*,message-destination*,webservice-description*,keep-state?,version-identifier?)".

<servlet> :

The content of element type "servlet" must match "(servlet-name,principal-name?,webservice-endpoint*)".

What am i doing wrong ?
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

The servlet and servlet-mapping stuff you have in the glassfish-web.xml should actually be in the application's web.xml file. The glassfish-web.xml should have the context-root and default tags.

If the context-root is the same as your app name then the glassfish-web.xml file doesn't need to exist.


 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic