Can you deploy servlets and web services from a .war?

Discussion in 'Java' started by ses, Oct 20, 2010.

  1. ses

    ses Guest

    OK might be a stupid question but hopefully someone can help out:

    Can you deploy both servlets and web services from a single .war or do
    you have to package them up in an ear?

    I ask because Glassfish is giving me a very unhelpful deployment
    exception and this is the only thing I can think of that might be the
    cause. Originally I was just deploying the web services from this war,
    but I wanted a servlet in there as well.
     
    ses, Oct 20, 2010
    #1
    1. Advertising

  2. ses

    Jan Thomä Guest

    On 20.10.10 23:00, ses wrote:

    > Can you deploy both servlets and web services from a single .war or do
    > you have to package them up in an ear?


    You can. Just declare them both in the web.xml and you should be good to
    go. After all, web services are just fancy servlets.
     
    Jan Thomä, Oct 25, 2010
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Richard
    Replies:
    0
    Views:
    547
    Richard
    Aug 4, 2003
  2. MARunner
    Replies:
    0
    Views:
    2,064
    MARunner
    Oct 21, 2003
  3. Martin
    Replies:
    6
    Views:
    18,001
    anupam.cmit
    Dec 11, 2010
  4. 6e
    Replies:
    0
    Views:
    345
  5. ses
    Replies:
    4
    Views:
    790
Loading...

Share This Page