Author: jstrachan
Date: Thu Aug 5 12:32:13 2010
New Revision: 982575
URL: http://svn.apache.org/viewvc?rev=982575&view=rev
Log:
migrated camel-web away from JSP, JSTL, JSP, EL, sitemesh et al to the lovely, lean and mean Scalate library instead
Added:
camel/trunk/components/camel-web/src/main/resources/logback.xml
camel/trunk/components/camel-web/src/main/webapp/WEB-INF/scalate/
camel/trunk/components/camel-web/src/main/webapp/WEB-INF/scalate/layouts/
camel/trunk/components/camel-web/src/main/webapp/WEB-INF/scalate/layouts/default.scaml
camel/trunk/components/camel-web/src/main/webapp/com/sun/jersey/server/impl/wadl/WadlResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/com/sun/jersey/server/impl/wadl/WadlResourceResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/css/scalate/
camel/trunk/components/camel-web/src/main/webapp/css/scalate/console.css
camel/trunk/components/camel-web/src/main/webapp/css/scalate/errors.css
camel/trunk/components/camel-web/src/main/webapp/favicon.ico (with props)
camel/trunk/components/camel-web/src/main/webapp/images/scalate/
camel/trunk/components/camel-web/src/main/webapp/images/scalate/minus.png (with props)
camel/trunk/components/camel-web/src/main/webapp/images/scalate/plus.png (with props)
camel/trunk/components/camel-web/src/main/webapp/images/scalate/project-icon-24x24.png (with props)
camel/trunk/components/camel-web/src/main/webapp/images/scalate/project-icon-32x32.png (with props)
camel/trunk/components/camel-web/src/main/webapp/images/scalate/project-logo.png (with props)
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.api.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.systemProperties.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ComponentResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ComponentsResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ConvertersFromResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ConvertersResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointResource.send.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointsResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ExchangeResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/LanguageResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/LanguagesResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource.edit.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource.index.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RoutesResource.create.ssp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RoutesResource.index.ssp
Removed:
camel/trunk/components/camel-web/src/main/webapp/com/sun/jersey/server/impl/wadl/WadlResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/com/sun/jersey/server/impl/wadl/WadlResourceResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource/api.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource/systemProperties.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ComponentResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ComponentsResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ConvertersFromResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ConvertersResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointResource/send.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointsResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ExchangeResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/LanguageResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/LanguagesResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/edit.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource/index.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RoutesResource/create.jsp
camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RoutesResource/index.jsp
Modified:
camel/trunk/components/camel-web/pom.xml
camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/CamelResourceConfig.java
camel/trunk/components/camel-web/src/main/webapp/WEB-INF/web.xml
camel/trunk/components/camel-web/src/profiles/osgi/webapp/WEB-INF/web.xml
camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/CreateEndpointTest.java
camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/resources/EndpointsHtmlTest.java
Modified: camel/trunk/components/camel-web/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/pom.xml?rev=982575&r1=982574&r2=982575&view=diff
==============================================================================
--- camel/trunk/components/camel-web/pom.xml (original)
+++ camel/trunk/components/camel-web/pom.xml Thu Aug 5 12:32:13 2010
@@ -30,14 +30,29 @@
<properties>
<camel.osgi.export.pkg>org.apache.camel.web.*</camel.osgi.export.pkg>
- <jersey-version>1.1.5</jersey-version>
+ <scalate-version>1.3-SNAPSHOT</scalate-version>
+ <jersey-version>1.4-ea04</jersey-version>
+<!--
+ <jersey-version>1.4-SNAPSHOT</jersey-version>
+-->
+ <logback-version>0.9.24</logback-version>
<jetty-port>8080</jetty-port>
- <sitemesh-version>2.3</sitemesh-version>
+<!--
<webdriver-version>0.6.1039</webdriver-version>
+-->
+ <webdriver-version>0.9.7376</webdriver-version>
</properties>
<repositories>
- <repository>
+ <repository>
+ <id>glassfish-repo-archive</id>
+ <name>Nexus repository collection for Glassfish</name>
+ <url>http://maven.glassfish.org/content/groups/glassfish</url>
+ <snapshots>
+ <updatePolicy>never</updatePolicy>
+ </snapshots>
+ </repository>
+ <repository>
<id>java.net.m2</id>
<name>Java.net Repository for Maven</name>
<url>http://download.java.net/maven/2/</url>
@@ -102,6 +117,20 @@
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-spring</artifactId>
<version>${jersey-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
@@ -114,15 +143,27 @@
<version>${jersey-version}</version>
</dependency>
<dependency>
- <groupId>opensymphony</groupId>
- <artifactId>sitemesh</artifactId>
- <version>${sitemesh-version}</version>
- </dependency>
- <dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<optional>true</optional>
</dependency>
+ <dependency>
+ <groupId>org.fusesource.scalate</groupId>
+ <artifactId>scalate-core</artifactId>
+ <version>${scalate-version}</version>
+ </dependency>
+<!--
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ <version>${logback-version}</version>
+ </dependency>
+-->
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
<!-- testing web framework -->
<!--
@@ -140,16 +181,30 @@
</dependency>
-->
<dependency>
+<!--
<groupId>org.openqa.selenium.webdriver</groupId>
+-->
+ <groupId>org.seleniumhq.webdriver</groupId>
<artifactId>webdriver-htmlunit</artifactId>
<version>${webdriver-version}</version>
<scope>test</scope>
</dependency>
<dependency>
+<!--
<groupId>org.openqa.selenium.webdriver</groupId>
+-->
+ <groupId>org.seleniumhq.webdriver</groupId>
<artifactId>webdriver-support</artifactId>
<version>${webdriver-version}</version>
<scope>test</scope>
+<!--
+ <exclusions>
+ <exclusion>
+ <groupId>org.hamcrest</groupId>
+ <artifactId>hamcrest-all</artifactId>
+ </exclusion>
+ </exclusions>
+-->
</dependency>
<!-- testing web container -->
@@ -164,29 +219,6 @@
<version>${jetty-version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-jsp-2.1</artifactId>
- <version>${jetty-version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>jsp-2.1-glassfish</artifactId>
- <version>2.1.v20100127</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jstl</artifactId>
- <version>1.1.2</version>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>taglibs</groupId>
- <artifactId>standard</artifactId>
- <version>1.1.2</version>
- </dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
@@ -213,6 +245,7 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+ <!--
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
@@ -223,6 +256,7 @@
<artifactId>log4j</artifactId>
<scope>test</scope>
</dependency>
+-->
</dependencies>
<build>
@@ -279,7 +313,9 @@
<value />
</systemProperty>
</systemProperties>
+<!--
<scanIntervalSeconds>10</scanIntervalSeconds>
+-->
</configuration>
</plugin>
@@ -653,7 +689,6 @@
WEB-INF/lib/jstl-1.1.2.jar,
WEB-INF/lib/standard-1.1.2.jar,
WEB-INF/lib/rome-0.9.jar,
- WEB-INF/lib/sitemesh-${sitemesh-version}.jar,
WEB-INF/lib/jersey-core-${jersey-version}.jar,
WEB-INF/lib/jersey-server-${jersey-version}.jar,
WEB-INF/lib/jersey-spring-${jersey-version}.jar,
@@ -834,11 +869,13 @@
<artifactId>rome</artifactId>
<version>0.9</version>
</dependency>
+<!--
<dependency>
<groupId>opensymphony</groupId>
<artifactId>sitemesh</artifactId>
<version>${sitemesh-version}</version>
</dependency>
+-->
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
Modified: camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/CamelResourceConfig.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/CamelResourceConfig.java?rev=982575&r1=982574&r2=982575&view=diff
==============================================================================
--- camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/CamelResourceConfig.java (original)
+++ camel/trunk/components/camel-web/src/main/java/org/apache/camel/web/util/CamelResourceConfig.java Thu Aug 5 12:32:13 2010
@@ -46,6 +46,7 @@ public class CamelResourceConfig extends
properties.put(PackagesResourceConfig.PROPERTY_PACKAGES, packages);
+/*
WadlGeneratorConfig config = WadlGeneratorConfig
.generator(WadlGeneratorApplicationDoc.class)
.prop("applicationDocsFile", "classpath:/application-doc.xml")
@@ -56,6 +57,7 @@ public class CamelResourceConfig extends
.build();
properties.put(ResourceConfig.PROPERTY_WADL_GENERATOR_CONFIG, config);
+*/
return properties;
}
Added: camel/trunk/components/camel-web/src/main/resources/logback.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/resources/logback.xml?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/resources/logback.xml (added)
+++ camel/trunk/components/camel-web/src/main/resources/logback.xml Thu Aug 5 12:32:13 2010
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<configuration scan="true" debug="false">
+ <!-- TODO in production mode disable the scan -->
+
+ <appender name="FILE" class="ch.qos.logback.core.FileAppender">
+ <File>target/application.log</File>
+ <Append>true</Append>
+
+ <encoder>
+ <Pattern>%-4relative [%thread] %-5level %logger{40} - %msg%n</Pattern>
+ </encoder>
+ </appender>
+
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <encoder>
+ <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
+ </encoder>
+ </appender>
+
+<!--
+ <logger name="org.fusesource.scalate.jersey" level="DEBUG" />
+ <logger name="org.fusesource.scalate" level="DEBUG" />
+-->
+
+ <logger name="org.fusesource.scalate.servlet.ServletTemplateEngine.SourceMap" level="INFO" />
+
+ <root level="info">
+ <appender-ref ref="FILE" />
+ <appender-ref ref="STDOUT" />
+ </root>
+
+</configuration>
\ No newline at end of file
Added: camel/trunk/components/camel-web/src/main/webapp/WEB-INF/scalate/layouts/default.scaml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/WEB-INF/scalate/layouts/default.scaml?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/WEB-INF/scalate/layouts/default.scaml (added)
+++ camel/trunk/components/camel-web/src/main/webapp/WEB-INF/scalate/layouts/default.scaml Thu Aug 5 12:32:13 2010
@@ -0,0 +1,110 @@
+-#
+-# Copyright (C) 2009-2010 the original author or authors.
+-# See the notice.md file distributed with this work for additional
+-# information regarding copyright ownership.
+-#
+-# Licensed under the Apache License, Version 2.0 (the "License");
+-# you may not use this file except in compliance with the License.
+-# You may obtain a copy of the License at
+-#
+-# http://www.apache.org/licenses/LICENSE-2.0
+-#
+-# Unless required by applicable law or agreed to in writing, software
+-# distributed under the License is distributed on an "AS IS" BASIS,
+-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-# See the License for the specific language governing permissions and
+-# limitations under the License.
+-#
+
+!!! Basic
+-@ var body: String
+-@ var title : String = "Camel Web Console"
+- response.setContentType("text/html")
+%html(lang="en")
+ %head
+ %meta(http-equiv="Content-Type" content="text/html; charset=utf-8")
+ %meta(name="description" content="Apache Camel Console")
+ %meta(name="keywords" content="camel,eip,web")
+
+ = include("/org/fusesource/scalate/console/console_head.scaml")
+
+ %link(href={uri("/css/site.css")} rel="stylesheet" type="text/css")
+ %link(href={uri("/css/scalate/console.css")} rel="stylesheet" type="text/css")
+ %link(href={uri("/css/sorttable.css")} rel="stylesheet" type="text/css")
+ %link(href={uri("/css/type-settings.css")} rel="stylesheet" type="text/css")
+
+
+ - if (attributes.get("noJavaScript").isEmpty)
+ %script(src={uri("/js/common.js")} type="text/javascript")
+ %script(src={uri("/js/css.js")} type="text/javascript")
+ %script(src={uri("/js/standardista-table-sorting.js")} type="text/javascript")
+
+ %title
+ = title
+
+ %body
+ .white_box
+ .header
+ .header_l
+ .header_r
+ .content
+ .content_l
+ .content_r
+ %div
+ / Banner
+ #asf_logo
+ #activemq_logo
+ %a{:href => "http://camel.apache.org/", :style => "float:left; width:280px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:10px; margin-left:100px;", :title => "a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration"} Camel
+ %a{:href => "http://www.apache.org/", :style => "float:right; width:210px;display:block;text-indent:-5000px;text-decoration:none;line-height:60px; margin-top:15px; margin-right:10px;", :title => "The Apache Software Foundation"} ASF
+ .top_red_bar
+ #site-breadcrumbs
+ - if (requestURI.startsWith("/index"))
+ %span Home
+ - else
+ %a{:href => {uri("/index")}, title => "Home"} Home
+ |
+ %a{:href => {uri("/endpoints")}, :title => "View current endpoints or create new ones"} Endpoints
+ |
+ %a{:href => {uri("/routes")}, :title => "View current routes"} Routes
+ #site-quicklinks
+ %P
+ %a{:href => "http://camel.apache.org/support.html", :title => "Get help and support using Apache Camel"} Support
+
+ %table{:border => "0"}
+ %tbody
+ %tr
+ %td{:style => "overflow:hidden;", :valign => "top", :width => "100%"}
+ .body-content
+ !~~ body
+ %td{:valign => "top"}
+ .navigation
+ .navigation_bottomon_top
+ .navigation_bottom
+ %H3 Useful Links
+ %ul.alternate{:type => "square"}
+ %li
+ %a{:href => "http://camel.apache.org/documentation.html", :title => "a powerful open source integration framework based on known Enterprise Integration Patterns with powerful Bean Integration"} Documentation
+ %li
+ %a{:href => "http://camel.apache.org/web-console.html", :title => "more help on using the Web Console"} Console Help
+ %li
+ %a{:href => "http://camel.apache.org/faq.html"} FAQ
+ %li
+ %a{:href => {uri("/api")}, :title => "View the REST API details"} API
+ %li
+ %a{:href => "http://camel.apache.org/download.html"} Downloads
+ %li
+ %a{:href => "http://camel.apache.org/discussion-forums.html"} Forums
+ .bottom_red_bar
+ .black_box
+ .footer
+ .footer_l
+ .footer_r
+ %div
+ Copyright 2005-2009 The Apache Software Foundation.
+ (
+ %a{:href => "?printable=true"}> printable version
+ )
+ = include("/org/fusesource/scalate/console/console.scaml")
+
+ .design_attribution
+ %a{:href => "http://hiramchirino.com/"} Graphic Design By Hiram
\ No newline at end of file
Modified: camel/trunk/components/camel-web/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/WEB-INF/web.xml?rev=982575&r1=982574&r2=982575&view=diff
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/WEB-INF/web.xml (original)
+++ camel/trunk/components/camel-web/src/main/webapp/WEB-INF/web.xml Thu Aug 5 12:32:13 2010
@@ -31,16 +31,6 @@
</listener>
<filter>
- <filter-name>sitemesh</filter-name>
- <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>sitemesh</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <filter>
<filter-name>Jersey Filter</filter-name>
<filter-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</filter-class>
<init-param>
@@ -48,20 +38,31 @@
<param-value>org.apache.camel.web.util.CamelResourceConfig</param-value>
</init-param>
<init-param>
- <param-name>com.sun.jersey.config.feature.Redirect</param-name>
+ <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.property.packages</param-name>
- <param-value>org.apache.camel.web</param-value>
+ <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.property.WebPageContentRegex</param-name>
- <param-value>/(images|css|js)/.*</param-value>
+ <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>
@@ -74,11 +75,27 @@
<url-pattern>/*</url-pattern>
</filter-mapping>
-
- <jsp-config>
- <jsp-property-group>
- <url-pattern>*.jsp</url-pattern>
- <include-prelude>/WEB-INF/jspf/header.jspf</include-prelude>
- </jsp-property-group>
- </jsp-config>
+ <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>
Added: camel/trunk/components/camel-web/src/main/webapp/com/sun/jersey/server/impl/wadl/WadlResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/com/sun/jersey/server/impl/wadl/WadlResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/com/sun/jersey/server/impl/wadl/WadlResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/com/sun/jersey/server/impl/wadl/WadlResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,24 @@
+<%@ import val it: WadlResource %>
+
+#{ attributes("title") = "Camel REST API"}#
+
+
+<h1>Camel REST API</h1>
+
+<p>
+ Camel supports a RESTful API for browsing and interacting with endpoints and routes to create and modify your
+ <a href="http://camel.apache.org/enterprise-integration-patterns.html">Enterprise Integration Patterns</a>.
+</p>
+
+<p>
+ Most resources are available at the very least as HTML, XML and JSON formats with some other formats being available.
+ Your web browser will serve up the HTML representation by default unless you specify the HTTP <code>Accept</code>
+ header
+ with <code>text/xml</code> or <code>application/xml</code> for XML and <code>application/json</code> for JSON.
+ Though you can typically add <b>.xml</b> or <b>.json</b> to a URI to get the XML or JSON respresentation in your browser
+ without having to mess around with <code>Accept</code> headers.
+</p>
+
+<api:resource resource="it.getRootResource"/>
+
+
Added: camel/trunk/components/camel-web/src/main/webapp/com/sun/jersey/server/impl/wadl/WadlResourceResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/com/sun/jersey/server/impl/wadl/WadlResourceResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/com/sun/jersey/server/impl/wadl/WadlResourceResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/com/sun/jersey/server/impl/wadl/WadlResourceResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,9 @@
+<%@ import val it: WadlResourceResource %>
+
+#{ attributes("title") = "Camel Resource ${it.getFullPath}"}#
+
+
+<api:resource resource="it"/>
+
+
+
Added: camel/trunk/components/camel-web/src/main/webapp/css/scalate/console.css
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/css/scalate/console.css?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/css/scalate/console.css (added)
+++ camel/trunk/components/camel-web/src/main/webapp/css/scalate/console.css Thu Aug 5 12:32:13 2010
@@ -0,0 +1,71 @@
+/**
+ * Copyright (C) 2009-2010 the original author or authors.
+ * See the notice.md file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#scalate-console {
+ position:fixed;
+ top:40px;
+ right:10px;
+ background: #FDFCAD;
+ padding:10px;
+ border: 1px solid #BDBD81;
+ font-family:Arial,Verdana,Helvetica,sans-serif;
+ font-size: 80%;
+ max-width: 400px;
+}
+
+#scalate-console .archetypes ul, #scalate-console .templates ul, #scalate-console .resources ul, #scalate-console .layouts ul {
+ padding-left:20px;
+ overflow: auto;
+}
+
+#scalate-console .toggle {
+ text-align: right;
+}
+
+#scalate-console .toggle img {
+ vertical-align: middle;
+}
+
+#scalate-console div.attributes {
+ margin: 10px;
+ overflow: auto;
+ background: white;
+}
+
+#scalate-console div.attributes table th {
+ text-align: left;
+ color: #993333;
+}
+#scalate-console div.attributes table td {
+ padding:2px;
+ border-top: 1px solid #BDBD81;
+}
+
+#scalate-console div.body {
+ margin: 10px;
+ overflow: auto;
+ max-height: 300px;
+ background: white;
+}
+
+#scalate-console div.systemProperties {
+ margin: 10px;
+ overflow: auto;
+ max-height: 300px;
+ background: white;
+}
Added: camel/trunk/components/camel-web/src/main/webapp/css/scalate/errors.css
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/css/scalate/errors.css?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/css/scalate/errors.css (added)
+++ camel/trunk/components/camel-web/src/main/webapp/css/scalate/errors.css Thu Aug 5 12:32:13 2010
@@ -0,0 +1,115 @@
+/**
+ * Copyright (C) 2009-2010 the original author or authors.
+ * See the notice.md file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/* based on the PlayFramework's CSS so it looks the same as when folks get errors in Play - thanks folks! */
+html, body {
+ margin: 0;
+ padding: 0;
+ font-family: Helvetica, Arial, Sans;
+ background: #EEEEEE;
+}
+.block {
+ padding: 20px;
+ border-bottom: 1px solid #aaa;
+}
+#scalate-error .header h1 {
+ font-weight: normal;
+ font-size: 28px;
+ margin: 0;
+}
+#scalate-error .more {
+ color: #666;
+ font-size: 80%;
+ border: none;
+}
+#scalate-error .header {
+ background: #fcd2da;
+}
+#scalate-error .header p {
+ color: #333;
+}
+#scalate-error .details {
+ background: #f6f6f6;
+}
+#scalate-error .details h2 {
+ font-weight: normal;
+ font-size: 18px;
+ margin: 0 0 10px 0;
+}
+#scalate-error .details .lineNumber {
+ float: left;
+ display: block;
+ width: 40px;
+ text-align: right;
+ margin-right: 10px;
+ font-size: 14px;
+ font-family: monospace;
+ background: #333;
+ color: #fff;
+}
+#scalate-error .details .line {
+ clear: both;
+ color: #333;
+ margin-bottom: 1px;
+}
+#scalate-error .details pre {
+ font-size: 14px;
+ margin: 0;
+ overflow-x: hidden;
+}
+#scalate-error .details .error {
+ color: #c00 !important;
+}
+#scalate-error .details .error .lineNumber {
+ background: #c00;
+}
+#scalate-error .details .errorCol {
+ background: #c00;
+ color:#fff;
+}
+#scalate-error .details a {
+ text-decoration: none;
+}
+#scalate-error .details a:hover * {
+ cursor: pointer !important;
+}
+#scalate-error .details a:hover pre {
+ background: #FAFFCF !important;
+}
+
+#scalate-error .details .stacktrace {
+ clear: both;
+ color: #333;
+ margin-bottom: 1px;
+ font-size: 10px;
+}
+
+#scalate-error .nested {
+ padding-top:10px;
+ padding-left:10px;
+}
+
+#scalate-error .nested .block {
+ padding:10px;
+}
+#scalate-error .nested .header {
+ font-size:10px;
+}
+#scalate-error .nested .header h1 {
+ font-size:16px;
+}
\ No newline at end of file
Added: camel/trunk/components/camel-web/src/main/webapp/favicon.ico
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/favicon.ico?rev=982575&view=auto
==============================================================================
Binary file - no diff available.
Propchange: camel/trunk/components/camel-web/src/main/webapp/favicon.ico
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: camel/trunk/components/camel-web/src/main/webapp/images/scalate/minus.png
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/images/scalate/minus.png?rev=982575&view=auto
==============================================================================
Binary file - no diff available.
Propchange: camel/trunk/components/camel-web/src/main/webapp/images/scalate/minus.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: camel/trunk/components/camel-web/src/main/webapp/images/scalate/plus.png
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/images/scalate/plus.png?rev=982575&view=auto
==============================================================================
Binary file - no diff available.
Propchange: camel/trunk/components/camel-web/src/main/webapp/images/scalate/plus.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: camel/trunk/components/camel-web/src/main/webapp/images/scalate/project-icon-24x24.png
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/images/scalate/project-icon-24x24.png?rev=982575&view=auto
==============================================================================
Binary file - no diff available.
Propchange: camel/trunk/components/camel-web/src/main/webapp/images/scalate/project-icon-24x24.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: camel/trunk/components/camel-web/src/main/webapp/images/scalate/project-icon-32x32.png
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/images/scalate/project-icon-32x32.png?rev=982575&view=auto
==============================================================================
Binary file - no diff available.
Propchange: camel/trunk/components/camel-web/src/main/webapp/images/scalate/project-icon-32x32.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: camel/trunk/components/camel-web/src/main/webapp/images/scalate/project-logo.png
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/images/scalate/project-logo.png?rev=982575&view=auto
==============================================================================
Binary file - no diff available.
Propchange: camel/trunk/components/camel-web/src/main/webapp/images/scalate/project-logo.png
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.api.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.api.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.api.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.api.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,87 @@
+<%@ import val it: CamelContextResource %>
+
+#{ attributes("title") = "Camel REST API"}#
+
+
+<h1>Camel REST API</h1>
+
+<p>
+ Camel supports a RESTful API for browsing and interacting with endpoints and routes to create and modify your
+ <a href="http://camel.apache.org/enterprise-integration-patterns.html">Enterprise Integration Patterns</a>.
+</p>
+
+<p>
+ Most resources are available at the very least as HTML, XML and JSON formats with some other formats being available.
+ Your web browser will serve up the HTML representation by default unless you specify the HTTP <code>Accept</code>
+ header
+ with <code>text/xml</code> or <code>application/xml</code> for XML and <code>application/json</code> for JSON.
+</p>
+
+<table>
+ <tr>
+ <th>URI</th>
+ <th>Description</th>
+ <th>Related Resources</th>
+ </tr>
+ <tr>
+ <td><a href="${uri("/")}">/</a>
+ </td>
+ <td>
+ Summary links to other resources
+ </td>
+ <td>
+ <ul>
+ <li>
+ <a href="${uri("/index.xml")}">/index.xml</a> for XML
+ </li>
+ <li>
+ <a href="${uri("/index.json")}">/index.json</a> for JSON
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="${uri("/endpoints")}">/endpoints</a></td>
+ <td>
+ The currently active endpoints
+ </td>
+ <td>
+ <ul>
+ <li>
+ <a href="${uri("/endpoints.xml")}">/endpoints.xml</a> for XML
+ </li>
+ <li>
+ <a href="${uri("/endpoints.json")}">/endpoints.json</a> for JSON
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="${uri("/routes")}">/routes</a></td>
+ <td>
+ The currently active routes
+ </td>
+ <td>
+ <ul>
+ <li>
+ <a href="${uri("/routes.xml")}">/routes.xml</a> for XML
+ </li>
+ <li>
+ <a href="${uri("/routes.json")}">/routes.json</a> for JSON
+ </li>
+ <li>
+ <a href="${uri("/routes.dot")}">/routes.dot</a> for a <a href="http://graphviz.org/">Graphviz</a>
+ DOT file for <a href="http://camel.apache.org/visualisation.html">visualising your routes</a>.
+ </li>
+ </ul>
+ </td>
+ </tr>
+ <tr>
+ <td><a href="${uri("/application.wadl")}">/application.wadl</a></td>
+ <td>
+ The <a href="https://wadl.dev.java.net/">WADL</a> description of all the available resources
+ </td>
+ <td>
+ </td>
+ </tr>
+</table>
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,41 @@
+<%@ import val it: CamelContextResource %>
+
+#{ attributes("title") = "Apache Camel ${it.getVersion}"}#
+
+
+<h1>Welcome to Apache Camel ${it.getVersion}</h1>
+
+<p>Welcome to the Web Console for instance <b>${it.getName}</b>.</p>
+<p>We hope you find the following links helpful</p>
+
+<ul>
+ <li>
+ <a href="${uri("/endpoints")}" attributes("title") = "View current endpoints or create new ones">Endpoints</a>
+ </li>
+ <li>
+ <a href="${uri("/routes")}" attributes("title") = "View current routes">Routes</a>
+ </li>
+ <li>
+ <a href="${uri("/api")}" attributes("title") = "Documentation on the REST API to Camel">API</a>
+ </li>
+</ul>
+
+<p>The following diagnostic links might be useful too...
+</p>
+
+<ul>
+ <li>
+ <a href="${uri("/components")}" attributes("title") = "View the available components you can use with Camel">Components</a>
+ </li>
+ <li>
+ <a href="${uri("/languages")}" attributes("title") = "View the available languages you can use with Camel">Languages</a>
+ </li>
+ <li>
+ <a href="${uri("/converters")}" attributes("title") = "View the available type converters currently registered with Camel">Type Converters</a>
+ </li>
+ <li>
+ <a href="${uri("/systemProperties")}" attributes("title") = "View the System Properties used to create this service">System Properties</a>
+ </li>
+</ul>
+
+<p>Lets take it for a ride!</p>
\ No newline at end of file
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.systemProperties.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.systemProperties.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.systemProperties.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/CamelContextResource.systemProperties.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,20 @@
+<%@ import val it: CamelContextResource %>
+
+#{ attributes("title") = "System Properties"}#
+
+
+<h1>System Properties</h1>
+
+
+<table>
+ <tr>
+ <th>Name</th>
+ <th>Value</th>
+ </tr>
+ #for(entry <- it.getSystemProperties)
+ <tr>
+ <td>${entry.getKey}</td>
+ <td>${entry.getValue}</td>
+ </tr>
+ #end
+</table>
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ComponentResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ComponentResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ComponentResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ComponentResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,15 @@
+<%@ import val it: ComponentResource %>
+
+#{ attributes("title") = "${it.getId}"}#
+
+
+<h1>${it.getId}</h1>
+
+<p>
+ Welcome to the ${it.getId} component.
+</p>
+<p>
+ For more information see the <a href="http://camel.apache.org/${it.getId}.html">documentation</a>
+</p>
+
+
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ComponentsResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ComponentsResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ComponentsResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ComponentsResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,22 @@
+<%@ import val it: ComponentsResource %>
+
+#{ attributes("title") = "Components"}#
+
+
+<h1>Components</h1>
+
+
+<table>
+ <tr>
+ <th>Component</th>
+ <th>Documentation</th>
+ </tr>
+ #for(id <- it.getComponentIds)
+ <tr>
+ <td><a href="components/${id}">${id}</a></td>
+ <td><a href="http://camel.apache.org/${id}.html">documentation</a></td>
+ </tr>
+ #end
+</table>
+
+
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ConvertersFromResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ConvertersFromResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ConvertersFromResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ConvertersFromResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,22 @@
+<%@ import val it: ConvertersFromResource %>
+
+#{ attributes("title") = "Type Converters from: ${it.getType.getCanonicalName}"}#
+
+
+<h1>Type Converters from: ${it.getType.getCanonicalName}</h1>
+
+<table>
+ <tr>
+ <th>To Type</th>
+ <th>Converter</th>
+ </tr>
+ #for(entry <- it.getConverters)
+ <tr>
+ <td>${entry.getKey}</td>
+ <td>${entry.getValue}</td>
+ </tr>
+ #end
+</table>
+
+
+
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ConvertersResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ConvertersResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ConvertersResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ConvertersResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,21 @@
+<%@ import val it: ConvertersResource %>
+
+#{ attributes("title") = "Type Converters"}#
+
+
+<h1>Type Converters</h1>
+
+
+<table>
+ <tr>
+ <th>From Type</th>
+ </tr>
+ #for(entry <- it.getFromClassTypes)
+ <tr>
+ <td><a href="converters/${entry.getValue.getName}">${entry.getKey}</a></td>
+ </tr>
+ #end
+</table>
+
+
+
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,20 @@
+<%@ import val it: EndpointResource %>
+ #{ attributes("title") = "Endpoint " + it.getUri}#
+ <h1>Endpoint: ${it.getUri}</h1>
+
+ <ul>
+ <li><a class='send' href='${uri(it.getHref + "/send")}'>Send to this endpoint</a></li>
+ </ul>
+
+ #if(it.getBrowsableEndpoint != null)
+ <table>
+ <tr>
+ <th>Message ID (${it.getBrowsableEndpoint.getExchanges.size} in total)</th>
+ </tr>
+ #for(exchange <- it.getBrowsableEndpoint.getExchanges)
+ <tr>
+ <td><a class='message' href='${uri(it.getHref + "/messages/" + exchange.getExchangeId)}' attributes("title") = "View this message">${exchange.getExchangeId}</a></td>
+ </tr>
+ #end
+ </table>
+ #end
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointResource.send.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointResource.send.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointResource.send.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointResource.send.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,13 @@
+<%@ import val it: EndpointResource %>
+
+#{ attributes("title") = "Endpoint " + it.getUri}#
+
+
+<h1>Endpoint: ${it.getUri}</h1>
+
+<form action='${uri(it.getHref)}' method="post" name="sendMessage">
+ <input type="submit" value="Send"> <input type="reset"> <br>
+ <textarea name="body" rows="30" cols="80"></textarea>
+</form>
+
+
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointsResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointsResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointsResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/EndpointsResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,39 @@
+<%@ import val it: EndpointsResource %>
+
+#{ attributes("title") = "Endpoints"}#
+
+
+<h2>Endpoints</h2>
+
+<ul>
+ #for(i <- it.getEndpoints)
+ <li><a class='endpoint' href='${uri(i.getHref)}'>${i.getUri}</a>
+ #end
+</ul>
+
+<h2>Create New Endpoint</h2>
+
+<form action="${uri("/endpoints")}" method="post" name="createEndpoint">
+ <table>
+ #if(!(it.getError isEmpty))
+ <tr>
+ <td colspan="2" align="center" class="error">
+ ${it.getError}
+ </td>
+ </tr>
+ #end
+ <tr>
+ <td>
+ Please enter the new endpoint URI
+ </td>
+ <td>
+ <input type="text" name="uri" value="${it.getNewUri}" width="80">
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" align="center">
+ <input type="submit" value="Create"> <input type="reset">
+ </td>
+ </tr>
+ </table>
+</form>
\ No newline at end of file
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ExchangeResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ExchangeResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ExchangeResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/ExchangeResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,57 @@
+<%@ import val it: ExchangeResource %>
+
+#{ attributes("title") = "Exchange " + it.getExchangeId}#
+
+
+<h1>Exchange: ${it.getExchangeId}</h1>
+
+
+<table>
+ <tr>
+ <td valign="top">
+ <table>
+ <tr>
+ <th colspan="2">Properties</th>
+ </tr>
+ <tr>
+ <th>Name</th>
+ <th>Value</th>
+ </tr>
+ #for(entry <- it.getProperties)
+ <tr>
+ <td>${entry.getKey}</td>
+ <td><a class="type" attributes("title") = "${entry.getValue.getClass.getCanonicalName}">${entry.getValue}</a></td>
+ </tr>
+ #end
+ </table>
+ </td>
+ <td valign="top">
+ <table>
+ <tr>
+ <th colspan="2">Headers</th>
+ </tr>
+ <tr>
+ <th>Name</th>
+ <th>Value</th>
+ </tr>
+ #for(entry <- it.getHeaders)
+ <tr>
+ <td>${entry.getKey}</td>
+ <td><a class="type" attributes("title") = "${entry.getValue.getClass.getCanonicalName}">${entry.getValue}</a></td>
+ </tr>
+ #end
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <th colspan="2">
+ Message Body is Java Class: ${it.getIn.getBody.getClass.getCanonicalName}
+ </th>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <div class="message">${escape(it.getIn.getBody)}</div>
+ </td>
+ </tr>
+</table>
+
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/LanguageResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/LanguageResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/LanguageResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/LanguageResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,15 @@
+<%@ import val it: LanguageResource %>
+
+#{ attributes("title") = it.getId}#
+
+
+<h1>${it.getId}</h1>
+
+<p>
+ Welcome to the ${it.getId} language.
+</p>
+<p>
+ For more information see the <a href="http://camel.apache.org/${it.getId}.html">documentation</a>
+</p>
+
+
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/LanguagesResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/LanguagesResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/LanguagesResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/LanguagesResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,21 @@
+<%@ import val it: LanguagesResource %>
+
+#{ attributes("title") = "Languages"}#
+
+<h1>Languages</h1>
+
+
+<table>
+ <tr>
+ <th>Language</th>
+ <th>Documentation</th>
+ </tr>
+ #for(id <- it.getLanguageIds)
+ <tr>
+ <td><a href="languages/${id}">${id}</a></td>
+ <td><a href="http://camel.apache.org/${id}.html">documentation</a></td>
+ </tr>
+ #end
+</table>
+
+
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource.edit.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource.edit.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource.edit.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource.edit.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,70 @@
+<%@ import val it: RouteResource %>
+
+#{ attributes("title") = "Edit " + it.getRoute.getId}#
+
+<script type='text/javascript' src="${uri("/js/dojo/dojo.js")}"></script>
+<script type='text/javascript'
+ src="${uri("/js/bespin/editor/embed.js")}"></script>
+<script type='text/javascript' src="${uri("/js/route.js")}"></script>
+
+
+<form id="routeForm" action="${uri("/routes/" + it.getRoute.getId)}"
+ method="post">
+<table>
+ <tr>
+ <td>
+ <h2>Edit ${it.getRoute.getId} in ${it.getLanguage}</h2>
+ </td>
+ <td><input type="submit" value="Save"> as <select
+ id="language" name="language">
+ <option value="Xml"
+ #if(it.getLanguage == "Xml")selected#end>Xml</option>
+ <option value="Groovy"
+ #if(it.getLanguage == "Groovy")selected#end>Groovy</option>
+ <option value="Ruby"
+ #if(it.getLanguage == "Ruby")selected#end>Ruby</option>
+ <option value="Scala"
+ #if(it.getLanguage == "Scala")selected#end>Scala</option>
+ </select></td>
+ </tr>
+ <tr>
+ <td colspan="2"><textarea id="route" name="route"
+ onchange="dojo.byId('edited').value = true;"
+ style="width: 800px; height: 300px; border: 10px solid #ddd; -moz-border-radius: 10px; -webkit-border-radius: 10px;">${it.getRouteDefinition}</textarea>
+ <input id="edited" name="edited" type="hidden" value="false" /></td>
+ </tr>
+</table>
+
+<div class="error">${it.getError}</div>
+
+</form>
+
+<!-- Form using Bespin editor not working for some reason... it mangles the route xml so that
+ it can't be loaded back into Camel
+
+<form id="routeForm" action="${uri("/routes/" + it.getRoute.getId)}" method="post">
+<table>
+ <tr>
+ <td>
+ <h2>Edit ${it.getRoute.getId}</h2>
+ </td>
+ <td>
+ <input type="button" value="Save" onclick="submitRoute()">
+ </td>
+ <td>
+ <textarea id="route" name="route" rows="1" cols="1" style="visibility: hidden;"></textarea>
+ </td>
+ </tr>
+</table>
+
+<div class="error">${it.getError}</div>
+
+<div id="editor"
+ style="height: 300px; border: 10px solid #ddd; -moz-border-radius: 10px; -webkit-border-radius: 10px;">${it.getRouteXml}
+</div>
+
+</form>
+
+-->
+
+
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RouteResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,24 @@
+<%@ import val it: RouteResource %>
+
+#{ attributes("title") = "Route ${it.getRoute.getId}"}#
+
+ <link href='${uri("/css/prettify/prettify.css")}' type="text/css" rel="stylesheet" />
+ <script type="text/javascript" src='${uri("/js/prettify/prettify.js")}'></script>
+
+<body onload="prettyPrint()">
+
+<h2>Route ${it.getRoute.getId}</h2>
+
+<p>${it.getRoute.getDescription.getText}</p>
+
+<div class="route">
+<pre class="prettyprint">${escape(it.getRouteXml)}</pre>
+</div>
+
+<ul>
+<li><a href='${uri("/routes/" + it.getRoute.getId + "/lang/xml/edit")}'>Edit Route in Xml</a>
+<li><a href='${uri("/routes/" + it.getRoute.getId + "/lang/groovy/edit")}'>Edit Route in Groovy</a>
+<li>Edit Route in Ruby
+<li>Edit Route in Scala
+</ul>
+
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RoutesResource.create.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RoutesResource.create.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RoutesResource.create.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RoutesResource.create.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,75 @@
+<%@ import val it: RoutesResource %>
+
+#{ attributes("title") = "Create New Route"}#
+
+ <script type='text/javascript' src="${uri("/js/dojo/dojo.js")}"></script>
+ <script type='text/javascript' src="${uri("/js/bespin/editor/embed.js")}"></script>
+ <script type='text/javascript' src="${uri("/js/route.js")}"></script>
+
+
+<form id="routeForm" action="${uri("/routes")}" method="post">
+<table>
+ <tr>
+ <td>
+ <h2>Create New Route</h2>
+ </td>
+ <td>
+ <input type="submit" value="Save"> as <select
+ id="language" name="language">
+ <option value="Xml" selected>Xml</option>
+ <option value="Groovy">Groovy</option>
+ <option value="Ruby">Ruby</option>
+ <option value="Scala">Scala</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"><textarea id="route" name="route"
+ onchange="dojo.byId('edited').value = true;"
+ style="width: 800px; height: 300px; border: 10px solid #ddd; -moz-border-radius: 10px; -webkit-border-radius: 10px;">
+<route xmlns="http://camel.apache.org/schema/spring">
+ <description>This is an example route.</description>
+ <from uri="seda:Some.Endpoint"/>
+ <to uri="seda:Some.Other.Endpoint"/>
+</route>
+ </textarea>
+ </td>
+ </tr>
+</table>
+
+<div class="error">${it.getError}</div>
+
+</form>
+
+<!--
+
+<form id="routeForm" action="${uri("/routes")}" method="post">
+<table>
+ <tr>
+ <td>
+ <h2>Create New Route</h2>
+ </td>
+ <td>
+ <input type="button" value="Save" onclick="submitRoute()">
+ </td>
+ <td>
+ <textarea id="route" name="route" rows="1" cols="1" style="visibility: hidden;"></textarea>
+ </td>
+ </tr>
+</table>
+
+<div class="error">${it.getError}</div>
+
+<div id="editor"
+ style="height: 300px; border: 10px solid #ddd; -moz-border-radius: 10px; -webkit-border-radius: 10px;">
+<route xmlns="http://camel.apache.org/schema/spring">
+ <from uri="seda:Some.Endpoint"/>
+ <to uri="seda:Some.Other.Endpoint"/>
+</route>
+</div>
+
+</form>
+
+-->
+
+
Added: camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RoutesResource.index.ssp
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RoutesResource.index.ssp?rev=982575&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RoutesResource.index.ssp (added)
+++ camel/trunk/components/camel-web/src/main/webapp/org/apache/camel/web/resources/RoutesResource.index.ssp Thu Aug 5 12:32:13 2010
@@ -0,0 +1,43 @@
+<%@ import val it: RoutesResource %>
+
+#{ attributes("title") = "Routes"}#
+
+
+<h2>Routes</h2>
+
+<table>
+ <tr>
+ <th>Route</th>
+ <th colspan="2">Status</th>
+ </tr>
+<ul>
+ #for(i <- it.getRoutes)
+ <tr>
+ <td>
+ <a href='${uri("/routes/" + i.getId)}'>${i.getId}</a> ${i.getDescription.getText}
+ </td>
+ <td class="${i.getStatus}">
+ ${i.getStatus}
+ </td>
+ <td>
+ <form action='${uri("/routes/" + i.getId + "/status")}' method="POST" name="setStatus">
+ #if(i.isStartable)
+ <input type="hidden" name="status" value="start">
+ <input type="submit" value="Start">
+ #end
+ #if(i.isStoppable)
+ <input type="hidden" name="status" value="stop">
+ <input type="submit" value="Stop">
+ #end
+ </form>
+ </td>
+ </tr>
+ #end
+</ul>
+</table>
+
+<ul>
+<li><a href='${uri("/routes/create")}'>Create New Route</a>
+</ul>
+
+
Modified: camel/trunk/components/camel-web/src/profiles/osgi/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/profiles/osgi/webapp/WEB-INF/web.xml?rev=982575&r1=982574&r2=982575&view=diff
==============================================================================
--- camel/trunk/components/camel-web/src/profiles/osgi/webapp/WEB-INF/web.xml (original)
+++ camel/trunk/components/camel-web/src/profiles/osgi/webapp/WEB-INF/web.xml Thu Aug 5 12:32:13 2010
@@ -38,15 +38,6 @@
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
- <filter>
- <filter-name>sitemesh</filter-name>
- <filter-class>com.opensymphony.module.sitemesh.filter.PageFilter</filter-class>
- </filter>
-
- <filter-mapping>
- <filter-name>sitemesh</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
<filter>
<filter-name>Jersey Filter</filter-name>
@@ -57,7 +48,7 @@
<param-value>org.apache.camel.web.util.CamelOSGIResourceConfig</param-value>
</init-param>
<init-param>
- <param-name>com.sun.jersey.config.feature.Redirect</param-name>
+ <param-name>com.sun.jersey.config.feature.FilterForwardOn404</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
@@ -65,12 +56,16 @@
<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>
+ <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.WebPageContentRegex</param-name>
- <param-value>/(images|css|js)/.*</param-value>
+ <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>
@@ -83,11 +78,4 @@
<url-pattern>/*</url-pattern>
</filter-mapping>
-
- <jsp-config>
- <jsp-property-group>
- <url-pattern>*.jsp</url-pattern>
- <include-prelude>/WEB-INF/jspf/header.jspf</include-prelude>
- </jsp-property-group>
- </jsp-config>
</web-app>
Modified: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/CreateEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/CreateEndpointTest.java?rev=982575&r1=982574&r2=982575&view=diff
==============================================================================
--- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/CreateEndpointTest.java (original)
+++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/htmlunit/CreateEndpointTest.java Thu Aug 5 12:32:13 2010
@@ -24,7 +24,8 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.openqa.selenium.WebElement;
-import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.assertThat;
+
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
Modified: camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/resources/EndpointsHtmlTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/resources/EndpointsHtmlTest.java?rev=982575&r1=982574&r2=982575&view=diff
==============================================================================
--- camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/resources/EndpointsHtmlTest.java (original)
+++ camel/trunk/components/camel-web/src/test/java/org/apache/camel/web/resources/EndpointsHtmlTest.java Thu Aug 5 12:32:13 2010
@@ -28,14 +28,14 @@ public class EndpointsHtmlTest extends T
public void testCamelAsHtml() throws Exception {
String response = resource("/").accept("text/html").get(String.class);
- assertTrue("Should contain <html> but was: " + response, response.contains("<html>"));
+ assertTrue("Should contain <html> but was: " + response, response.contains("<html"));
}
@Test
public void testEndpointsAsHtml() throws Exception {
String response = resource("endpoints").accept("text/html").get(String.class);
- assertTrue("Should contain <html> but was: " + response, response.contains("<html>"));
+ assertTrue("Should contain <html> but was: " + response, response.contains("<html"));
}
}
\ No newline at end of file
|