Package com.volantis.mcs.utilities

Examples of com.volantis.mcs.utilities.HttpPostClient


        // Read all the attributes from the session
        Hashtable passTable = getDynamoAttributes(session, parameterTable,
                                                 formName);               
                                                
        // Send the POST request to ATG.       
        HttpPostClient postClient = sendPostData(request, session,
                                            passTable, DARGS, formName);
   
        // Get ATG's response
        BufferedReader responseReader =
                                   (BufferedReader)postClient.getReader();       
        HttpResponseHeader responseHeader =
                                    new HttpResponseHeader(responseReader);
           
        // Dispatch the response to the user's browser
        servletUtils.dispatchUserResponse(request, response,
View Full Code Here


     */
    private HttpPostClient sendPostData(HttpServletRequest request, HttpSession session,
        Hashtable passTable, String DARGS, String formName)
        throws UnknownHostException, IOException
    {
        HttpPostClient postClient = new HttpPostClient();
        postClient.setHost(request.getServerName());
        postClient.setPort(request.getServerPort());
       
        HiddenFieldsSessionMap sessionMap = (HiddenFieldsSessionMap)session.getAttribute("_HIDDENATGFIELDS");
        postClient.setUri((String)sessionMap.getAttribute(formName, "_URL"));
       
        postClient.setRequestHeaders(servletUtils.getHeaders(request));
        postClient.setPostData(getPostData(passTable, DARGS));
        postClient.connect();
        return postClient;
    }
View Full Code Here

            // Add vform parameter to query string
            marinerTargetURL.addParameterValue("vform", formSpecifier);
            marinerTargetURL.addParameterValue("vformname", formName);
       
            // Send the POST request to ATG.       
            HttpPostClient postClient =
                    sendPostData(request, marinerTargetURL, formData);
       
            // Get ATG's response
            BufferedReader responseReader =
                    (BufferedReader)postClient.getReader();
            HttpResponseHeader responseHeader =
                    new HttpResponseHeader(responseReader);
               
            // Dispatch the response to the user's browser
            servletUtils.dispatchUserResponse(request, response,
View Full Code Here

     * @return HttpPostClient The HttpPostClient object that sent the request
     */
    private HttpPostClient sendPostData(HttpServletRequest request,
            MarinerURL targetURL, SessionFormData formData)
            throws UnknownHostException, IOException {
        HttpPostClient postClient = new HttpPostClient();       
        postClient.setHost(request.getServerName());       
        postClient.setPort(request.getServerPort());       
        postClient.setUri(targetURL.getPath()+"?"+targetURL.getQuery());
        postClient.setRequestHeaders(servletUtils.getHeaders(request));
        postClient.setPostData(getPostData(formData));
        postClient.connect();
        return postClient;
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.utilities.HttpPostClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.