maraski | 5 Oct 2009 14:59
Picon

[jetty-user] Ssl on jetty

Hey guys.
 
I installed Ubuntu Server 9.04. Then I ‘ve configured Jetty 5. Now I want to run SSL on jetty. A webapplication runs on jetty and requires a login at a defined point.
Now (with SSL) the Login page should change from http to https , to encode the login data.
 
I used this tutorial to configure SSL for Jetty but something went wrong. http://jetty.mortbay.org/jetty5/faq/faq_s_400-Security_t_ssl.html <http://jetty.mortbay.org/jetty5/faq/faq_s_400-Security_t_ssl.html>
 
After I created the keystore with this command (keytool -keystore keystore -alias jetty -genkey -keyalg RSA) I made some changes in the „jetty.xml“ file.
These 2 codeblocks include the changes I made:

<Call name="addListener">
    <Arg>
      <New class="org.mortbay.http.SocketListener">
        <Set name="Port"><SystemProperty name="jetty.port" default="8280"/></Set>
        <Set name="MinThreads">10</Set>
        <Set name="MaxThreads">100</Set>
        <Set name="MaxIdleTimeMs">30000</Set>
        <Set name="LowResourcePersistTimeMs">5000</Set>
        <Set name="ConfidentialPort">8443</Set>
        <Set name="IntegralPort">8443</Set>
      </New>
    </Arg>
 
 
<Call name="addListener">
    <Arg>
      <New class="org.mortbay.http.SunJsseListener">
       <Set name="Port">8443</Set>
       <Set name="MinThreads">5</Set>
           <Set name="MaxThreads">100</Set>
           <Set name="MaxIdleTimeMs">30000</Set>
           <Set name="LowResourcePersistTimeMs">2000</Set>
  
       <Set name="Keystore">/etc/jetty/keystore</Set>
  <!--      <Set name="Keystore"><SystemProperty name="jetty.home" default="."/>/keystore</Set> -->
 
 
       <Set name="Password">changeit</Set>
       <Set name="KeyPassword">changeit</Set>
      </New>
    </Arg>
  </Call>
 
Now if I type http://hostname:8280/ into the browser address field (of course I used the right hostname instead of the default one) the following message is shown in the browser: {{Error 404 - Not Found. No context on this server matched or handled this request. Contexts known to this server are:

The links above may not work if a virtual host is configured}}



If I try to enter http://hostname:8280/  ,after I completely uncommented the SunJsseListener Codeblock , the Jetty start page appears at least in my browser window.This should tell me that jetty is configured well.
 
Maybe it is helpful for you if I say that when I execute “netstat –a” it is shown that Port 8280 has the STATE LISTEN.
 
My assumption is that I probably made a mistake in the SunJsseListener Codeblock but I don’t know what.
Maybe it is another mistake.
 
It would be very nice if someone can help me.
 
Thank you in advance.
 
Stevo Slavić | 6 Oct 2009 14:02
Picon
Gravatar

[jetty-user] Deploying more than one war with jetty maven plugin

Hello Jetty users,

Is there a way to deploy/run more than one war using jetty maven plugin?

Thanks in advance!

Regards,
Stevo.

Eugene | 6 Oct 2009 14:17
Picon
Gravatar

[jetty-user] Jetty and httpsession statistics ...

Hello All !
I migrate from tomcat to jetty in Jboss-4.2.2.GA.
And I want to know how enable http session statistics in JMX ?

I read instruction: http://docs.codehaus.org/display/JETTY/JBoss
and enabling statistics.
But I get only request statistics.
Session statistics is absent.
I had HashSessionManager's statistics. But how bind its with my web app?
Thanks.

--

-- 
Best Regards, Eugene Batogov
_______________________________________

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Caristi, Joe | 6 Oct 2009 14:55
Favicon

RE: [jetty-user] Deploying more than one war with jetty maven plugin

Add a Jetty configuration to the Jetty plugin like this:

 

<plugin>

      <groupId>org.mortbay.jetty</groupId>

      <artifactId>maven-jetty-plugin</artifactId>

      <configuration>

            <jettyConfig>src/test/resources/jetty.xml</jettyConfig>

      </configuration>

</plugin>

 

In the configuration, create a handler for the dependent WAR:

 

