Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--

    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.

    Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.

    The contents of this file are subject to the terms of either the GNU
    General Public License Version 2 only ("GPL") or the Common Development
    and Distribution License("CDDL") (collectively, the "License").  You
    may not use this file except in compliance with the License.  You can
    obtain a copy of the License at
    http://glassfish.java.net/public/CDDL+GPL_1_1.html
    or packager/legal/LICENSE.txt.  See the License for the specific
    language governing permissions and limitations under the License.

    When distributing the software, include this License Header Notice in each
    file and include the License file at packager/legal/LICENSE.txt.

    GPL Classpath Exception:
    Oracle designates this particular file as subject to the "Classpath"
    exception as provided by Oracle in the GPL Version 2 section of the License
    file that accompanied this code.

    Modifications:
    If applicable, add the following below the License Header, with the fields
    enclosed by brackets [] replaced by your own identifying information:
    "Portions Copyright [year] [name of copyright owner]"

    Contributor(s):
    If you wish your version of this file to be governed by only the CDDL or
    only the GPL Version 2, indicate your decision by adding "[Contributor]
    elects to include this software in this distribution under the [CDDL or GPL
    Version 2] license."  If you don't indicate a single choice of license, a
    recipient has the option to distribute your version of this file under
    either the CDDL, the GPL Version 2 or to extend the choice of license to
    its licensees as provided above.  However, if you add GPL Version 2 code
    and therefore, elected the GPL Version 2 license, then the option applies
    only if the new code is made subject to such option by the copyright
    holder.

-->
<html><head><title>Multipart Web app Example</title></head>


    <body>
        <h1>Multipart Web app Example</h1>

        <p>This example demonstrates how to develop RESTful web service with
            demonstrating JAX-RS Integration with MIME MultiPart Message Formats and an EE 6 compliant Web container.</p>

        <h2>Running the Example</h2>

        <!--<p>You can run the example using embedded GlassFish as follows:</p>

        <p>Build and deploy the project by executing maven from the project directory</p>
        <blockquote><code>mvn clean package embedded-glassfish:run</code></blockquote>-->
        <p>You can run the example using Jetty as follows:</p>
        <blockquote><code>mvn clean package jetty:run</code></blockquote>

        <p>Following steps are using <a href="http://curl.haxx.se/">cURL</a> command line tool:</p>
        <blockquote>
            <table border="1">
                <tr>
                    <th>Description</th>
                    <th>URL</th>
                    <th>sample request using curl</th>
                </tr>
                <tr>
                    <td>POST message returning entire string</td>
                    <td><code><a href="http://localhost:8080/multipart-webapp/form/part">http://localhost:8080/multipart-webapp/form/part</a></code></td>
                    <td><code>curl -X POST -F "part=part1"  http://localhost:8080/multipart-webapp/form/part</code></td>
                </tr>
                <tr>
                    <td>POST message returning part filename string.</td>
                    <td><code><a href="http://localhost:8080/multipart-webapp/form/part-file-name">http://localhost:8080/multipart-webapp/form/part-file-name</a></code></td>
                    <!--<td><code>OTHER c d</code></td> ??? -->
                    <td><i>Be sure to execute this curl from project directory where pom.xml resides</i><br><code>curl -X POST -F "[email protected]"  http://localhost:8080/multipart-webapp/form/part-file-name</code></td>
                </tr>
                <tr>
                    <td>POST message returning xml jaxb part string.</td>
                    <td><code><a href="http://localhost:8080/multipart-webapp/form/xml-jaxb-part">http://localhost:8080/multipart-webapp/form/xml-jaxb-part</a></code></td>
                    <td><i>No curl sample available, please check test sources.</i></td>
                </tr>
            </table>
        </blockquote>
    </body>
</html>