[JIRA] Resolved: (GRIZZLY-1481) Make possible to set HttpHandler's context-path and url-patter separately during registration

  • From: "oleksiys (JIRA)" <jira-no-reply@...>
  • To: issues@...
  • Subject: [JIRA] Resolved: (GRIZZLY-1481) Make possible to set HttpHandler's context-path and url-patter separately during registration
  • Date: Thu, 1 May 2014 22:12:49 +0000 (UTC)
  • Auto-submitted: auto-generated


     [ 
https://java.net/jira/browse/GRIZZLY-1481?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

oleksiys resolved GRIZZLY-1481.
-------------------------------

    Fix Version/s: 2.3.12
                       (was: 2.x.NEXT)
       Resolution: Fixed

mark as resolved for 2.3.x

Revision:   ac9f50ae5bddf83f0b7fb26f848a80117567509a
Date:       2014-04-18 20:20:13 UTC

Log Message:
------------
[2.3.x] + (minor update for) implement feature #1481
https://java.net/jira/browse/GRIZZLY-1481


> Make possible to set HttpHandler's context-path and url-patter separately 
> during registration
> ---------------------------------------------------------------------------------------------
>
>                 Key: GRIZZLY-1481
>                 URL: https://java.net/jira/browse/GRIZZLY-1481
>             Project: grizzly
>          Issue Type: New Feature
>    Affects Versions: 2.3
>            Reporter: Pavel Bucek
>             Fix For: 2.3.12
>
>
> issue might be in ServerConfiguration.addHttpHandler (or anywhere else).
> {code}        final String host = NetworkListener.DEFAULT_NETWORK_HOST;
>         final int port = 9998;
>         final HttpServer server = new HttpServer();
>         final NetworkListener listener = new NetworkListener("grizzly", 
> host, port);
>         server.addListener(listener);
>         // Map the path to the processor.
>         final ServerConfiguration config = server.getServerConfiguration();
>         HttpHandler handler = new HttpHandler() {
>             @Override
>             public void service(Request request, Response response) throws 
> Exception {
>                 System.out.println(request.getContextPath());
>             }
>         };
>         config.addHttpHandler(handler, "/test/test/test");
>         server.start();
>         // JAX-RS 2.0 client - executes GET /test/test/test/anotherHello
>         // request URI ok, service method: request.getContextPath returns 
> "/test" instead of "/test/test/test"
>         
> ClientBuilder.newClient().target("http://localhost:9998/test/test/test/anotherHello";).request().get(String.class);
>         // JAX-RS 2.0 client - executes GET /test/anotherHello
>         // request URI not ok, service method should NOT be called!; 
> request.getContextPath returns "/test"
>         
> ClientBuilder.newClient().target("http://localhost:9998/test/anotherHello";).request().get(String.class);{code}

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://java.net/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


[JIRA] Resolved: (GRIZZLY-1481) Make possible to set HttpHandler's context-path and url-patter separately during registration

oleksiys (JIRA) 05/01/2014
Terms of Use; Privacy Policy; Copyright ©2013-2015 (revision 20150626.29986a4)
 
 
Close
loading
Please Confirm
Close