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 8527317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:31:26+00:00 2026-06-11T08:31:26+00:00

I am trying to get resteasy working on JBoss AS6 Final (SEAM 2 app),

  • 0

I am trying to get resteasy working on JBoss AS6 Final (SEAM 2 app), but I cant seem the get the most basic example working, as I understand it, resteasy should be ready to go, I have tried the following example from here but the urls simply result in 404 errors with no response

package uk.co.rest.test;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Application;

public class Library extends Application {

    @GET
    @Path("/books")
    public String getBooks() {
        System.out.println("Check");
        return "done";
    }

}

with the following added to my web.xml

<context-param>
    <param-name>resteasy.servlet.mapping.prefix</param-name>
    <param-value>/rest</param-value>
</context-param>

<servlet>
    <servlet-name>resteasy-servlet</servlet-name>
    <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
    <init-param>
        <param-name>javax.ws.rs.Application</param-name>
        <param-value>uk.co.rest.test.Library</param-value>
    </init-param>
</servlet>

<servlet-mapping>
    <servlet-name>resteasy-servlet</servlet-name>
    <url-pattern>/rest/*</url-pattern>
</servlet-mapping>

I get the feeling that the resteasy.deployer that is bundled with JBoss is not doing its job, but im not sure how to go about debugging it

Any help would be great im pulling my hair out over this one!!

  • 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-06-11T08:31:28+00:00Added an answer on June 11, 2026 at 8:31 am

    RESTEasy must be configured in order to be exposed as a service. You can do it either directly or via Seam’s resource servlet.

    To use RESTEasy directly, I find the easiest way is configuring it as a Servlet filter. There’s little to do other than adding the filter to your web.xml as documented in http://docs.jboss.org/resteasy/docs/2.3.0.GA/userguide/html/Installation_Configuration.html#filter.

    When using Seam this is however unnecessary, as Seam is capable of deploying RESTEasy services via its resource servlet quite simply (documented in http://docs.jboss.org/seam/2.2.0.GA/reference/en-US/html/webservices.html#d0e22093). You first declare RESTEasy’s application component like this:

    <resteasy:application resource-path-prefix="/rest" />
    

    And create your providers that will be automatically deployed into the configured path, for example:

    @Name("libraryService")
    @Path("/library")
    public class Library implements Serializable {
    
        @In(create=true) private transient BookHome bookHome;
    
        @GET @Path("/{book}")
        @Produces("text/plain")
        public String getBooks(@PathParam("book") String id) {
            bookHome.setId(id);
            return bookHome.getInstance().getTitle();
        }
    }
    

    You can then access the RESTEasy service via:

    http://localhost:8080/yourapp/seam/resource/rest/library/1
    

    The advantage of going the Seam way is mostly ease of use. You do need to include an extra jar: jboss-seam-resteasy.jar.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello everyone I been trying get php uploader working but having a lot of
I'm trying to get a simple RestEasy project to work in Eclipse (with Jboss
I'm trying get some licensing code from AndroidPit.com working, but I get Unable to
Hi am trying get GPS using network provider and GPS provider. but am getting
I'm trying get only the Saturdays and Sundays between two dates, but I don't
Trying to get a value from a object isn't working out. class Asset <
Trying to get these list headings to line up correctly, but I can't figure
Trying to get a login script working, I kept getting the same login page
I am trying get date of call but it's returning value of 1.1.1970(I think
in my app i am trying to get an xml file from an URL.

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.