Instead of maven-jetty-plugin use the newer jetty-maven-plugin which does
overlay properly

      <plugin>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <version>7.2.2.v20101205</version>
      </plugin>

since this is an overlay (2 WARs merged into 1), the web.xml file from the
Camel web console is overwritten by your web.xml file. I modified your
web.xml file to include Camel web console:

<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
 version="2.4">

<display-name>myproject</display-name>


<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:com/mycompany/applicationContext-camel.xml
</param-value>
</context-param>
 <!--
      There are three means to configure Wickets configuration mode and they
are
      tested in the order given.
      1) A system property: -Dwicket.configuration
      2) servlet specific <init-param>
      3) context specific <context-param>
      The value might be either "development" (reloading when templates
change)
      or "deployment". If no configuration is found, "development" is the
default.
-->

<filter>
<filter-name>wicket.myproject</filter-name>
  <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
<init-param>
<param-name>applicationClassName</param-name>
<param-value>com.mycompany.WicketApplication</param-value>
  </init-param>
  </filter>

 <filter-mapping>
  <filter-name>wicket.myproject</filter-name>
<url-pattern>/*</url-pattern>
 </filter-mapping>

<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

  <filter>
    <filter-name>Jersey Filter</filter-name>

 
<filter-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</filter-class>
    <init-param>

 <param-name>com.sun.jersey.config.property.resourceConfigClass</param-name>

 <param-value>org.apache.camel.web.util.CamelResourceConfig</param-value>
    </init-param>
    <init-param>

 <param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name>
      <param-value>true</param-value>
    </init-param>
    <!--
    TODO scrap this when we move to latest jersey: 1.4-ea05
    -->
    <init-param>

 <param-name>com.sun.jersey.config.property.WebPageContentRegex</param-name>
      <param-value>/(images|css|js)/.*</param-value>
    </init-param>
    <init-param>

 <param-name>com.sun.jersey.config.feature.ImplicitViewables</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>com.sun.jersey.config.feature.Trace</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>com.sun.jersey.config.feature.Redirect</param-name>
      <param-value>true</param-value>
    </init-param>
    <init-param>
      <param-name>com.sun.jersey.config.property.packages</param-name>
      <param-value>org.apache.camel.web:</param-value>
    </init-param>
    <init-param>

 <param-name>com.sun.jersey.config.property.WadlResourceUri</param-name>
      <param-value>/api</param-value>
    </init-param>
  </filter>

  <filter-mapping>
    <filter-name>Jersey Filter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>

  <servlet>
    <servlet-name>TemplateEngineServlet</servlet-name>

 
<servlet-class>org.fusesource.scalate.servlet.TemplateEngineServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>TemplateEngineServlet</servlet-name>
    <url-pattern>*.mustache</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>TemplateEngineServlet</servlet-name>
    <url-pattern>*.scaml</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>TemplateEngineServlet</servlet-name>
    <url-pattern>*.ssp</url-pattern>
  </servlet-mapping>

  <error-page>
    <error-code>500</error-code>
    <location>/WEB-INF/scalate/errors/500.scaml</location>
  </error-page>
</web-app>

Your wicket app is at: http://localhost:8080/myproject/
Browse routes at: http://localhost:8080/routes

Cheers,
Jon

On Thu, Jun 23, 2011 at 3:48 PM, fachhoch <[email protected]> wrote:

> I dont want both the apps to be independent , I  want to have camel web
> console in my app as a web resource, I tried
> http://localhost:8080/artms/routes  url it did not work ,
> so to test it in simple way I created a a wicket quickstart project added
> camel-web-console as dependency.
>
> this project is maven eclipse project it has jetty pluign .I  attached this
> project. Please help me run web-console in this.
> http://camel.465427.n5.nabble.com/file/n4517697/myproject.zipmyproject.zip
>
> this can  run using
> mvn jetty:run
>
> to access this in browser   http://localhost:8080/myproject/
>
>
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/example-app-to-embed-camel-web-console-tp4512075p4517697.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Cheers,
Jon
---------------
FuseSource
Email: [email protected]
Web: fusesource.com
Twitter: jon_anstey
Blog: http://janstey.blogspot.com
Author of Camel in Action: http://manning.com/ibsen

Reply via email to