<Configure id="Server" class="org.mortbay.jetty.Server">

    <!-- =========================================================== -->

    <!-- Set handler Collection Structure                            -->

    <!-- =========================================================== -->

    <Set name="handler">

        <!-- the collection of handlers that will handle the request -->

        <New id="Handlers"

            class="org.mortbay.jetty.handler.HandlerCollection">

            <Set name="handlers">

                <Array type="org.mortbay.jetty.Handler">

                    <Item>

                        <New id="WebHandler"

                            class="org.mortbay.jetty.webapp.WebAppContext" />

                    </Item>

                </Array>

            </Set>

        </New>

    </Set>

        <Ref id="WebHandler">

        <Set name="contextPath">/dependency-app</Set>

        <Set name="war">../dependency-app/target/dependency-app-0.0.1-SNAPSHOT.war</Set>

    </Ref>

 </Configure>

 

From: Stevo Slavić [mailto:sslavic <at> gmail.com]
Sent: Tuesday, October 06, 2009 8:02 AM
To: Jetty Users List
Subject: [jetty-user] Deploying more than one war with jetty maven plugin

 

Hello Jetty users,

Is there a way to deploy/run more than one war using jetty maven plugin?

Thanks in advance!

Regards,
Stevo.


STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc <at> whisolutions.com,
and destroy all copies of this message and any attachments.
Rafael Nunes | 6 Oct 2009 15:20
Picon

[jetty-user] Restart Context

Hi!
I'm just migrating from Tomcat to Jetty.
Can I have some option to restart just one context/webapp?

