org.openwms.web.flex.servlet
Class UploadServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.openwms.web.flex.servlet.UploadServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class UploadServlet
extends javax.servlet.http.HttpServlet

An UploadServlet.

Since:
0.1
Version:
$Revision: 1409 $
Author:
Heiko Scherrer
See Also:
Serialized Form

Constructor Summary
UploadServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Noting is done here.
protected  void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Try to resolve the post request parameter named Filedata and read the data.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UploadServlet

public UploadServlet()
Method Detail

doGet

protected void doGet(javax.servlet.http.HttpServletRequest req,
                     javax.servlet.http.HttpServletResponse res)
              throws javax.servlet.ServletException,
                     IOException
Noting is done here. The request is ignored.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
req - An HttpServletRequest object that contains the request the client has made of the servlet
res - An HttpServletResponse object that contains the response the servlet sends to the client
Throws:
javax.servlet.ServletException - If the request for the GET could not be handled
IOException - If an input or output error is detected when the servlet handles the GET request
See Also:
HttpServlet.doGet(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

doPost

protected void doPost(javax.servlet.http.HttpServletRequest req,
                      javax.servlet.http.HttpServletResponse res)
               throws javax.servlet.ServletException,
                      IOException
Try to resolve the post request parameter named Filedata and read the data. That data is interpreted as image data. An UserService is used to assign the image to an User. The Users username must be a part of the request. Append a request parameter with the name selectedUser.

Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
req - An HttpServletRequest object that contains the request the client has made of the servlet
res - An HttpServletResponse object that contains the response the servlet sends to the client
Throws:
IOException - If an input or output error is detected when the servlet handles the request
javax.servlet.ServletException - If the request for the POST could not be handled
See Also:
javax.servlet.http.HttpServlet#doPost(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse), org.openwms.common.service.UserService


Copyright © 2005-2011 openwms.org. All Rights Reserved.