Sending post data to remote site

I would normally use CURL and php to do this but I was wanting to see if i can use flex to send the post data, I am making an app which sends post data to another site, and was wanting to know the best way of doing this in flex..

ok cool, I basically need to be able to prepopulate any form from any website and submit it, even if the site doesn't have an API.
the sites I am submiting to all have API's but I thought it would be better this way because API's change alot.

Similar Messages

  • Best option to transmit CSV file as POST data to remote site

    I'm quite new to the SAP scene and am tasked with getting some data out of our database and up to a third party web application.
    Their API requests the data be formatted as a CSV file and uploaded as an HTTP POST attachment (file upload) to their site.
    What's my best approach to this?
    We have PI, but I just learned about CL_HTTP_CLIENT and am hoping I can do this move directly from the ABAP environment but am unsure of the sorts of technicalities involved with either of these options.
    Can I setup a "service" in PI that simply posts data to a URL (as opposed to sending a SOAP request)?
    What sort of setup do I need to do to get CL_HTTP_CLIENT to talk to the remote site? I've tested with HTTP_POST and get an SSL error even when posting to a non-ssl url (http).

    public
    void Save(IPropertyBag
    propertyBag, bool clearDirty,
    bool saveAllProperties)
    object val2 = (object)_event;
    propertyBag.Write("Event",
    ref val2);
    object val3 = (object)_fullload;
    propertyBag.Write("FullLoad",
    ref val3);
    object val4 = (object)_sharedsecret;
    propertyBag.Write("SharedSecret",
    ref val4);
    object val5 = (object)_content;
    propertyBag.Write("Content",
    ref val5);
    object val6 = (object)_clienttype;
    propertyBag.Write("ClientType",
    ref val6);
    object val7 = (object)_clientinfo;
    propertyBag.Write("ClientInfo",
    ref val7);
    object val8 = (object)_clientversion;
    propertyBag.Write("ClientVersion",
    ref val8);
    #endregion
    #region IComponent
    public
    IBaseMessage Execute(IPipelineContext
    pc, IBaseMessage inmsg)
    //Convert Stream to a string
    Stream s =
    null;
    IBaseMessagePart bodyPart = inmsg.BodyPart;
    string separator =
    new
    Guid().ToString();
    inmsg.BodyPart.ContentType =
    string.Format("multipart/form-data;
    boundary={0}", separator);
    //inmsg.BodyPart.Charset = string.Format("US-ASCII");
    // NOTE inmsg.BodyPart.Data is implemented only as a setter in the http adapter API and a
    //getter and setter for the file adapter. Use GetOriginalDataStream to get data instead.
    if (bodyPart !=
    null)
    s = bodyPart.GetOriginalDataStream();
    byte[] bytes =
    new
    byte[s.Length];
    int n = s.Read(bytes, 0, (int)s.Length);
    string msg =
    new
    ASCIIEncoding().GetString(bytes).TrimEnd(null);
    //Get boundry value from first line of code
    string boundry = msg.Substring(2, msg.IndexOf("\r\n")
    - 2);
    //Create new start to message with MIME requirements.
    msg =
    "MIME-Version: 1.0\r\nContent-Type: text/plain; boundary=\"" + boundry +
    "\"\r\n" + msg;
    //Convert back to stram and set to Data property
    inmsg.BodyPart.Data =
    new
    MemoryStream(Encoding.UTF8.GetBytes(msg));
    //reset the position of the stream to zero
    inmsg.BodyPart.Data.Position = 0;
    return inmsg;
    #endregion

  • Possible to send POST data WITHOUT a submit button?

    Is it possible to send POST data without a submit button, but
    instead, using PHP redirect or PHP header?
    I need to process a form's POST values before sending some
    selected values to a third party web
    site. So I'd like to be able to send processed POST values to
    that site, without asking the user to
    click on a submit button again.
    how?...
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

    You can't send client-side data with server-side scripting, I
    think. You
    can do it with javascript, but then your form is dependent on
    js being
    enabled....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "(_seb_)" <[email protected]> wrote in message
    news:eosqf2$p0n$[email protected]..
    > Is it possible to send POST data without a submit
    button, but instead,
    > using PHP redirect or PHP header?
    > I need to process a form's POST values before sending
    some selected values
    > to a third party web site. So I'd like to be able to
    send processed POST
    > values to that site, without asking the user to click on
    a submit button
    > again.
    > how?...
    >
    >
    > --
    > seb ( [email protected])
    >
    http://webtrans1.com | high-end web
    design
    > Downloads: Slide Show, Directory Browser, Mailing List

  • Load Data from Remote site

    Hello every one,
    I tried to load the data from remote site to stagging area with DB link, i used append hint and it gave this error, I was just wondering?
    ERROR at line 1:
    ORA-12840: cannot access a remote table after parallel/insert direct load txnORA-06512: at "JAMES.PKGCONVERSION", line 464
    any help please thank you
    i am not using all the columns, i am using selec in the insert. Thank you in advance
    Message was edited by:
    user553284

    I had commit after three inserts, I changed commit after each insert, it is working now,
    Does that really matter?
    Any idea please.
    Thank you

  • How can I send post data through nsurlrequest?

    Hi.
    I'm working on an application which needs to make requests to a php gateway. I tried many examples I found on google, but none of them worked for me.
    First I was working with GET, and it worked just fine, but now, as I need to send more complex data, GET isn't a solution anymore. I have three params to send: module which is a string containing a php class name, method: the function in the class, and params for the function which is usually an indexed array.
    The following method makes the request to the server, but for some reason, doesn't send the POST data. If I var_dump($_REQUEST) or var_dump($_POST), it turns out, the array is empty. Can somebody tell me, what am I doing wrong? Is there some kind of a sandbox, which prevents data from being sent to the? I also tried to send some random strings, which aren't json encoded, no luck. The sdk version is 5.1, and I'm using the iPhone simulator from xcode.
    If it is possible I would like to solve this problem without any additional libraries (like asihttp).
    And here is the code:
    +(NSObject *)createRequest:(NSString *)module: (NSString *)method: (NSArray *)params
        NSString *url       = @"http://url/gateway.php";
        NSData *requestData = nil;
        NSDictionary *data  = [NSDictionary dictionaryWithObjectsAndKeys:
                module, @"module",
                method, @"method",
                params, @"params",
                nil];
        NSString *jsonMessage = [data JSONRepresentation];
        NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:url]];
        NSString *msgLength = [NSString stringWithFormat:@"%d", [jsonMessage length]];
        [request addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
        [request addValue: msgLength forHTTPHeaderField:@"Content-Length"];
        [request setHTTPMethod:@"POST"];
        [request setHTTPBody: [jsonMessage dataUsingEncoding:NSUTF8StringEncoding]];
        requestData     = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil];
        NSString *get   = [[NSString alloc] initWithData:requestData encoding:NSUTF8StringEncoding];
        NSLog(@">>>>>>%@<<<<<<",get);
    Thank you.

    raczzoli wrote:
    I'm working on an application which needs to make requests to a php gateway. I tried many examples I found on google, but none of them worked for me.
    Why not?
    Unfortunately, you are dealing with a number of different technologies that have been cobbled together over the years. You could write a PHP server that would respond correctly to this request, but not using basic methods like the $_POST variable. PHP was designed for HTML and true forms. What you are trying to do is make it work as a general purpose web service over the HTTP protocol. You can do that, but not with the form-centric convenience variables.
    The following is a basic program that will populate the $_POST variable.
    #import <Foundation/Foundation.h>
    int main(int argc, const char * argv[])
      @autoreleasepool
        // insert code here...
        NSLog(@"Hello, World!");
        NSString  * module = @"coolmodule";
        NSString * method = @"slickmethod";
        //NSArray * params = @[@"The", @"Quick", @"Brown", @"Fox"];
        NSString * params = @"TheQuickBrownFox";
        NSString * url = @"http://localhost/~jdaniel/test.php";
        NSDictionary * data  =
          [NSDictionary
            dictionaryWithObjectsAndKeys:
              module, @"module",
              method, @"method",
              params, @"params",
              nil];
        //NSString *jsonMessage = [data JSONRepresentation];
        //NSData * jsonMessage =
        //  [NSJSONSerialization
        //    dataWithJSONObject: data options: 0 error: nil];
        NSMutableArray * content = [NSMutableArray array];
        for(NSString * key in data)
          [content
            addObject: [NSString stringWithFormat: @"%@=%@", key, data[key]]];
        NSString * body = [content componentsJoinedByString: @"&"];
        NSData * bodyData = [body dataUsingEncoding: NSUTF8StringEncoding];
        NSMutableURLRequest * request =
          [[NSMutableURLRequest alloc] initWithURL: [NSURL URLWithString:url]];
        //NSString * msgLength =
        //  [NSString stringWithFormat: @"%ld", [jsonMessage length]];
        NSString * msgLength =
          [NSString stringWithFormat: @"%ld", [bodyData length]];
        [request
          addValue: @"application/x-www-form-urlencoded; charset=utf-8"
          forHTTPHeaderField: @"Content-Type"];
        [request addValue: msgLength forHTTPHeaderField: @"Content-Length"];
        [request setHTTPMethod: @"POST"];
        //[request setHTTPBody: jsonMessage];
        [request setHTTPBody: bodyData];
        NSData * requestData =
          [NSURLConnection
            sendSynchronousRequest: request returningResponse: nil error: nil];
        NSString * get =
          [[NSString alloc]
            initWithData: requestData encoding: NSUTF8StringEncoding];
        NSLog(@">%@<",get);
      return 0;
    I have written this type of low-level server in PHP using the Zend framework. I don't know how to do it in basic PHP and wouldn't bother to learn.
    Also, you should review how you are sending data. I changed your example to send the appropriate data and content-type for the $_POST variable. If you had a server that could support something else, you could use either JSON or XML, but your data and content-type would have to match.

  • Can't send POST data from servlet

    Hi,
    I have a servlet that receives data via GET method, process the request and then it has to send feedback to an url, but the query string that
    I have to send must be in a POST method.
    I ilustrate this:
    http://host:port/myservlet?param1=value1
    myservlet proccess and then calls
    http://external_url (with param2=value2 via POST)
    I've tried to put an HttpURLConnection
    URL url = new URL("http://localhost:7001/prueba.jsp");
    java.net.HttpURLConnection con= (HttpURLConnection)url.openConnection();
    //POST data
    URL url = new URL("http://localhost:7001/prueba.jsp");
    HttpURLConnection c = (HttpURLConnection)(url.openConnection());
    c.setDoOutput(true);
    PrintWriter out = new PrintWriter(c.getOutputStream());
    out.println("param2=" + URLEncoder.encode("value2"));
    out.close();
    but I get this error.
    lun mar 10 13:53:46 GMT+01:00 2003:<W> <ListenThread> Connection rejected: 'Login timed out after 5000 msec. The socket
    came from [host=127.0.0.1,port=2184,localport=7001] See property weblogic.login.readTimeoutMillis to increase of decreas
    e timeout. See property weblogic.login.logAllReadTimeouts to turn off these log messages.'
    (it's a weblogic 5.1 problem, i've been researching a little bit)
    And I don't want to call a jsp that generates a post form, and then it's auto-submitted with javascript. (this will be the last remedy!!)
    How can i do this?
    All suggestions will be grateful.
    Thanks in advance.
    PD: sorry for my english :)

    I make an URLConnection and I intended to know if the post data was
    sent right. Then, in my machine, under weblogic 5.1, I developed a jsp with this code:
    <%
    URL url = new URL("http://machine2/examples/prueba.jsp");
    HttpURLConnection c = (HttpURLConnection)(url.openConnection());
    c.setDoOutput(true);
    PrintWriter outd = new PrintWriter(c.getOutputStream());
    outd.println("param1=" + URLEncoder.encode("value1"));
    outd.close();
    c.disconnect();
    %>
    and in machine2 (using tomcat 4.1), I simply put a line in prueba.jsp:
    System.out.println(request.getParameter("param1"));
    and I don't get "value1" in the tomcat log as expected (I think).
    I also tried with adding this properties:
    c.setRequestProperty("Content-Length", size...);
    c.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
    and it didn't work!
    what's wrong?

  • Send POST-Data does not work

    Hi all,
    I am new to Flex so I try some stuff to get myself into
    AS/Flex in a good way (I hope :)).
    I wrote a small class that encapsulates the HTTPService class
    using AS. Then I tried to send some data and I get a response from
    my server but the POST-Data I try to send does not come up.
    Everything else seems to wokr in my class...
    Code attached!!!
    Anyone knows why there is no POST-Data sent to my PHP? When I
    alert the contents of my _objPostData.objPostData I get the Data I
    entered in my edtLoginUsername/edtLoginPassword. So what goes
    Wrong???
    Thx
    polysign

    "polysign.lu" <[email protected]> wrote in
    message
    news:gc7dga$ise$[email protected]..
    > Hi all,
    >
    > I am new to Flex so I try some stuff to get myself into
    AS/Flex in a good
    > way
    > (I hope :)).
    > I wrote a small class that encapsulates the HTTPService
    class using AS.
    > Then I
    > tried to send some data and I get a response from my
    server but the
    > POST-Data I
    > try to send does not come up. Everything else seems to
    wokr in my class...
    >
    > Code attached!!!
    >
    > Anyone knows why there is no POST-Data sent to my PHP?
    When I alert the
    > contents of my _objPostData.objPostData I get the Data I
    entered in my
    > edtLoginUsername/edtLoginPassword. So what goes Wrong???
    Are you SURE you're sure that no post data is getting sent?
    To me it just
    looks like you're not actually WAITING for the result by
    attaching an event
    listener to the result event. Instead, you're trying to read
    the result
    event immediately.
    HTH;
    Amy

  • Send POST data from custom POD to PHP server

    Hi all,
    I tried to send data from custom POD to PHP server with POST method. I used HTTPService component and URLLoader, but nothing happend. All attempts failed, HTTPService return "fault" and URLLoader return "0" that means I can't send data to the server.
    I'm googling around during few hours... please give me some advice, how I can send data from custom POD to PHP server.
    Thanks

    Figured it out, hope it will help someone
    A bit tricky but it works fine, now I can send and retrive data from PHP server.
    Add .htacces file in folder where deployed PHP request handler and modify it, see below:
    RewriteEngine on
    RewriteBase /foldername
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)\?*$ filename.php?_route_=$1 [L,QSA]
    Thanks

  • The WSDL data cannot be retrieve from remote site

    I am a new guy learning web services with NetBeans 5.5 and meet some problem in retrieving wsdl data from remote site.
    I create a web service "WSTestServer" at Sun Application Server PE8.2 with real IP, say 111.110.11.10:8888, and there's a class "TestWS" with a method "getWS" to return a String. The server (or machine) name is ultra20. So, by following steps in NetBeans, I can get a wsdl file after generating the web service and it can be viewed at
    http://111.110.11.10:8888/WSTestServer/TestWS?WSDL
    Then, I create a web service client at the same machine, it is available to test this method by clicking Web Service Reference item in NetBeans and select "getWS" method to get that String.
    However, when I create a web service client at remote site, it doesn't work and show exception message like
    cannot find domain http://ultra20:8888/WSTestServer/TestWS....
    I go back to check wsdl file, at the last line, it prints like
    <soap:address location="http://ultra20:8888/WSTestServer/TestWS".....
    If I test this case in LAN, e.g., the server IP becomes 192.168.1.2 and client IP is 192.168.1.3, then it works since machine name can be recognized within the same local area network. I try to revise the wsdl file above to replace machine name as real IP, but it is automatically changed back with machine name while deploying and copy the revised one as xxx.wsdl__orig.
    Should I do additional configuration setup for server site? Such as, registering a domain name like aaa.bbb.edu instead of 111.110.11.10?
    Any comment and help for this subject is appreciated!!
    Thank you so much!

    Works as designed,from documentation:
    The database also retrieves all triggers and constraints defined on the table except for referential integrity constraints that reference other tables.
    The retrieved indexes, triggers, and constraints have recycle bin names. Therefore it is advisable to query the USER_RECYCLEBIN view before issuing a FLASHBACK TABLE ... TO BEFORE DROP statement so that you can rename the retrieved triggers and constraints to more usable names.
    For details see the FLASHBACK TABLE command description for your unknown database version.
    Werner

  • POST DATA TO ASP

    Please help me to send post data.
    I can send data to asp but i dont know how to send file atachment to asp web page.
    any help wellcome
    <form name="frmSend" method="POST" enctype="multipart/form-data" action="uploadForm.asp" onSubmit="return onSubmitForm();">
    <tr>
    <td><p> <b> Attach Your Previous Work: </b> </p>
    <p> <b>bbbbbbbbbbbbbbbbbb</b></p><p> (yyyyyyyyyyyyy) </p>
    Attach File: <input name="attach1" type="file" size=35><br>
    </td>
    </tr>
    <tr>
    <td width=100% align=right>
    <input type="Hidden" name=Uid value=16156>
    <input type ="Submit" value="Attach" id=Submit name=Submit> </td></tr>
    </form>
    </table>
    Message was edited by:
    samaraweera

    Read the HTTP/1.1 specs.
    Here's a hint - try learning for yourself by reading these things we call them books. Can you say that - B-O-O-K.
    To upload a file, is basically no different then any other form field data. You send your response with the field name "attach1=" and the data.
    Example:
    POST /uploadForm.asp HTTP/1.1
    formField1=something
    formField2=else
    attach1=5v75xc75xc75bx4bbn84x74bnx5n6mb756m4b975xb4mb5vm4
    5b4m5bvm45b6m468mmmmmmmmmm4c564v64c684mc4m4m684v
    8795c95675cxb6795xc967b5n67cb45x5c4xc6b3xc3848cb3nx8cn384m

  • Socket to Facebook won't POST data

    I am trying to read data from my home page on m.facebook.com (since Facebook Mobile is HTTP only). I connect, then send POST data with my username and password, but when I read in the content from the socket, it's the HTTP corresponding to the login page. I have tried a very similar program to this on other websites and have been successful. Am I doing something wrong, or is it possible that Facebook is somehow blocking me?
    There is a post_form_id that is sent in with the POST data, but I tried altering it with TamperData and I was still able to log in using Firefox so I don't think this is the problem.
    The username and password listed in the code actually work so you can try it yourself. ([email protected], testfacebookjava)
    Apparently there are no longer "code" tags on this forum? I'm confused...
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.net.URL;
    import java.net.URLConnection;
    public class Facebook
         public static void main(String[] args)
              try
                   URL url = new URL("http://m.facebook.com/login.php");
                   URLConnection connection = url.openConnection();
                   connection.setDoOutput(true);
                   OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream());
                   out.write("lsd=&post_form_id=ad8ca84895f63d5153279b6eb4794ca2&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&email=test.fbjava%40yahoo.com&pass=testfacebookjava&login=Log+In");
                   out.close();
                   BufferedReader in = new BufferedReader(new InputStreamReader((InputStream) url.getContent()));
                   String line;
                   while((line = in.readLine()) != null)
                        System.out.println(line);
              catch(IOException e) { e.printStackTrace(); }
    }

    Host=login.facebook.com
    User-Agent=Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
    Accept=text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language=en-us,en;q=0.5
    Accept-Encoding=gzip,deflate
    Accept-Charset=ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive=115
    Connection=keep-alive
    Referer=http://m.facebook.com/
    Cookie=datr=zMNNTXK_7tJj3AFBRUD0RDSe; lu=gAPk4GsG5J0xUpNKMPKtKtHw; m_user=test.fbjava%40yahoo.com%3A0%3A%3A0%3A6df7bcad%3A1297125664; locale=en_US; L=20; cur_max_lag=20; act=1297262301164%2F12; x-referer=http%3A%2F%2Fwww.facebook.com%2F%3Fsk%3Dlf%23%2F; made_write_conn=1297262349; W=1297262349; lsd=y_qu1; presence=DJ297262351BchADhA_22127.channel_22BsubA_5b0_5dBF297262338625WMblcMsndPBsMbloMbvtP297262301BctMsbPBtA_5b_5dBfAnullBuctA0QBblADacA21V297262313Z225BlcPQQ; wd=1600x707; reg_fb_gate=http%3A%2F%2Fm.facebook.com%2F; reg_fb_ref=http%3A%2F%2Fm.facebook.com%2F
    Content-Type=application/x-www-form-urlencoded
    Content-Length=198
    POSTDATA=lsd=&post_form_id=86585ec2452bf0e02fd10f358b3d9b3a&charset_test=%E2%82%AC%2C%C2%B4%2C%E2%82%AC%2C%C2%B4%2C%E6%B0%B4%2C%D0%94%2C%D0%84&email=test.fbjava%40yahoo.com&pass=testfacebookjava&login=Log+In
    How can I find out what is being sent using the URLConnection?
    I tried modifying the eclipse.ini to include something about changing the user agent to something other than Java, I forget what exactly I tried but it didn't work. I will look for the website again and update you with what I tried.
    Also, is it possible that since the host is login.facebook.com instead of m.facebook.com (this was found using TamperData with Firefox on m.facebook.com) there is something I need to change?
    Update: I added -Dhttp.agent=Mozilla/5.0 to the end of eclipse.ini as per http://stackoverflow.com/questions/1526956/change-user-agent-in-eclipse-3-5-for-new-software-installations
    From what I've seen this is not the right way to do it, since "Java" is still included in the agent. I haven't found anywhere that tells how to remove the Java part.

  • How to send Array data using Post Method?

    Var array = $_POST['myData'];
    array[0] => 'ABC'
    array[1] => 'DEF'
    how to improve this code to support send array data...?
    String url ="http://xxxxx/test.php";
    String[] arraystr={"ABC", "DEF", "EDFF"}
    String parameter = "myData=" +arraystr;    // no support this
    Strint str = postMrthod(url, parameter );
    public static String postMethod(String url, String parameter) {
            StringBuffer b = new StringBuffer("");
            HttpConnection hc = null;
            InputStream in = null;
            OutputStream out = null;
            try {
                hc = (HttpConnection) Connector.open(url);
                hc.setRequestMethod(HttpConnection.POST);
                hc.setRequestProperty("CONTENT-TYPE", "application/x-www-form-urlencoded");
                hc.setRequestProperty("User-Agent", "Profile/MIDP-2.0 Configuration/CLDC-1.0");
                out = hc.openOutputStream();
                byte postmsg[] = parameter.getBytes();
                for (int i = 0; i < postmsg.length; i++) {
                    out.write(postmsg);
    out.flush();
    in = hc.openInputStream();
    int ch;
    while ((ch = in.read()) != -1) {
    b.append((char) ch);
    } catch (IOException e) {
    e.printStackTrace();
    try {
    if (in != null) {
    in.close();
    if (hc != null) {
    hc.close();
    } catch (IOException e) {
    e.printStackTrace();
    return b.toString().trim();

    yes, you can send integer value like this. But I think you have to put quotes around <%= TAMID%> i.e.
    <input type="hidden" id="HTTP_CVHTAMID"
    name="HTTP_CVHTAMID" value= "<%= TAMID%>" >

  • How to send recomposed data in post method.

    Currently, i try to build up MVC user authentication. I used login.html as View, servletA as controller to invoked Model and servletB as Model. The servletB will return queried result to servletA then servletA will decide redirected to specific url.
    I has successful use the RequestDispatcher.forward(request, response) to post data from servletA to servletB. whereas i faced a trouble to post data back from servletB to servletA, which i unable put the queried result into request obj before post it back to servletA.
    Any genius recommendation about this? or Any method composed data to send via post method?

    Here's a quick rundown that might help:
    Use request.setAttribute() to put an item in request scope in a servlet before dispatching to another servlet or JSP.
    Use <useBean> tag in a JSP to read the data on the JSP that the servlet put in request scope.
    Alternatively, you can use request.getAttribute(), but the useBean is preferred.
    Use request.getParameter() in a servlet to read data that the <form> tag on the JSP page put in request scope.
    Use request.setAttribute() and request.getAttribute() to get send/get data between servlets (it could be request.getParameter(), but I dont think so).
    There is a RequestDispatcher.forward() and a RequestDispatcher.include(). I'm not sure what the differences are (you'll have to research it.
    In MVC, I have a single servlet for the controller (receive all url's, and dispatch to the appropriate JSP). I dont hava a separate servlet for the model. Instead, I instansiate a business object on the servlet, pass data to it, and let it do the calcuations. Then I have it return the data to the servlet which puts it in request scope for the JSP page when I dispatch to it. My MVC usuallyconsists of:
    JSP -presentation layer
    servlet - control layer
    business logic layer
    database layer (DAO).
    Each layer does not contain the functionality of one of the other layers (clean separation of concerns).
    Last note: Whereas you can use a servlet for the controller, a framework such as Spring or Struts is often used instead.

  • Message: Your Web browser must accept cookies in order for you to send your data. Please adjust your browser settings to enable this site to store cookies.

    Hello! I have two questions.
    (1) I want to submit a question through www.tune-up.com but the website does not accept my inquiry.
    I get the following message: "Your Web browser must accept cookies in order for you to send your data. Please adjust your browser settings to enable this site to store cookies and access this site again."
    I checked my cookie settings, and it looks like I have the Firefox default settings (i.e. cookies are accepted). Tried to submit my inquiry again but it does not work. Please advise how to make sure I can submit inquiries etc.
    (2) I want to start using the Google search again but not sure how do change the settings. I do not want to have DuckDuck Go as my default. Would you please describe how to change back to Google? Also, is the problem I described above perhaps related to the DuckDuckGo search engine I use?
    I look forward to your assistance which is greatly appreciated - Thank you!

    On #1, you can check the site-specific cookie setting using the Permissions panel of the Page Info dialog. When you are on the page, you can open that dialog using either:
    * right-click the page > View Page Info > Permissions
    * click the padlock or globe icon in the address bar > More Information > Permissions
    Skim or scroll down to "Set Cookies" to make sure it is not set to Block.
    If that is okay, some other random thoughts:
    * Are you using the site in a private browsing window?
    * Do you recall disabling DOM storage, which sites sometimes use instead of cookies to store large blobs of data (Firefox controls access to DOM storage using your cookie setting for the site)?
    On #2, your default search engine should not have changed. To change it to Google, you can use the icon on the left end of the search bar (the classic small search box that appears on the toolbar). Please see: [[Search bar - add, change and manage search engines on Firefox]].
    I don't think there is any connection between #2 and #1.

  • Sending String Data of  64 kilo bytes to Remote Function Module

    Hi,
        I have an RFC call from JAVA and I need to send string data to the FM. The maximum size of the data that I can send from java is 64 kilo bytes (Functional requirement). I want to receive this data as a table's parameter in the FM. Table's parameter’s data type can only be structure's which are FLAT-LINED. So if I use STRNIG as the data type for receiving the data from JAVA the RFC doesn’t allow me (As this makes the structure NON FLAT LINED which RFC will not allow as data type for tables parameter). So I have to use some other data type like CHAR or LCHR. But the maximum size for CHAR and LCHR is around 32 kilo bytes. I need a way to receive 64 kilo bytes of data into the Function Module as a table’s parameter.
    Thanks in advance
    Sesh

    Hi!
    I think I was pretty near your problem. When talking about table fields, you could a 'parameter' -> field of your table parameter.
    Which type? String is out of question, because here length is variable, but you need a constant length definition. I just have a look into help of data, built in ABAP-types. Here C and N can have a length from 1 to 65535 - OK, not 64 KB but only 1 byte missing...
    ... just made a small test, there is a second border (for non-unicode systems): the total length of the structure can't exceed 65535. If you need additional fields, define a second table parameter and place your additional fields in a second table. You can't define a link field (would need some space), so you have to go for a '1st line of data matches 1st line of attributes'-definition.
    I'm still a little bit curious: what kind of data you are sending?
    Regards,
    Christian

Maybe you are looking for