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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:17:10+00:00 2026-06-05T02:17:10+00:00

Errai has support for JAX-RS , although when I tried to use it with

  • 0

Errai has support for JAX-RS, although when I tried to use it with the supplied Maven archetype GWT complained with the error:

No source code is available for type javax.ws.rs.core.PathSegment; did you forget to inherit a required module?

The PathSegment interface appears to be part of the official Java EE standard, so why is this class not available?

  • 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-05T02:17:11+00:00Added an answer on June 5, 2026 at 2:17 am

    A solution is to create the javax.ws.rs.core package in your GWT project, and include the interfaces for yourself. These interfaces are MultivaluedMap:

    package javax.ws.rs.core;
    
    import java.util.List;
    import java.util.Map;
    
    /**
     * A map of key-values pairs. Each key can have zero or more values.
     * 
     */
    public interface MultivaluedMap<K, V> extends Map<K, List<V>> {
    
        /**
         * Set the key's value to be a one item list consisting of the supplied value.
         * Any existing values will be replaced.
         * 
         * @param key the key
         * @param value the single value of the key
         */
        void putSingle(K key, V value);
    
        /**
         * Add a value to the current list of values for the supplied key.
         * @param key the key 
         * @param value the value to be added.
         */
        void add(K key, V value);
    
        /**
         * A shortcut to get the first value of the supplied key.
         * @param key the key
         * @return the first value for the specified key or null if the key is
         * not in the map.
         */
        V getFirst(K key);
    
    }
    

    PathSegment:

    package javax.ws.rs.core;
    
    /**
     * Represents a URI path segment and any associated matrix parameters. When an
     * instance of this type is injected with {@link javax.ws.rs.PathParam}, the
     * value of the annotation identifies which path segment is selected and the
     * presence of an {@link javax.ws.rs.Encoded} annotation will result in an
     * instance that supplies the path and matrix parameter values in
     * URI encoded form.
     *
     * @see UriInfo#getPathSegments
     * @see javax.ws.rs.PathParam
     */
    public interface PathSegment
    {
    
       /**
        * Get the path segment.
        * <p/>
        *
        * @return the path segment
        */
       String getPath();
    
       /**
        * Get a map of the matrix parameters associated with the path segment.
        * The map keys are the names of the matrix parameters with any
        * percent-escaped octets decoded.
        *
        * @return the map of matrix parameters
        * @see <a href="http://www.w3.org/DesignIssues/MatrixURIs.html">Matrix URIs</a>
        */
       MultivaluedMap<String, String> getMatrixParameters();
    
    }
    

    You’ll need a GWT module file (in the javax.ws.rs package):

    <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6//EN"
            "http://google-web-toolkit.googlecode.com/svn/releases/1.6/distro-source/core/src/gwt-module.dtd">
    <module rename-to="App">
        <source path="core"/> 
    </module>
    

    And you’ll need to add an inherits reference to you application GWT module:

    <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.6//EN"
            "http://google-web-toolkit.googlecode.com/svn/releases/1.6/distro-source/core/src/gwt-module.dtd">
    <module rename-to="App">
        <inherits name='com.google.gwt.user.User'/>
        <inherits name="org.jboss.errai.common.ErraiCommon"/>
        <inherits name="org.jboss.errai.ioc.Container"/>
    
        <inherits name="org.jboss.errai.enterprise.Jaxrs"/> 
        <inherits name="com.redhat.topicindex.rest"/>
        <inherits name="javax.ws.rs.core"/>
    </module>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have use a Maven archetype for installed errai-cdi quickstart project in Eclipse. But
we are developing an web application using GWT 2.4, Errai 1.3.2. It is running
I've been trying to get this code to work for what feels like an
I've deployed the jboss-as-helloworld-errai application in my standalone jboss7.1 instance, and I deleted it
Maybe this is an encoding issue? I can't imagine that you have to replace
I am trying to put the list array(res) item in to the Data Table(_Hdt)
I'm creating a function that will do a socket accept and return 3 vales
My study guide (for 70-536 exam) says this twice in the text and encoding

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.