Difficulty replicating simple HTML POST in AS3

Hi,
I'm trying to post a username and password to a server side script.  The client provided an HTML form that demonstrates that the sever side functionality is working, but I keep getting the following:
<response>
Invalid UserName / Password Combination
</response>
Here's the HTML code:
html> 
Here's what I have been doing in AS3:
var loader:URLLoader = new URLLoader();
configureListeners(loader);
var header:URLRequestHeader = new URLRequestHeader("pragma", "no-cache");
var request:URLRequest = new URLRequest("http://sitename.net/login");
request.data = new URLVariables();
request.data.username = "username";
request.data.password = "password";
request.method = URLRequestMethod.POST;
request.requestHeaders.push(header);
try {
loader.load(request);
} catch (error:Error) {
trace("Unable to load requested document.");
Any insight would be appreciated.
Best regards,
Chris McLaughlin

Hi,
Well I have to say the apersand in the html code kept getting my attention and that is where the answer lies.  It means that instead of passing 2 values as I was doing you have to pass 1 and you have to know how to URL encode the amersand which of ocurse I did not know.
So it's like this:
     request.data= "username=someName&%26password=somePassword"
Geez!

Similar Messages

  • Create a simple html page

    I have a webserver running and I want java to create a dynamic webpage if the user tries to search for a file that does not exist. For example, if the user types in http://abc.com/example.htm and it does not exist, I want Java to create a simple html page dynamically with the file name the user tried searching for. How would I go about doing this?

    if u lost a cat, would u put up one poster or many, i
    rest my caseWell, you're out-voted. We/they don't like duplicating answers. You could have posted a simple LINK to it rather than duplicating the question. That way, ppl could follow the link to see the master question and all answers if any. Now shove off.

  • Creat a simple html page

    I have a webserver running and I want java to create a dynamic webpage if the user tries to search for a file that does not exist. For example, if the user types in http://abc.com/example.htm and it does not exist, I want Java to create a simple html page dynamically with the file name the user tried searching for. How would I go about doing this?

    I suggest this cross-poster's request be denied for any further assistance. As he also gained an attitude when corrected (flamed) for cross-posting.

  • On a mac, coded a simple HTML page, but can't bring it up in firefox, it simply brings up the code instead of translating it to a web page.

    I have made a very simple HTML page in text editor on my mac. I'm trying to view what the page would look like in firefox, but it just brings up the code, rather than the webpage, even though the extension in the address bar says .html.

    Are you opening that file locally or have you uploaded the file to a server on the internet?
    Can you post a link if you have uploaded the file?

  • Deploying simple HTML page to WLS 10.3.6 fails with HTTP response code: 502

    - I created a simple HTML page and want to test deployment to WLS 10.3.6 on Linux. I created WAR file and when using JDev 11.1.1.4.0 to deploy to WebLogic Server, it fails to deploy. Full errors/messages are:
    [04:40:56 PM] ---- Deployment started. ----
    [04:40:56 PM] Target platform is (Weblogic 10.3).
    [04:40:59 PM] Retrieving existing application information
    [04:40:59 PM] Running dependency analysis...
    [04:40:59 PM] Building...
    [04:40:59 PM] Deploying profile...
    [04:40:59 PM] Wrote Web Application Module to C:\JDeveloper\mywork\Simpe_HTML\Project1\deploy\SimpleHTML.war
    [04:41:01 PM] Deploying Application...
    [04:41:01 PM] Weblogic Server Exception: weblogic.deploy.api.internal.utils.DeployerHelperException: The source 'C:\DOCUME~1\NGOLDR~1.LAT\LOCALS~1\Temp\SimpleHTML.war' for the application 'SimpleHTML' could not be loaded to the server 'http://dupe:7031/bea_wls_deployment_internal/DeploymentService'.
    Server returned HTTP response code: 502 for URL: http://dupe:7031/bea_wls_deployment_internal/DeploymentService
    [04:41:01 PM] See server logs or server console for more details.
    [04:41:01 PM] weblogic.deploy.api.spi.exceptions.ServerConnectionException: [J2EE Deployment SPI:260041]Unable to upload 'C:\JDeveloper\mywork\Simpe_HTML\Project1\deploy\SimpleHTML.war' to 't3://dupe:7031'
    [04:41:01 PM] #### Deployment incomplete. ####
    [04:41:01 PM] Remote deployment failed (oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer)
    - The Application Server connection is accessible within JDev. 'dupe' is my server name and it's running RH 5.4
    - Any help or suggestions appreciated, although I've already asked Mr. Google without success.
    Thanks in advance,
    Neville

    HTTP response code 502 means temporarily overloaded.
    I would say that we have to check the deployment error on the weblogic server logs located at <Domain_Home>\servers\dupe\logs\dupe.log
    Check for any errors like OutOfMemory etc OR any deployment failures.
    If possible, try accessing the console at http://dupe:7031/console
    Check if you are able to successfully deploy your application using the console.
    From the error it looks like the "dupe" server might not be healthy. So, the log file would really help here to get clues into the root cause.
    Arun

  • Generate html post request from form9i applet

    I need to interact with a 3rd party credit card processing server form my form9i application.I need to create a html post request with all the input information encapsulated in it and also receive the http response and parse it and display an alert in the form(approved or rejected).Can I do that?
    any answer is going to help me greatly
    Sathi

    GET method may be the easier way. web.show_document('your_url?v1=123&v2=abc'); as of POST method, I guess you need JSP to do it, but how to do it from applet, I like to know too.
    getting back info, I used perl to read the html POST data on web server, then perl parses it and writes to a file on server, then use text_io or utl_file to read data into webform applet fields.
    The drawback I found that the cursor will not get back to webform applet from html pages. I tried to print every possible Javascript methods to wake up it, but it cannot get it.

  • Iweb page modified with a simple html editor , now not display navigation menu

    Hello i've designed a site http://www.ballettgastini.ch with Iweb and was working till i've the needs to update a simple text in one page and get it via ftp from the server, modified with a simple html editor !!!!, and update via ftp on the server. now the page do not diplay the navigation menu bar !!!! the page is here  : http://www.ballettgastini.ch/stundenplan.html ... any suggesion ? i'm working now with a new imac with no possibility to modify the entire web site on the server...but the need it's really to change few text lines so i think to use a simple html editor... any ideas ? thanks luca giay turin italy

    Why not continue in the topic you started earlier?
    https://discussions.apple.com/message/21158910#21158910
    Anyway, the scripts folder with essential files is missing :
    http://www.lakesweddingmusic.com/Scripts/iWebImage.js
    + more
    And this is missing too :
    http://www.lakesweddingmusic.com/feed.xml
    No feed, no menu.
    And we keep finding more webpage. This one is made with iWeb 1
    http://www.lakesweddingmusic.com/The_Barn.html

  • Simple HTML placeholder page

    Hello,
    I'm running ITS Version 6200.1034.9372.7, Build 1093429 WIN32.
    We are migrating from an external ITS server to an internal ITS for the BBPSTART Internet Service (SAP SRM 4.00 eBuying). Because many employees have the old URL (external ITS) in their bookmarks, I'd like to replace this Internet Service with a simple HTML page showing a "This page has moved" message and a link to the new service on the internal ITS.
    What would be the best approach to achieve this? Completely remove the BBPSTART Internet Service and create a new Flow Logic-Based Application with a simple template?
    Also I was wondering the following. The LOGIN template (of the GGPSTART Internet Service) contains "tags" like this one:
    `include (~service="bbpglobal", ~name="login.html")`
    Where do I find/manage this login.html file?
    Thanks in advance!

    The HTML Template "login.html" is in the templates folder in the bbpglobal service for your SRM ITS instance.
    BBPGLOBAL->99->LOGIN.HTML for the Login screen template.
    You can modify this to redirect users to your new link
    Regards,
    Oisin

  • HTML Post method.

    HI Experts,
    Here my scenario is Proxy to HTTP.
    My Receiver system need HTML Post method in place of XML file. Normally PI will send the XML but receiver system is expecting HTML POST method.
    For this i have to do in configuration.
    Receiver is expecting below format.
    <html>
    <head>
    <title>Authorize</title>
    </head>
    <body>
    <form action="https://developer.skipjackic.com/scripts/evolvcc.dll?AuthorizeAPI" method="post" >
         SerialNumber<input type="text" name="serialnumber" value="000014661324"><br />
         DeveloperSerialNumber<input type="text" name="developerserialnumber" value="464787130566"><br />
         Sjname<input type="text" name="sjname" value="TSYS Test"><br />
         street address<input type="text" name="streetaddress" value="2230 Park Ave"/><br />
         city<input type="text" name="city" value="Cincinnati"/><br />
         state<input type="text" name="state"  value="OH"/><br />
         zipcode<input type="text" name="zipcode"  value="45206"/><br />
         credit card account number<input type="text" name="accountnumber" value="4445999922225"/><br />
         CVV2<input type="text" name="CVV2" value=""><br>
         expiration month<input type="text" name="month" value="12"/><br />
         expiration year<input type="text" name="year" value="2012"/><br />
         amount<input type="text" name="transactionamount" value="1.00"/><br />
         order number<input type="text" name="ordernumber" value="123"/><br />
         phone<input type="text" name="shiptophone" value="8883688507"/>
      orderstring<input type="text" name="orderstring" value="Test1Test Item 13.001N||210.001N||310.001N||410.001N||510.001N~||" /><br />
         <br />
         <input type="submit" value="submit" />
    </form>
    </body>
    </html>
    Thank you
    Srinivas

    Hi Srinivas,
    I have the same issue with Form submit using Java HTTP adapter.
    It would be great if you can share your java mapping code or advise what should be the outcome of java mapping?
    Should the result of java mapping be some kind of XML payload or some html code ?
    Many Thanks,
    Kind Regards
    Ravi

  • Need a simple html theme

    Hello everybody,
    i need a simple just html, no script or flash theme, for doing my photo albums.
    I have some veryyyy important people (gf and brother :)) than can't see those beacouse they do it on the corporate laptop and all the "bad stuff" are disabled.
    Thanks
    Ciprian

    Ciprian:
    You can create the web pages from within iPhoto by using the File->Export->Web menu option. It creates a simple html photo gallery with user control of viewing larger version of the thumbnails. It published to a folder on the desktop, the contents of which can be manually uploaded to your iDisk/Web/Sites folder. You can run it on the desktop first to see if it will suit your needs.
    The URL would be: web.me.com/youraccount_name/name_of_uploadedfolder/index.html. If you have multiple albums you would have to have a separate folder and URL for each.
    It will let you add either title or comments or both to the photos and select the background and text colors. This is an example. It requires no special java or other software. Just a browser.
    OT

  • Generate a HTML POST url and open the page.

    Hello,
    I need to generate a HTML POST url with 4 parameters.
    I tried like this.
    String URLtobeOpened = "<url>?param1=val1&param2=val2&param3=val3&param4=val4";
              HttpServletResponse resp = request.getServletResponse(true);
              try {
                   resp. sendRedirect(URLtobeOpened);
              } catch (IOException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
    This is showing me a login prompt, instead of directly logging me in.
    Also when I checked using HTTPWatch, the request is showing as a GET, but I need it as a POST.
    How to code it in the right way.
    Thanks
    Srinivas

    Here is what I tried sofar
    I am using this jar commons-httpclient-3.1.jar
    import org.apache.commons.httpclient.HttpClient;
    import org.apache.commons.httpclient.methods.PostMethod;
              String url = "https://www.independentinc.com/scripts/insupport.exe/db_connect";
                try {
                 HttpClient client = new HttpClient();
                 PostMethod method = new PostMethod( url );
                   // Configure the form parameters
                   method.addParameter( "param1", "val1" );
                   method.addParameter( "param2", "val2" );
                   method.addParameter( "param3", "val3" );
                   method.addParameter( "param4", "val4" );
                   // Execute the POST method
                 int statusCode = client.executeMethod( method );
                 if( statusCode != -1 ) {
                    String contents = method.getResponseBodyAsString();
                    method.releaseConnection();
    //                System.out.println( contents );
                catch( Exception e ) {
                 e.printStackTrace();
                }I am getting a weird exception
    java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at
    HttpClient client = new HttpClient();How to fix this exception...
    Is this the right approach at all...

  • Simple html report

    In the Application Builder:
    Navigate to the page that you previously used for the APEX_ITEM Tutorial. On this page add a new HTML region. In the wizard accept the default options, except set the name to “PL/SQL Output” and the column to 2, then click the Create Region button.
    Now edit the region that you’ve just created.
    Set the Type to be “PL/SQL (anonymous block)”
    Set the Region Source to :
    DECLARE
    CURSOR c_emp IS
    SELECT empno, ename, ticked
    FROM emp;
    BEGIN
    FOR a IN c_emp LOOP
    IF a.ticked = 'Y' THEN
    htp.p('<b>Employee '||a.ename||' ('||a.empno||') has been ticked.
    </b>
    ELSE
    htp.p('Employee '||a.ename||' ('||a.empno||') has NOT been ticked.
    END IF;
    END LOOP;
    END;
    Run the page.
    how to do above functionality or above report in jdeveloper.
    generate html output.
    Edited by: OnlyOracle on Nov 11, 2008 1:16 PM

    Duplicate of simple html report

  • Very simple html template engine...

    Hi forum
    I need to create a very simple html templating engine. My requirements are only load a html document into an object (HTMLDocument for example?), search a couple of particular tag or string, treat the text found between these tags like a block, repeating the content all the necessary times, and replacing a special string within the text for another one.
    Here an example:
    <html>
    <title>Foo page</title>
    <body>
    <table>
    <!-- Initial special tag -->
            <tr>
                <td>{String to replace}</td>
            </tr>
    <!-- Final special tag -->
    </table>
    </body>
    </html>If i pass the html example code for the template engine with the following parameters, the result that i want is:
    Number of times to repeat the BLOCK: 3
    Text to replace de special string: Hello world
    <html>
    <title>Foo page</title>
    <body>
    <table>
            <tr>
                <td>Hello world</td>
            </tr>
            <tr>
                <td>Hello world</td>
            </tr>
            <tr>
                <td>Hello world</td>
            </tr>
    </table>
    </body>
    </html>That�s all. I search in google for something but a encountered only javascript based "applications", except the "Rhino" engine, but that is to much for mi needs.
    Well, i hope anyone can help me.... and sorry for may bad english :P...

    Here's the generated code:
    `include(~service="system", ~language="", ~theme="dm", ~name="TemplateLibraryDHTML.html")`
          `SAP_DynproLayerBegin(003,001,028,001)`
          `SAP_Label("%#AUTOTEXT001")`
          `SAP_DynproLayerEnd()`
          `SAP_DynproLayerBegin(003,003,020,001)`
          `SAP_Label("YSRMS_CTR_MASS_NEG_AMEND-YYNEG_AMEND_OLD")`
          `SAP_DynproLayerEnd()`
          `SAP_DynproLayerBegin(030,003,005,001)`
          `SAP_InputField("YSRMS_CTR_MASS_NEG_AMEND-YYNEG_AMEND_OLD")`
          `SAP_DynproLayerEnd()`
          `SAP_DynproLabelLine(003,003,030)`
          `SAP_DynproLayerBegin(003,004,020,001)`
          `SAP_Label("YSRMS_CTR_MASS_NEG_AMEND-YYNEG_AMEND_NEW")`
          `SAP_DynproLayerEnd()`
          `SAP_DynproLayerBegin(030,004,005,001)`
          `SAP_InputField("YSRMS_CTR_MASS_NEG_AMEND-YYNEG_AMEND_NEW")`
          `SAP_DynproLayerEnd()`
          `SAP_DynproLabelLine(003,004,030)`
          `SAP_DynproLayerBegin(004,006,014,001)`
          `SAP_Button("CTR_NEG_AMEND_REJ")`
          `SAP_DynproLayerEnd()`

  • How to do simple form post to payment gateway from SharePoint 2010 list form OR InfoPath 2010 Web Form?

    Working on a SharePoint 2010 Ent extranet site where parents of students can submit field trip permission forms and make payment at same time (optionally if fees involved).  Was wondering if someone could advise (or point me to resource on) best way
    to do a simple form post to an external payment gateway?  Would be from InfoPath web form OR SharePoint 2010 list form.
    Any guidance would be appreciated.
    Trevor

    you may create a custom visual web part for this:
    http://www.codeproject.com/Articles/152280/Online-Credit-Card-Transaction-in-ASP-NET-Using-Pa

  • Http-adapter: Convert html-post to JAVA-post?

    Hello everybody,
    unfortunately I am not a java programmer. But I am testing the http adapter.
    Is it possible to convert the following html-post into JAVA code?
    <html><head>
    <body>
    <form action="http://myserver" method="post">
    <p>Interface Namespace<br>
    <input name="namespace" value="http://mum.mappings" size="40"></p>
    <p>(Sender-) Service:<br>
    <input name="service" value="MUMHTTP" size="40"></p>
    <p>Interface Name:<br>
    <input name="interface" value="MI_Merge_1" size="40"></p>
    <p>Text:<br>
    <textarea name="Text" rows="5" cols="50"></textarea></p>
    <p><input type="submit" value="Send"></p>
    </form>
    </form>
    </body>
    </head>
    </html>
    For me it is important to send the values of the <input> values.
    How has the code look like?
    Many regards, mario

    Hi Mario,
    I Have once used this code snippet to send a payload to XI engine. Please change the parameters like XI server URL,
    Namespace,senderservice etc..
    Please let me know if you need any further help.
    Regards,
    Ananth
    public static void main(String[] args) throws Exception {
         try {
              URL sapURL = null;
              String urlString = "http://"+serverHost+":"+serverPort+"/sap/xi/adapter_plain?namespace="+senderNamespace+"&interface="
    +senderInterface+"&service="+senderservice+"&party=&agency=&scheme=&QOS="+QOS+"&sap-user="+sapUser+"&sap-password="+
    sapPWD+"&sap-client="+client+"&sap-language=E";
              sapURL= new URL(urlString);
              HttpURLConnection xi = (HttpURLConnection)sapURL.openConnection();
              xi.setRequestMethod("POST");
              xi.setRequestProperty("Content-Type","text/xml");
              xi.setDoOutput(true);
              generateXML(xi.getOutputStream());
              System.out.println(urlString);
              System.out.println("Resp Msg:"+xi.getResponseMessage()+" -- Resp Msg:"+xi.getResponseCode());
              xi= null;
         } catch (Exception e) {
                   e.printStackTrace();
    public static void generateXML(OutputStream out){
         try {
              PrintWriter prt = new PrintWriter(out,false);
              //Create XML tags
              prt.println("<?xml version= "1.0"?>");
              prt.print("<"+resp_MsgType+" xmlns:ns=""+resp_NameSpace+"">");
              prt.print("<"+xml_tag1+">");
              prt.print(xml_tagValue1);
              prt.print("</"+xml_tag1+">");
              prt.print("<"+xml_tag2+">");
              prt.print(xml_tagValue2);
              prt.print("</"+xml_tag2+">");
              prt.print("</"+resp_MsgType+">");
              prt.flush();
              prt.close();
              out.close();
              prt=null;
              out=null;
              }catch(Exception e){
                   e.printStackTrace();

Maybe you are looking for

  • BAPI or FM for scheduling a planned order (like MD11 or MD12)

    Hi guys. We are working with a group of materials and planned orders, in order to modify and create new planned orders depending on the stock per each material. So we use MD12 to 1) modify the quantity in the order, and MD11 to create new planned ord

  • BPM 11.1.1.5 Dynamic assignment of task to user

    Hi, I'm working with BPM 11.1.1.5 (without feature pack). I have a requirement to assign a task to a user dynamically, based on data that I pull from a DB query. If the task expires, I will assign it to another user once again based on a DB query. I

  • MBP 13' Won't boot from CD or external Drive

    Recently my MBP 13 (newest version) occasionally crashes with the grey screen death which forces me to hard shut down. This led me to believe my directory may be corrupted so I tried to boot from my external OS X (Snow Leopard) with DiskWarrior insta

  • Question re SUBSTR function

    Greetings, I have a text file with text formatted similarly to this in a variable V1... I do not want this part,I want this part, I do not want this part. I am trying to find a way to extract the segment between the two commas and am unable to figure

  • Different hardware for GETVPN Key server

      Hi, Can I use different platforms for Key server and COOP key server ? I belive it is just IPSec or GDOI relation between the two and platform is not related. Can I have some guidelines or link from Cisco on this ? Please help regards Prasad