(Adding Filter Mapping) Re: [Jean-Francois Arcand's Blog] New Comment Posted to 'Extending the Grizzly HTTP Runtime part V: Programatically configuring Servlet and GrizzlyAdapter'

View: New views
5 Messages — Rating Filter:   Alert me  

Parent Message unknown (Adding Filter Mapping) Re: [Jean-Francois Arcand's Blog] New Comment Posted to 'Extending the Grizzly HTTP Runtime part V: Programatically configuring Servlet and GrizzlyAdapter'

by Jeanfrancois Arcand-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



foo@... wrote:
> Name: braghest

> I see, thank you. However my use case is a bit more complicated ;-)

I see..


I have two filters with different mappings and a context listener. It is
important that the listener has servlet API semantics (singleton,
methods invoked just once, ...).
>
> Currently my code in Jetty looks with this:
>
> Context context = new Context(null, "/", options);
> context.addEventListener(new EventListener());
> context.addFilter(AFilter.class, "/a*", Handler.REQUEST);
> context.addFilter(BFilter.class, "/b*", Handler.REQUEST);
>
> which is very simple. I fear that when I add two ServletAdapters to a GrizzlyWebServer or a GrizzlyAdapterChain that the context listener will receive events twice.

Hum. I don't think you will, but I agree the API could be improved. Do
you mind filing an issue here:

https://grizzly.dev.java.net/issues/

I will take a look as son as possible.

Thanks

-- Jeanfrancois


>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Grizzly SSL

by Richard Corsale-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think this qiestion has been asked a thousand times :) but will grizzly handle SSL requests at this time?

--Richard



     

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Grizzly SSL

by Oleksiy Stashok :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Richard,

actually we do handle SSL :)
Can you pls. elaborate where exactly you want to handle SSL?

Thanks.

WBR,
Alexey.

On Feb 16, 2009, at 3:14 , Richard Corsale wrote:

> I think this qiestion has been asked a thousand times :) but will  
> grizzly handle SSL requests at this time?
>
> --Richard
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Grizzly SSL

by Richard Corsale-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Part of the framework im submitting today for the project is a front controller for Grizzly, Ive experianced so many quirks configuring the grizzly standalone server, that I decided to make a more user friendly wrapper and configuration frontend. you can download the netbeans project source via http://www.sourceroot.com/GrizzlyHarness.zip , its all fairly self explanitory, the executable entry point is localizedTest folder. I guess what Im

So I have encapsulated Http and Servlet adapter extentions and I would like to also provide a configuration option for SSL. however when I attempt to start the server with the SSLConfig I get an error thrown stating the following.
-----------
Exception in thread "main" java.lang.IllegalStateException: This instance isn't supporting SSL/HTTPS
        at com.sun.grizzly.http.embed.GrizzlyWebServer.setSSLConfig(GrizzlyWebServer.java:529)
        at API.GrizzlyHarness.init(GrizzlyHarness.java:44)
        at localizedTest.localTest.main(localTest.java:20)
Java Result: 1


I have generated a key and cert using OpenSSL and have them specified in the following way.

SSLConfig sslConfig = new SSLConfig();
    sslConfig.setKeyStoreFile("/home/richard/Public/SSL/host.key");
    sslConfig.setClientMode(true);
    sslConfig.setTrustStoreFile("/home/richard/Public/SSL/host.cert");
    this.Server.setSSLConfig(new SSLConfig(true));

I know Im probably oversimplifying the situation, but thats what I'm trying to do :)

--Richard
 



----- Original Message ----
From: Oleksiy Stashok <Oleksiy.Stashok@...>
To: users@...
Sent: Monday, February 16, 2009 5:06:32 AM
Subject: Re: Grizzly SSL

Hi Richard,

actually we do handle SSL :)
Can you pls. elaborate where exactly you want to handle SSL?

Thanks.

WBR,
Alexey.

On Feb 16, 2009, at 3:14 , Richard Corsale wrote:

> I think this qiestion has been asked a thousand times :) but will  
> grizzly handle SSL requests at this time?
>
> --Richard
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


     

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Grizzly SSL

by Oleksiy Stashok :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Please pass secure as true to one of  GrizzlyWebServer constructors.
For example: public GrizzlyWebServer(int port, String  
webResourcesPath, boolean secure)

WBR,
Alexey.

On Feb 16, 2009, at 18:27 , Richard Corsale wrote:

> Part of the framework im submitting today for the project is a front  
> controller for Grizzly, Ive experianced so many quirks configuring  
> the grizzly standalone server, that I decided to make a more user  
> friendly wrapper and configuration frontend. you can download the  
> netbeans project source via http://www.sourceroot.com/GrizzlyHarness.zip 
>  , its all fairly self explanitory, the executable entry point is  
> localizedTest folder. I guess what Im
>
> So I have encapsulated Http and Servlet adapter extentions and I  
> would like to also provide a configuration option for SSL. however  
> when I attempt to start the server with the SSLConfig I get an error  
> thrown stating the following.
> -----------
> Exception in thread "main" java.lang.IllegalStateException: This  
> instance isn't supporting SSL/HTTPS
>        at  
> com
> .sun
> .grizzly
> .http.embed.GrizzlyWebServer.setSSLConfig(GrizzlyWebServer.java:529)
>        at API.GrizzlyHarness.init(GrizzlyHarness.java:44)
>        at localizedTest.localTest.main(localTest.java:20)
> Java Result: 1
>
>
> I have generated a key and cert using OpenSSL and have them  
> specified in the following way.
>
> SSLConfig sslConfig = new SSLConfig();
>    sslConfig.setKeyStoreFile("/home/richard/Public/SSL/host.key");
>    sslConfig.setClientMode(true);
>    sslConfig.setTrustStoreFile("/home/richard/Public/SSL/host.cert");
>    this.Server.setSSLConfig(new SSLConfig(true));
>
> I know Im probably oversimplifying the situation, but thats what I'm  
> trying to do :)
>
> --Richard
>
>
>
>
> ----- Original Message ----
> From: Oleksiy Stashok <Oleksiy.Stashok@...>
> To: users@...
> Sent: Monday, February 16, 2009 5:06:32 AM
> Subject: Re: Grizzly SSL
>
> Hi Richard,
>
> actually we do handle SSL :)
> Can you pls. elaborate where exactly you want to handle SSL?
>
> Thanks.
>
> WBR,
> Alexey.
>
> On Feb 16, 2009, at 3:14 , Richard Corsale wrote:
>
>> I think this qiestion has been asked a thousand times :) but will
>> grizzly handle SSL requests at this time?
>>
>> --Richard
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@...
>> For additional commands, e-mail: users-help@...
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...