Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 216591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T18:34:43+00:00 2026-05-11T18:34:43+00:00

I have developed a Jersey Resource class. Can someone please tell me how can

  • 0

I have developed a Jersey Resource class.

Can someone please tell me how can I deploy it on a Web App server. Preferably Tomcat or JBoss.

Or a better question still, can Jersey applications with only a resource class be deployed on a Web App server? If yes, How?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T18:34:43+00:00Added an answer on May 11, 2026 at 6:34 pm

    by using web.xml:

    <servlet>
        <servlet-name>jersey-servlet</servlet-name>
        <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
        <init-param>
            <param-name>com.sun.jersey.config.property.packages</param-name>
            <param-value>com.foo.resources;org.bar.resources</param-value>
        </init-param>
    </servlet>
    

    or in Java (without a servlet container):

    public class MyConfig extends PackagesResourceConfig {
    
       public MyApplication() {
          super("com.foo.resources;org.bar.resources");
       }
    }
    

    or subclassing Application:

    public class MyApplicaton extends Application {
    
        public Set<Class<?>> getClasses() {
            Set<Class<?>> s = new HashSet<Class<?>>();
            s.add(com.foo.resources.MyResource.class);
            return s;
        }
    }  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have developed an web application using JSP and deployed in tomcat server. In
I have developed a REST service with Apache Jersey, running on Tomcat. It works
I have developed a server app that uses Excel 2007 COM automation to convert
I have developed a web site that requires user registration and authentication for some
I have developed a small administration page for game servers which you can add/remove/edit
I have developed a Java server using Eclipse that accepts TCP socket connection from
i have developed an app which executes sql jobs. When I click on execute
I have developed an app that in testing has worked fine but when it
Have developed a small Windows application using SQL Server as its database. I need
I have developed a web application that uses the jQuery DateTimePicker by Trent Richardson

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.