Or is it my only 
alternative?(http://docs.codehaus.org/display/JETTY/ContextDeployer)

Thanks,
--Rafael

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Stevo Slavić | 6 Oct 2009 15:22
Picon
Gravatar

Re: [jetty-user] Deploying more than one war with jetty maven plugin

Joe,

Thank you very much!

I assume adding another war will basically come down to adding new item in handler collection and configuring it via another ref.

Wish this example was part of Maven Jetty Plugin Configuration Guide. Even more I wish it was possible to configure plugin in pom only, so that Maven knows given module depends on referenced war(s) even if only in test scope so if they were part of same project Maven reactor could appropriately reorder build.

Regards,
Stevo.

2009/10/6 Caristi, Joe <jcaristi <at> whisolutions.com>

Add a Jetty configuration to the Jetty plugin like this:

 

<plugin>

      <groupId>org.mortbay.jetty</groupId>

      <artifactId>maven-jetty-plugin</artifactId>

      <configuration>

            <jettyConfig>src/test/resources/jetty.xml</jettyConfig>

      </configuration>

</plugin>

 

In the configuration, create a handler for the dependent WAR:

 

<Configure id="Server" class="org.mortbay.jetty.Server">

    <!-- =========================================================== -->

    <!-- Set handler Collection Structure                            -->

    <!-- =========================================================== -->

    <Set name="handler">

        <!-- the collection of handlers that will handle the request -->

        <New id="Handlers"

            class="org.mortbay.jetty.handler.HandlerCollection">

            <Set name="handlers">

                <Array type="org.mortbay.jetty.Handler">

                    <Item>

                        <New id="WebHandler"

                            class="org.mortbay.jetty.webapp.WebAppContext" />

                    </Item>

                </Array>

            </Set>

        </New>

    </Set>

        <Ref id="WebHandler">

        <Set name="contextPath">/dependency-app</Set>

        <Set name="war">../dependency-app/target/dependency-app-0.0.1-SNAPSHOT.war</Set>

    </Ref>

 </Configure>

 

From: Stevo Slavić [mailto:sslavic <at> gmail.com]
Sent: Tuesday, October 06, 2009 8:02 AM
To: Jetty Users List
Subject: [jetty-user] Deploying more than one war with jetty maven plugin

 

Hello Jetty users,

Is there a way to deploy/run more than one war using jetty maven plugin?

Thanks in advance!

Regards,
Stevo.


STATEMENT OF CONFIDENTIALITY:



The information contained in this electronic message and any attachments to
this message are intended for the exclusive use of the addressee(s) and may
contain confidential or privileged information. If you are not the intended
recipient, please notify WHI Solutions immediately at gc <at> whisolutions.com,
and destroy all copies of this message and any attachments.

Jesse McConnell | 6 Oct 2009 15:56
Picon
Gravatar

Re: [jetty-user] Restart Context

generally I just make a context file that points to the webapp and
when you have finished replacing the webapp, touch the context file
and it reloads

cheers,
jesse

--
jesse mcconnell
jesse.mcconnell <at> gmail.com

2009/10/6 Rafael Nunes <rafael <at> globalcode.com.br>:
> Hi!
> I'm just migrating from Tomcat to Jetty.
> Can I have some option to restart just one context/webapp?
>
> Or is it my only
> alternative?(http://docs.codehaus.org/display/JETTY/ContextDeployer)
>
> Thanks,
> --Rafael
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Rafael Nunes | 6 Oct 2009 16:03
Picon

Re: [jetty-user] Restart Context

Geez!!!
No way to touch every single webapp I re-deploy in my production server.
Anyway, maybe I sould keep on with Tomcat.

Thank you very much,
--Rafael

Jesse McConnell wrote:
> generally I just make a context file that points to the webapp and
> when you have finished replacing the webapp, touch the context file
> and it reloads
>
> cheers,
> jesse
>
> --
> jesse mcconnell
> jesse.mcconnell <at> gmail.com
>
>
>
> 2009/10/6 Rafael Nunes <rafael <at> globalcode.com.br>:
>   
>> Hi!
>> I'm just migrating from Tomcat to Jetty.
>> Can I have some option to restart just one context/webapp?
>>
>> Or is it my only
>> alternative?(http://docs.codehaus.org/display/JETTY/ContextDeployer)
>>
>> Thanks,
>> --Rafael
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>
>   

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Jesse McConnell | 6 Oct 2009 16:13
Picon
Gravatar

Re: [jetty-user] Restart Context

maybe I didn't follow what your trying to do...

> touch contexts/webapp.xml

not particularly difficult to restart on particular webapp

what are you trying to do?

cheers,
jesse

--
jesse mcconnell
jesse.mcconnell <at> gmail.com

On Tue, Oct 6, 2009 at 09:03, Rafael Nunes <rafael <at> globalcode.com.br> wrote:
> Geez!!!
> No way to touch every single webapp I re-deploy in my production server.
> Anyway, maybe I sould keep on with Tomcat.
>
> Thank you very much,
> --Rafael
>
> Jesse McConnell wrote:
>>
>> generally I just make a context file that points to the webapp and
>> when you have finished replacing the webapp, touch the context file
>> and it reloads
>>
>> cheers,
>> jesse
>>
>> --
>> jesse mcconnell
>> jesse.mcconnell <at> gmail.com
>>
>>
>>
>> 2009/10/6 Rafael Nunes <rafael <at> globalcode.com.br>:
>>
>>>
>>> Hi!
>>> I'm just migrating from Tomcat to Jetty.
>>> Can I have some option to restart just one context/webapp?
>>>
>>> Or is it my only
>>> alternative?(http://docs.codehaus.org/display/JETTY/ContextDeployer)
>>>
>>> Thanks,
>>> --Rafael
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>  http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Julio Viegas | 6 Oct 2009 16:14
Gravatar

Re: [jetty-user] Restart Context

Rafael,

   Just replacing the context file is another way of "touch"ing it!
You don't need the touch command, just a way of uploading a new
context file.

   Or Am I missing something?

Rgrds,
JV -- julioviegas.com

On Tue, Oct 6, 2009 at 11:03, Rafael Nunes <rafael <at> globalcode.com.br> wrote:
> Geez!!!
> No way to touch every single webapp I re-deploy in my production server.
> Anyway, maybe I sould keep on with Tomcat.
>
> Thank you very much,
> --Rafael
>
> Jesse McConnell wrote:
>>
>> generally I just make a context file that points to the webapp and
>> when you have finished replacing the webapp, touch the context file
>> and it reloads
>>
>> cheers,
>> jesse
>>
>> --
>> jesse mcconnell
>> jesse.mcconnell <at> gmail.com
>>
>>
>>
>> 2009/10/6 Rafael Nunes <rafael <at> globalcode.com.br>:
>>
>>>
>>> Hi!
>>> I'm just migrating from Tomcat to Jetty.
>>> Can I have some option to restart just one context/webapp?
>>>
>>> Or is it my only
>>> alternative?(http://docs.codehaus.org/display/JETTY/ContextDeployer)
>>>
>>> Thanks,
>>> --Rafael
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe from this list, please visit:
>>>
>>>  http://xircles.codehaus.org/manage_email
>>>
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>    http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Gmane