Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Jetty 7 webapp A port A webapp B port B

Thank you for your answers. I have created everything according to the Wiki:
 
etc2/jetty8090.xml:
<Configure id="jetty8090" class="org.eclipse.jetty.server.Server">
    <!-- set up the port for ServerA -->
    <Set name="connectors">
      <Array type="org.eclipse.jetty.server.Connector">
        <Item>
          <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
            <Set name="port">8090</Set>
            <Set name="maxIdleTime">30000</Set>
            <Set name="Acceptors">10</Set>
          </New>
        </Item>
      </Array>
    </Set>
   <!-- set up a context deployer for Server A -->
    <Call name="addLifeCycle">
      <Arg>
        <New class="org.eclipse.jetty.deploy.ContextDeployer">
          <Set name="contexts"><Ref id="Contexts"/></Set>
          <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts2/jetty8090</Set>
          <Set name="scanInterval">5</Set>
        </New>
      </Arg>
    </Call>
</Configure>
 
/contexts2/jetty8090/www.acolsolutions.com.xml:
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
  <Set name="contextPath">/contexts2/jetty8090</Set>
  <Set name="war"><SystemProperty name="jetty.home"/>/webapps2/acol.war</Set>
  <Set name="virtualHosts">
    <Array type="java.lang.String">
      <Item>www.acolsolutions.com</Item>
    </Array>
  </Set>
</Configure>
 
webapps2/acol.war 
exists
 
etc/jetty.conf:
--pre=etc2/jetty8090.xml
--pre=etc/jetty-logging.xml
 
I get the following error message in start.log:
Establishing start.log on Thu Sep 30 13:00:34 UTC 2010
2010-09-30 13:00:35.599:WARN::Config error at <Set name="contexts"><Ref id="Contexts"/></Set> java.lang.IllegalStateException: No object for id=Contexts
2010-09-30 13:00:35.599:WARN::Config error at <Call name="addLifeCycle">|      <Arg>|        <New class="org.eclipse.jetty.deploy.ContextDeployer">|          <Set name="contexts"><Ref id="Contexts"/></Set>|          <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts2/jetty8090</Set>|          <Set name="scanInterval">5</Set>|        </New>|      </Arg>|    </Call> java.lang.IllegalStateException: No object for id=Contexts
2010-09-30 13:00:35.599:WARN::EXCEPTION
java.lang.IllegalStateException: No object for id=Contexts
        at org.eclipse.jetty.xml.XmlConfiguration.refObj(XmlConfiguration.java:676)
        at org.eclipse.jetty.xml.XmlConfiguration.itemValue(XmlConfiguration.java:941)
        at org.eclipse.jetty.xml.XmlConfiguration.value(XmlConfiguration.java:865)
        at org.eclipse.jetty.xml.XmlConfiguration.set(XmlConfiguration.java:292)
        at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:254)
        at org.eclipse.jetty.xml.XmlConfiguration.newObj(XmlConfiguration.java:657)
        at org.eclipse.jetty.xml.XmlConfiguration.itemValue(XmlConfiguration.java:940)
        at org.eclipse.jetty.xml.XmlConfiguration.value(XmlConfiguration.java:865)
        at org.eclipse.jetty.xml.XmlConfiguration.call(XmlConfiguration.java:554)
        at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:258)
        at org.eclipse.jetty.xml.XmlConfiguration.configure(XmlConfiguration.java:220)
        at org.eclipse.jetty.xml.XmlConfiguration$1.run(XmlConfiguration.java:1007)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:983)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.eclipse.jetty.start.Main.invokeMain(Main.java:490)
        at org.eclipse.jetty.start.Main.start(Main.java:631)
        at org.eclipse.jetty.start.Main.parseCommandLine(Main.java:280)
        at org.eclipse.jetty.start.Main.main(Main.java:82)
Can somebody tell me what I forgotten to configure?
 
Thanks,
Chris

 
2010/9/28 Jan Bartel <janb@xxxxxxxxxxx>
Chris,

This info is already on the jetty @ eclipse wiki for
jetty-7:

http://wiki.eclipse.org/Jetty/Howto/WebappPerConnector

and just for good measure see also:

http://wiki.eclipse.org/Jetty/Howto/Configure_Virtual_Hosts

regards
Jan



On 28/09/10 14:40, Greg Wilkins wrote:
Chris,

the basic approaches outlined in the jetty-6 documentation should
apply to jetty-7, with mainly just package name changes.   I'll make
sure this page is on our list of documentation to update in the
near(ish) future.

You can either run two completely different jetty instances (copy
jetty.xml to jetty2.xml and then change the id in the Configure tag to
Server2 and run both jetty.xml and jetty2.xml as config files); or run
1 jetty server, but use the host names (virtual or otherwise) to route
the request to the right context.

cheers



On 26 September 2010 02:16, Christopher Armstrong<chstrong@xxxxxxxxx>  wrote:
Hey there,

I just downloaded and installed Jetty 7 but there is still some lack in
documentation. I'm trying to find out how to configure Jetty 7 to do what is
described in the link below. I want to run 2 Grails applications. The
applications should run each on a different port on the same server with
different jetty instances. Apache is running in front of Jetty using
mod_proxy. Grails apps have some problems, running within the same jetty
instance. There are some conflicts between libraries.
www.app1.com ->  Apache ProxyPass within VirtualHost directive ->  Jetty
127.0.0.1:8081
www.app2.com ->  Apache ProxyPass within VirtualHost directive ->  Jetty
127.0.0.1 8082
Doc from Jetty 6 that does not work with Jetty 7:
http://docs.codehaus.org/display/JETTY/How+to+serve+webbapp+A+from+portA+and+webapp+B+from+portB
Do you have any docs or examples on that? I tried to find a book about jetty
but it seems that there is nothing there yet.
I'm running jetty-7.1.6.v20100715 on Debian with Apache2.
Thanks,
Chris
_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users

--
Jan Bartel, Webtide LLC | janb@xxxxxxxxxxx | http://www.webtide.com

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


Back to the top