You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wink.apache.org by lr...@apache.org on 2013/09/26 06:50:26 UTC
svn commit: r1526385 - in /wink/sandbox/lresende/sample-jaxrs-webapp:
pom.xml src/main/java/accept/ src/main/java/accept/Resource.java
src/main/webapp/WEB-INF/application src/main/webapp/WEB-INF/web.xml
Author: lresende
Date: Thu Sep 26 04:50:26 2013
New Revision: 1526385
URL: http://svn.apache.org/r1526385
Log:
Adding another scenario for sccept header
Added:
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/accept/
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/accept/Resource.java
Modified:
wink/sandbox/lresende/sample-jaxrs-webapp/pom.xml
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/application
wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/web.xml
Modified: wink/sandbox/lresende/sample-jaxrs-webapp/pom.xml
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/pom.xml?rev=1526385&r1=1526384&r2=1526385&view=diff
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/pom.xml (original)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/pom.xml Thu Sep 26 04:50:26 2013
@@ -1,64 +1,63 @@
<?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.
--->
+<!-- * 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. -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.apache.wink</groupId>
- <artifactId>wink</artifactId>
- <version>1.3.0-SNAPSHOT</version>
- </parent>
- <artifactId>sample-jaxrs-webapp</artifactId>
- <packaging>war</packaging>
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.wink</groupId>
+ <artifactId>wink</artifactId>
+ <version>1.2.0-incubating</version>
+ </parent>
+ <artifactId>sample-jaxrs-webapp</artifactId>
+ <packaging>war</packaging>
- <dependencies>
- <dependency>
- <groupId>org.apache.wink</groupId>
- <artifactId>wink-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.wink</groupId>
- <artifactId>wink-server</artifactId>
- </dependency>
- <dependency>
- <groupId>org.json</groupId>
- <artifactId>json</artifactId>
- </dependency>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.wink</groupId>
+ <artifactId>wink-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wink</groupId>
+ <artifactId>wink-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.6.1</version>
- </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.6.1</version>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+
+ <dependency>
+ <artifactId>servlet-api</artifactId>
+ <groupId>javax.servlet</groupId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
</project>
Added: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/accept/Resource.java
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/accept/Resource.java?rev=1526385&view=auto
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/accept/Resource.java (added)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/java/accept/Resource.java Thu Sep 26 04:50:26 2013
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ */
+package accept;
+
+import javax.servlet.ServletContext;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.Response;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Path("/resource/accept")
+public class Resource {
+ private static final Logger logger = LoggerFactory.getLogger(Resource.class);
+
+ @GET
+ @Path("/adaptor/hostname")
+ @Produces({ "text/plain" })
+ public Response getHostName(@Context ServletContext context) {
+ return Response.ok().entity(context.getContextPath()).build();
+ }
+
+}
Modified: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/application
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/application?rev=1526385&r1=1526384&r2=1526385&view=diff
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/application (original)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/application Thu Sep 26 04:50:26 2013
@@ -1,6 +1,7 @@
+accept.Resource
resource.Resource
resource.sub.Root
encoding.ResourceUriEncoding
#wink-379
-resource.message.body.Resource
-resource.message.body.ResourceMessageBodyWritter
\ No newline at end of file
+#resource.message.body.Resource
+#resource.message.body.ResourceMessageBodyWritter
\ No newline at end of file
Modified: wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/web.xml?rev=1526385&r1=1526384&r2=1526385&view=diff
==============================================================================
--- wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/web.xml (original)
+++ wink/sandbox/lresende/sample-jaxrs-webapp/src/main/webapp/WEB-INF/web.xml Thu Sep 26 04:50:26 2013
@@ -26,6 +26,7 @@
<servlet-class>org.apache.wink.server.internal.servlet.AdminServlet</servlet-class>
</servlet>
+<!--
<servlet-mapping>
<servlet-name>restSdkAdmin</servlet-name>
<url-pattern>/admin</url-pattern>
@@ -51,7 +52,7 @@
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
-
+ -->
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>