Added: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/pom.xml URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/pom.xml?rev=941149&view=auto ============================================================================== --- geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/pom.xml (added) +++ geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/pom.xml Wed May 5 05:15:31 2010 @@ -0,0 +1,83 @@ + + + + + + + + 4.0.0 + + + org.apache.geronimo.samples + webfragment-javaee6 + 3.0-SNAPSHOT + + + webfragment-javaee6-war + Geronimo Samples :: webfragment-javaee6 :: WAR + war + + Geronimo Samples. WEB Module + + + + org.apache.geronimo.samples + fragment1 + ${version} + + + org.apache.geronimo.samples + fragment2 + ${version} + + + org.apache.geronimo.samples + fragment3 + ${version} + + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + process-resources + copy-parent-site + + run + + + + Copying site directory from parent + + + + + + + + + + + Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/pom.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/pom.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/pom.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/WelcomePage.java URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/WelcomePage.java?rev=941149&view=auto ============================================================================== --- geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/WelcomePage.java (added) +++ geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/WelcomePage.java Wed May 5 05:15:31 2010 @@ -0,0 +1,99 @@ +/** +* 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. +**/ + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + + +//@WebServlet(name="WelcomePage", urlPatterns={"/"}) +public class WelcomePage extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + try { + + out.println(""); + out.println(""); + out.println("Servlet testServlet"); + out.println(""); + out.println(""); + out.println("

Servlet 3.0 Web fragment Example


"); + out.println("Beside web.xml,you can see web-fragment.xml under \\WEB-INF\\lib\\fragment_name.jar\\META-INF\\web-fragment.xml.
"); + out.println("The servlet,filter,listener information are defined there."); + out.println("

Start shopping!

"); + out.println("
"); + out.println(""); + out.println("
"); + out.println(""); + out.println(""); + + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/WelcomePage.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/WelcomePage.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/WelcomePage.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/messageRecord.java URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/messageRecord.java?rev=941149&view=auto ============================================================================== --- geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/messageRecord.java (added) +++ geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/messageRecord.java Wed May 5 05:15:31 2010 @@ -0,0 +1,94 @@ +/** +* 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. +**/ + + +import java.io.IOException; +import java.io.PrintWriter; +import javax.servlet.ServletException; +import javax.servlet.annotation.WebServlet; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + + +@WebServlet(name="messageRecord", urlPatterns={"/messageRecord"}) +public class messageRecord extends HttpServlet { + + /** + * Processes requests for both HTTP GET and POST methods. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + protected void processRequest(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = response.getWriter(); + String listenerMessage=(String) request.getServletContext().getAttribute("listenerMessage"); + try { + out.println(""); + out.println(""); + out.println("Servlet messageRecord"); + out.println(""); + out.println(""); + out.println("

The absolute-ordering of fragments in web.xml is: fragment3,fragment2,fragment1,filter chain responses in this order.

"); + out.println("

FilterMessage is:
" + request.getAttribute("filterMessage") + "
The Listener Message is: "+listenerMessage+"

"); + out.println(""); + out.println(""); + } finally { + out.close(); + } + } + + // + /** + * Handles the HTTP GET method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Handles the HTTP POST method. + * @param request servlet request + * @param response servlet response + * @throws ServletException if a servlet-specific error occurs + * @throws IOException if an I/O error occurs + */ + @Override + protected void doPost(HttpServletRequest request, HttpServletResponse response) + throws ServletException, IOException { + processRequest(request, response); + } + + /** + * Returns a short description of the servlet. + * @return a String containing servlet description + */ + @Override + public String getServletInfo() { + return "Short description"; + }// + +} Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/messageRecord.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/messageRecord.java ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/java/org/apache/geronimo/samples/javaee6/webfragment/messageRecord.java ------------------------------------------------------------------------------ svn:mime-type = text/plain Added: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/geronimo-web.xml URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/geronimo-web.xml?rev=941149&view=auto ============================================================================== --- geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/geronimo-web.xml (added) +++ geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/geronimo-web.xml Wed May 5 05:15:31 2010 @@ -0,0 +1,40 @@ + + + + + + + + org.geronimo.samples + FragmentDemo + 3.0 + car + + + + + + + /webfragment-javaee6 + + Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/geronimo-web.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/geronimo-web.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/geronimo-web.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/web.xml?rev=941149&view=auto ============================================================================== --- geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/web.xml (added) +++ geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/web.xml Wed May 5 05:15:31 2010 @@ -0,0 +1,46 @@ + + + + + + index.html + + + WelcomePage + WelcomePage + 1 + + + WelcomePage + /WelcomePage/* + + + + 30 + + + + + fragment3 + fragment2 + + fragment1 + + Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/web.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/web.xml ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/WEB-INF/web.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/header.html URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/header.html?rev=941149&view=auto ============================================================================== --- geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/header.html (added) +++ geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/header.html Wed May 5 05:15:31 2010 @@ -0,0 +1,55 @@ + + + + + + + Apache Geronimo Sample Applications + + + + + + + + + + + + +
+ + +   +
+ + + + + + + + +
+  Apache Geronimo Home | Documentation | Sample Applications + + Source Code | Java Docs   +
+ + + \ No newline at end of file Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/header.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/header.html ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/header.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/index.html URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/index.html?rev=941149&view=auto ============================================================================== --- geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/index.html (added) +++ geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/index.html Wed May 5 05:15:31 2010 @@ -0,0 +1,30 @@ + + + + + Apache Geronimo Sample Application + + + + + + + + + + Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/index.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/index.html ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/index.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/sample-docu.jsp URL: http://svn.apache.org/viewvc/geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/sample-docu.jsp?rev=941149&view=auto ============================================================================== --- geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/sample-docu.jsp (added) +++ geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/sample-docu.jsp Wed May 5 05:15:31 2010 @@ -0,0 +1,37 @@ + + +<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> + + + Sample for webfragment-javaee6 + + + + + + +

This is a sample to demo servlet 3.0 new feature: web fragments in a war package.

+
+ +Go + + + +
+ + Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/sample-docu.jsp ------------------------------------------------------------------------------ svn:eol-style = native Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/sample-docu.jsp ------------------------------------------------------------------------------ svn:keywords = Date Revision Propchange: geronimo/samples/trunk/samples/javaee6/webfragment-javaee6/webfragment-javaee6-war/src/main/webapp/sample-docu.jsp ------------------------------------------------------------------------------ svn:mime-type = text/plain