Reading Parameters of a http post in JSP

I am migrating a Data Web Bean that extends EditCurrentRecord from JDev 3.1 to 3.2
In old 3.1 days, one could read the HTTP parameters using request.getParameter(). Now, the implementation of EditCurrentRecord uses an OrdHttpUploadRequest to read the parameters, which is not (!) documentated nor included as source file. Given the library.ini configuration, it belongs to some intermedia stuff ???
I somewhat understand the need for OrdHttpUploadRequest to deal with large files, but why doesn't request.getParameter work any more ? Has it something to do with Serverl 2.1 / 2.2 API ?
Pascal

The EditCurrentRecord now uses the multipart mime type in order to support interMedia. This causes the Http parameters to be in a different format that the OrdHttpRequest can decode.
null

Similar Messages

  • HTTP POST using JSP

    Is it possible to submit a data using HTTP POST from a JSP. In a JSP I am generating a XML. For example JSP URL is http://www.test/xml.jsp
    In the xml.jsp:-
    <test>
    <test1>
    Testing 1
    </test1>
    <test2>
    Testing 2
    </test2>
    </test>
    When I call http://www.test/xml.jsp, I should receive the content in the xml.jsp as a HTTP POST. Is this possible using JSP or do I have to use only servlet?
    Thanks

    Hi,
    yes, it's possible to submit data from JSP using POST method.
    It is even possible to do it from HTML. Set <form method="post"...>, that's all. You can't submit data using POST by typing any specific address etc. in Your browser, only GET parameters can be sent in such a way.
    Regards, M

  • Help!!!.....HTTP Post to JSP with parameters in URL also....

    I am trying to emulate a webpage that is POSTing info to a URL which is a JSP that also has parameters in the URL. I am having problems getting my java code to emulate doing this task manually through a web browser.
    The webpage has the following HTML code:
    <form method=post action=hello.jsp?y=60245&x=698>
    <input type="text" name="name" value="jim">
    <input type=submit name=submit value="Now">
    </form>
    ...notice that the jsp referenced above has some parameters appended to the url, but the method is post.
    Here's my code to try to do the same thing as if I manually pressed the submit button in a browser:
    URL url = new URL("hello.jsp?y=60245&x=698");
    httpConnection = (HttpURLConnection)url.openConnection();
    httpConnection.setRequestMethod("POST");
    httpConnection.setDoOutput(true);
    httpConnection.setDoInput(true);
    httpConnection.setUseCaches(false);
    httpConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
    DataOutputStream output = new DataOutputStream(httpConnection.getOutputStream());
    output.writeBytes("name=jim&submit=Now");
    output.flush();
    BufferedReader is = new BufferedReader(new InputStreamReader(httpConnection.getInputStream()));
    Writer w = new BufferedWriter(new FileWriter("CapturedHTML.html"));
    int data=0,count=0;
    while(data!=-1){
          data = is.read();
          w.write(data);
          count++;
    System.out.println(count + " bytes read");
    w.flush();
    w.close();
    is.close();
    output.close();I write out the result to a file so that I can see the HTML returned by the JSP. It's a completely different webpage than if I were to have manually clicked the submit button on a browser.
    WHY???????? How is a browser actually sending the info to the jsp when it has info both in its URL and in the post data?

    I might be wrong, but the browser could have some sort of mechanism built into it which makes sure that the parameters appended to the url are actually passed as a part of a POST requst, while a Java program might not pass them at all.
    Have you tried passing these params: y=60245&x=698 as a part of a POST request, rather than adding them to the URL.
    Also, how do u know which response from JSP is correct? They might be different but do u know which one is the correct one? Do you know what the response should look like? that would make things a lot easier as u could figure out what parameters are causing the differences in the responses u r getting.

  • Error in http post submit in Acrobat 8 and Reader 8

    I am having an error when using the submit button via http post in Adobe 8 and Reader 8.
    The http post is not properly formed and only submits the name of the first field and all of the values of the form. All the remaining fields names are not submitted.
    It works fine however if I use Adobe 7 or Reader 7.
    Anyone else have this error.
    Quinten

    I have the same problem with Reader 8. It's a bug. In http request ampersand is missing. Reaser 8 sends:
    PAR1=value_of_par1PAR2=value_of_par2PAR3=value_of_par3
    but it may be:
    PAR1=value_of_par1&PAR2=value_of_par2&PAR3=value_of_par3
    Michal

  • Retrieve data/files fro HTTP POST request in On-Demand process

    Hello,
    I would like to integrate https://github.com/blueimp/jQuery-File-Upload to my APEX 4.2 application inside XE11g. I would like to use this kind of jQuery component, multiple file upload, use Drag & Drop, image resize, size limit, filter extensions etc...
    This jQuery component and also others javascript uploaders sends data files to some defined URL. Developer need to build some servlet, php script or something on server side that will read files from HTTP request and stores it somewhere.
    Do you know how to do it in APEX? How can I read data from HTTP POST request in PL/SQL? Now I can only call my On-Demand application process from javascript, but I am not able to read any data from HTTP POST in it.
    Can I do it in APEX, or using MOD_PLSQL?
    I would like to implement this:
    1) some javascript uploader will call some URL of my application and sends HTTP POST with data files
    2) I will read data files from HTTP POST and store them into database
    3) I will create some HTTP response for javascript uploader
    Thank you for some tips

    I know about that existing plugin " Item Plugin - Multiple File Upload"
    But I doesn't work in IE and has only basic features. Licence for commercial use is also needed. I would like to use some existing jQuery plugin. There are many of these plugins with nice features. And only one problem is that I need to create some server side process/servlet/script.. that can recieve HTTP request, get files from it and stores them into DB.

  • Get file from HTTP POST (upload image)

    Hello,
    I would like to integrate http://www.plupload.com flash component to my APEX 4.1 website. I need it because I want to resize image and transform image before upload on client side, upload multiple files etc..
    But I don't know how to read image binary data from POST method.
    When I hit "Start upload" button on plupload component it makes some transformations and creates POST method like this:
    ------pluploadboundary1334433145869
    Content-Disposition: form-data; name="name"
    p16qp6jm3nhan1ca46me1ocr3tu1.jpg
    ------pluploadboundary1334433145869
    Content-Disposition: form-data; name="chunks"
    1
    ------pluploadboundary1334433145869
    Content-Disposition: form-data; name="chunk" 0
    ------pluploadboundary1334433145869
    Content-Disposition: form-data; name="file"; filename="centerd.jpg"
    Content-Type: image/jpeg
    ÿØÿà�JFIF������ÿÛ�„�
    image content
       now I would like to read content of this HTTP POST and read sended image and store it to DB.
    Question is... how can I read file sended with HTTP POST in APEX pl/sql process or pl/sql procedure?
    Thank you...
    Edited by: cardel on Apr 14, 2012 11:17 PM

    Hi,
    here are my two cents ...
    this will be a bit difficult. When you use the standard APEX File upload it is not PL/SQL handling the POST request. The request is handled by the webserver - depending on the variant you are using it is either mod_plsql, the C code of the Embedded Gateway or the APEX Listener. The webserver is also doint the insert into APEX' file repository. So I see two options:
    It might be possible to configure your plugin (don't know about it) the behave the same as a standard browser upload. Then for APEX there would be no difference - mod_plsql should handle the files accordingly.
    If you want to handle the POST request yourself, as said, you can't do this in PL/SQL. It would be possible to write a Java servlet doing this and deploy that servlet on the same container as the APEX Listener (when using Apache with mod_plsql you would need an additional Java server for that) ....
    Hope this helps ...
    Best regards
    -Carsten

  • Invoking http post from BPEL is not passing parameters

    Hi,
    I have a simple BPEL process where I am trying to send an xml string in a request
    parameter to a servlet. Servlet is pretty simple. It just prints the request parameters and returns. But problem is that I am not getting any request
    parameters when I am using http post but everything works fine when using
    http get.
    Enclosed is the wsdl that I am using.
    Any information will be of great help
    Thanks
    Rajesh
    <?xml version="1.0" encoding="utf-8"?>
    <definitions
    targetNamespace="http://xmlns.oracle.com/OISService"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:client="http://xmlns.oracle.com/OISService"
    xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    >
    <types>
    <xsd:schema elementFormDefault="qualified"
    targetNamespace="http://xmlns.oracle.com/OISService"
    xmlns="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="header">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="status" type="xsd:string"/>
    <xsd:element name="description" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="responsedata" type="xsd:string"/>
    </xsd:schema>
    </types>
    <message name="SendDataToOISRequestMessage">
    <part name="xmldata" element="client:responsedata"/>
    </message>
    <message name="SendDataToOISResponseMessage">
    <part name="payload" element="client:header"/>
    </message>
    <portType name="SendDataToOIS">
    <operation name="process">
    <input message="client:SendDataToOISRequestMessage"/>
    <output message="client:SendDataToOISResponseMessage"/>
    </operation>
    </portType>
    <binding name="SendDataToOIS" type="client:SendDataToOIS">
    <http:binding verb="POST"/>
    <operation name="process">
    <http:operation location="/Class1"/>
    <input>
    <mime:mimeXml part="xmldata"/>
    <mime:content type="text/xml"/>
    </input>
    <output>
    <mime:mimeXml part="payload"/>
    <mime:content type="text/xml"/>
    </output>
    </operation>
    </binding>
    <service name="SendDataTOOISService">
    <port name="SendDataToOIS" binding="client:SendDataToOIS">
    <http:address location="http://localhost:8888/j2ee/servlet"/>
    </port>
    </service>
    <plnk:partnerLinkType name="SendDataToOIS">
    <plnk:role name="SendDataToOISProvider">
    <plnk:portType name="client:SendDataToOIS"/>
    </plnk:role>
    </plnk:partnerLinkType>
    </definitions>

    In the bpel you can make a http-binding instead of the default soap-binding.
    Maybe this can help you making the call to the servlet/jsp.

  • Sends URL to my jsp or servlet then it redirects to an ext. site http post

    Hi,
    A user sends URL request to my jsp or servlet and then it redirects to an external site with a http or https post (not get). The post has a number of name/value parameters that are sent with it.
    How can I accomplish this?
    Thanks,
    John

    http://java.sun.com/products/jsp/tags/11/syntaxref11.fm9.html

  • How to send HTTP Post to URL (third party software) in JSP/JSPDynpage

    Hello,
    we want to integrate a third party application in our Portal Component (JSPDynpage using JSP and HTMLB). This third party component is called like this:
    http://servername:port/cgi-bin/cgi.exe?request=map&format=html&swldy_ace=GDF&swldy_image_format=p n g&width=525&height=375
    How can we do this in the JSP using HTMLB?
    Thanks for your help.
    Best regards,
    Daniel

    Hi Detlev,
    thanks for your hint regarding the App. Integrator, but it seemn not to be what we want to do: We call a CGI and get a JEPG Image back as request.
    Now we used the java.net.URLConnection to do the HTTP post in the JSPDynpage:
    // send HTTP POST
    try {
      u = new URL("http://server/path/ourcgi.exe");
    } catch(MalformedURLException ex) {
      System.err.println("MalformedURLException");
    // build query sting      
    String query = "request=plot&format=jpeg&template_name=......."
    int cl = query.length();
    try {
      // open the connection and prepare it to POST
      URLConnection uc = u.openConnection();
      uc.setDoOutput(true);
      uc.setDoInput(true);
      uc.setAllowUserInteraction(false);
      DataOutputStream dos = new DataOutputStream(uc.getOutputStream());
      dos.writeBytes(query);
      dos.close();
    } catch ...
    Best regards,
    Daniel

  • Http post with parameters

    Hi All,
    We want to send an HTTP post with parameters,  and we are not sure how to do that.  We tried to do that like the code below,but we get the parameters in the body and not in the header ...
      DATA lo_client      TYPE REF TO  if_http_client.
      DATA lv_status_code TYPE i.
      DATA lv_reason      TYPE string.
      CALL METHOD cl_http_client=>create_by_destination
        EXPORTING
          destination  = 'ZRFC_TEST'
        IMPORTING
          client       = lo_client.
      lo_client->request->set_method( if_http_request=>co_request_method_post ).
      cl_http_utility=>set_request_uri( request = lo_client->request
                                        uri     = '?param1=value1' ).
      lo_client->send( ).
      lo_client->receive( ).
      lo_client->response->get_status( IMPORTING code   = lv_status_code
                                                 reason = lv_reason ).
    Thanks a lot,
    Tuvia.

    Hi,
    what do you mean by "parameters on the query". In any http request you can have two types of variables: POST or GET. The post variables are transferred in http header and you can add them using methods from my previous post. GET variables are transferred in URL. HTTP client has a method APPEND_FIELD_URL which can be used to add variable into URL string.
    Cheers

  • How would I do a http post of the below listed XML string within a JSP?

    Hi,
    How would I do a http post of the below listed XML string within a JSP?
    <DoService xmlns="http://www.gdinrw.org/wss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" service="WSS" version="1.0">
    <ServiceRequest DCP="HTTP_POST" mimeType="text/xml" encoding="UTF-8"><![CDATA[REQUEST=GetCapabilities&SERVICE=WMS]]></ServiceRequest>
    <AuthMethod>urn:opengeospatial:authNMethod:OWS:1.0:password</AuthMethod>
    <Credentials>guest,guest</Credentials>
    <FacadeUrl>https://bern:8443/wss_umn_wms/WSS</FacadeUrl>
    </DoService>
    Thanks,
    John

    Yes,
    I need to set up data as POST format before I POST it.
    To be more specific I know how to post within a JSP if an xml element is like:
    <AuthMethod>urn:opengeospatial:authNMethod:OWS:1.0:password</AuthMethod>
    where the field is AuthMethod and the value is urn:opengeospatial:authNMethod:OWS:1.0:password
    but what I am not sure of is when the field has values embedded within it like:
    <ServiceRequest DCP="HTTP_POST" mimeType="text/xml" encoding="UTF-8"><![CDATA[REQUEST=GetCapabilities&SERVICE=WMS]]></ServiceRequest>:
    It has a field of ServiceRequest and a value of ![CDATA[REQUEST=GetCapabilities&SERVICE=WMS]]
    but it also other value embedded with ServiceRequest like mimeType="text/xml" .
    Thanks,
    John

  • Where does firefox cache the form parameters to be used in the reload event of a page that was the resposne of a HTTP POST request?

    Suppose there is form in a web page and it submits data in HTTP POST method. After submitting the form, if I reload the page [either by the refresh button or back button; whichever applicable], firefox asks permission to resend the form data by saying "To display this page, Firefox must send information that will repeat any action...". Now if the user clicks on the resend, firefox resubmits the form data.
    So where does firefox store this from data for such future resending/resubmission?
    Is it possible to retrieve/manipulate those stored form data?

    I thought I'd tried that, as tried lots of other things like encoding URL, but obviously not as this works.
    Thanks for the quick reply.
    We also have an issue with the people results not being able to be refined by Department or Job Title now we have connected the SP2010 farm to use the service applications from a SP2013 farm.
    Any ideas on this?  I've started a new thread as its unrelated though:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/c89d5463-4531-4a28-9586-1f690c7b580d/can-you-refine-people-search-results-using-a-sharepoint-2013-search-service-application-connected-in?forum=sharepointsearch

  • Reading The Output From A POST To A Webserver

    Any suggestions on the following would be greatly appreciated!! From all examples, what I'm doing is correct, but I can't get the results of the Post.
    I am trying to do the following:
    1. Connect to a webserver through a URL object.
    2. POST a user name and password to a login screen.
    3. Read the Data Page that comes after login.
    I have successfully done item 1, but am failing at either item 2 or 3.
    I have read the forum extensively on Posting to webservers and have followed many examples. However my application does not get past the login screen. My application does not error, but the html that I read is the html of the Login Screen and not the html of the Data Page.
    Here's my code:
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;
    import java.io.*;
         public class HttpPostReader3 {
         StringBuffer lineBuff;
         public HttpPostReader3() {
    lineBuff = new StringBuffer();
    URL url;
    HttpURLConnection connection=null;
    String queryparam = "https://a_website/login.asp";
    try
    // Get URL
    url = new URL(queryparam);
    // Get a HttpURLConnection Object
    connection = (HttpURLConnection)url.openConnection();
    // prepare for both input and output
    connection.setDoOutput(true);
    // set request to post
    connection.setRequestMethod("POST");
    // Encode the URL POST String and assemble it
    String postparameter = URLEncoder.encode("txtUserID") + "=" + URLEncoder.encode("a_user_id");
    postparameter += "&" + URLEncoder.encode("txtPassword") + "=" + URLEncoder.encode("a_password");
    postparameter += "&" + URLEncoder.encode("chkAutoLogin") + "=" + URLEncoder.encode("Y");
    postparameter += "&" + URLEncoder.encode("Login") + "=" + URLEncoder.encode("Login");
    // Create a outstream for posting the parameters and set the outstream to ASCII data
    OutputStreamWriter outStream = new OutputStreamWriter(new BufferedOutputStream(connection.getOutputStream()),"ASCII");
    outStream.write(postparameter); // POST occurs here for name value pairs
    outStream.close();
    // get output streams of connection
    BufferedReader in = new BufferedReader( new InputStreamReader( connection.getInputStream()));
    String inputLine;
    while ((inputLine = in.readLine()) != null)
         System.out.println(inputLine);
         lineBuff.append( "\n" );
         lineBuff.append( inputLine );
    catch(IOException e)
    System.out.println(e);
    //WRITE OUTPUT HTML TO A TEXT FILE CALLED UNTITLED.TXT
                   String htmlFile;
                   htmlFile = lineBuff.toString();
              // Read and append data to a text file
              try{
              String fileName = "untitled.txt"; // Filename
              // Make the inputfile object
              FileInputStream fi = new FileInputStream(fileName);
              byte inData[] = new byte[fi.available()];
              fi.read(inData); // Read
              fi.close(); // Close
              String text = new String(inData); // Make a textstring...
              // Now, do whatever you want with the data... and append...
              String textToAppend = "xyzzzz";
              //byte outData[] = textToAppend.getBytes();
              byte outData[] = htmlFile.getBytes();
              // Make the outputfile (whith the 'append' boolean set to true
              FileOutputStream fo = new FileOutputStream(fileName,true);
              fo.write(outData);
              fo.close();
              }catch(Exception oops){
                   System.out.println("error with untitled.txt");
                   finally
                             System.exit(0);
              public static void main(String[] args)
                                  HttpPostReader3 h = new HttpPostReader3();//constructor
    } //End HTTPPostReader3

    You are very wise, but I have thought of that. Login.asp creates an html page that has a <form> statement with a submit action (Post) to login.asp. I pulled this out of the html.
    I did get lucky and found that for a bad login, the asp replies with "Bad Login". Since I know the login, I tried both the good login and a bad login. I found that I am posting correctly and logging in (at least my login is recognized as good and bad as bad).
    However, I don't get the information of the next page (the next page does come from default.asp)!
    WHAT DO I KNOW:
    1. I am posting correctly.
    2. My login was recognized as good.
    3. I don't get the next page, which comes from default.asp. Note, you can't go to default.asp directly, it will send you back to login.asp.

  • Submitting a PDF form via HTTP Post: Beginner's Questions

    Hi,
    I am completely new to PDF forms, so I have been finding the documentation and options overwhelming.
    I am hoping to get pointed to the documentation/tutorials/examples I really need.
    I would like to build a "proof of concept" for my boss.  I would like to include a screen in our Java ( JSP & Spring ) webapp where either a PDF form is embedded or is accessed via a link.
    I have
    Adobe Acrobat Distiller X standard license
    Adobe Acrobat X Standard
    Microsoft Office 2010
    I made a small, 3 field Microsoft Word form.  I then converted it via DIstiller into a PDF form.
    I then found this document about how to submit a PDF form to a server side component:
    http://acrobatusers.com/tutorials/form-submit-e-mail-demystified
    My big problem with this document it doesn't have an example nor an example showing what is going on in a full HTML page.   As I result I have some questions:
    Can I see such an example somewhere?
    Does the call to the javascript function doc.SubmitForm(urlToMyServerSideComponent) go in a script tag on the HTML page like other javascripts?
    Can I execute that submit function from an HTML button or do I need to put a "submit" button on the PDF form?
    Do I need Adobe LiveCycle in order to create a PDF form with a "submit" button?  Free versions?
    Can I send via HTTP POST ?
    Do I need Adobe LiveCycle to crate a PDF form with a digital signature?
    Is there a document/tutorial that fits where I am starting off from? ( Please no books, I am tyring to show my boss that this is something that can be done, in a reasonable amount of time, not time to get and go through a book ).
    Thanks in advance for any tips that get me pointed in the right direction
    Steve

    To answer some of your specific questions:
    2, 3. The submit form button needs to be on the PDF. You can either configure a Submit Form action or use the submitForm JavaScript method.
    4, 6: No to both questions. You can create the form in Acrobat. Such forms are knows as Acroforms, as opposed to XFA forms that are created with LiveCycle Designer. Acroforms have wider support.
    5: Yes, that's the method that's used when submitting to a web server. You have your choice of formats. The "HTML Form" option causes the form data to be submitted in the same format as an HTML form, so the same type of server-side code can be used to process the data. As Dave's tutorial shows, the server should return an FDF as the response, however, as opposed to HTML content.
    It's a mistake to try to embed the PDF in a web page. So much depends on the user's browser, PDF viewer, and how both are configured. PDF forms can be submitted directly from Adobe Reader/Acrobat, so it's not necessary for them to be viewed in a browser. Note that Adobe Reader for iOS/Android don't yet support submitting to a web server (apart from FormsCentral), but that's is supposedly being worked on.
    Since you mentioned digital signatures, be aware that for Reader users to be able to sign, the document has to be Reader-enabled, either with Acrobat Pro or LiveCycle Reader Extensions (which is not the same as LiveCycle Designer). Digital signatures in PDF forms are not yet supported on mobile devices. Also, you will want to submit the entire PDF, as opposed to just the form data, when submitting a digitally signed form.

  • How to handle HTTP-POST encrypted data for ECC Using proxy or RFC

    I have a scenario HTTP-POST ->PI->ECC.sender is HTTP Post  send encrypted data i need to handle the data and stored in to SAP ECC  with out decrypt using PI .what should i take for receiver  can i use inbound proxy or RFC  and how can handle the encrypted data  for decrypt.
    Regards
    Ravi

    1. my sender is HTTP POST . what should i configure in sender communication channel in SAP PI .like SOAP or HTTP .What are the parameters i need to pass .
    >>>
    If you are on PI 7.3 and above, configure the HTTP AAE adapter - Configuring the Java HTTP Adapter on the Sender Channel - Advanced Adapter Engine - SAP Library
    2.while using inbound proxy for encrypted data  i need  store the data in to table , the same proxy can i call  another outbound  service for decrypt  same data.
    >>>>
    Yes you can always a proxy within a proxy.

Maybe you are looking for

  • Unable to view the files on creative cloud

    I cannot view the files I have uploaded on Creative Cloud. I joined Creative Cloud yesterday.

  • Help with Subscriber Services Reset

    What are Subscriber Services on iPad? and where would I find the 26 digit Authentication Key?

  • TDMS file error occurs after several hours

    I have a compiled LabVIEW 2010 SP1 executable running on a Windows 7 PXI computer that is occasionally producing the following error message: "LabVIEW: LabVIEW could not load the TDMS file component. The top-level VI <my VI's name> was stopped at unk

  • Is query is ok and as per SQL standard

    Dear All, I want to know and to collect your commnet on the following query which executed successfully on 10g. I am not sure for the same result on other versions of Oracle. My point is only that we have been taughted by oracle that having would com

  • Can I have separate timer in each line of a multi_record screen

    I have a multi-records screen, each record have its own time display to show how long this patient is waiting. I use a timer to redisplay every 10 second. However, I have to requery the screen each time and the screen refresh each time. Can I show th