NTLM and POST Request

Dear folks
I have done NTLM authentication successfully and got the logged in username, but my POST request quits working after NTLM authentication.
I have logged the HTTP headers using RequestDumperValve, it shows that even though the user is authenticated the browser sends authorization header on every POST request and its content-length is zero.
Im not able to understand the problem.
This problem is already discussed in many groups but all replied JCIFS, but i don't want to use it.
My configuration Apache 1.3,Tomcat 4.0,Mod_JK
Why the POST Request is not working?
Any help will be appreciated.
Regards
Ganesh

Yep, I am french so sorry for my english. I have maybe a solution, i have got the same problem with POST request after NTLM auth, they don't work with my ajax application.
I have search search and search, and i have write that :
You must place that in first place in your html file, before any tag ( so before <html> tag ).
I hope that this can help anyone...
<%
boolean isUserNameRecuperer = false;
boolean isAutorisationSend = (request.getHeader("Authorization") != null);
if (!isAutorisationSend)
          response.setHeader("WWW-Authenticate", "NTLM");
          response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
          return;
     else
          String authorisationCode = request.getHeader("Authorization");
          boolean isNTLMAutorisation = authorisationCode.substring(0, 4).equals("NTLM");
          if (isNTLMAutorisation)
               authorisationCode = authorisationCode.substring(5);
               BASE64Decoder base_64decoder = new BASE64Decoder();
               byte[] authorisationCode64 = base_64decoder.decodeBuffer(authorisationCode);
               System.out.println("NTLM Flag " +authorisationCode64[8]);
               if( authorisationCode64[8] == 1 )
                    if (authorisationCode64[13] == 178)
                         System.out.println("NTLM Flag Error");
                         //stop
                    String retAuth = "NTLMSSP"+Character.toString((char)0)+Character.toString((char)2)+Character.toString((char)0)+Character.toString((char)0)+Character.toString((char)0)+Character.toString((char)0)+Character.toString((char)0)+Character.toString((char)0);
                    retAuth += Character.toString((char)0)+Character.toString((char)40)+Character.toString((char)0)+Character.toString((char)0)+Character.toString((char)0)+Character.toString((char)001)+Character.toString((char)130)+Character.toString((char)000)+Character.toString((char)000);
                    retAuth += Character.toString((char)0)+Character.toString((char)2)+Character.toString((char)2)+Character.toString((char)2)+Character.toString((char)0)+Character.toString((char)000)+Character.toString((char)000)+Character.toString((char)000)+Character.toString((char)000);
                    retAuth += Character.toString((char)0)+Character.toString((char)0)+Character.toString((char)0)+Character.toString((char)0)+Character.toString((char)0)+Character.toString((char)000)+Character.toString((char)000);
                    BASE64Encoder base_64encoder = new BASE64Encoder();
                    String retAuth64 = base_64encoder.encode(retAuth.getBytes());
                    retAuth64.trim();
                    response.setHeader("WWW-Authenticate", "NTLM "+ retAuth64);
                    response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
                    return;
               else if (authorisationCode64[8] == 3)
                    //le domaine
                    int lenght = (authorisationCode64[31]*256 + authorisationCode64[30]); // longueur du domain
                    int offset= (authorisationCode64[33]*256 + authorisationCode64[32]); // position du domain.     
                    String codeATraiter = "";
                    for (int i=0; i < authorisationCode64.length; i++)
                         codeATraiter += (char) authorisationCode64;
                    String domain = codeATraiter.substring(offset, offset+lenght); // decoupage du du domain.
                    domain.replace("\0", "");
                    //le login
                    lenght = (authorisationCode64[39]*256 + authorisationCode64[38]); // longueur du domain
                    offset = (authorisationCode64[41]*256 + authorisationCode64[40]); // position du domain.     
                    String username = codeATraiter.substring(offset, offset+lenght); // decoupage du du domain.
                    username = username.replaceAll("\0", "");
                    System.out.println(username);
                    isUserNameRecuperer = true;
                    response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
%>
It's normal that the last status of my page is response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
in an other case that block any POST request.
Message was edited by:
BoBlepepeur

Similar Messages

  • Developing a code with multiple GET and POST requests

    hi all,
    i have a requirement to upload a video file to a server and i need your help to develop the code using java .Basically it has several steps like
    1) A GET request should be made to the server with parameters like file name,size etc
    2) The response from the server is an XML document which contains a list of URLs to upload the file to.
    3) Get the URL from the XML and POSTyour file to the URLs listed in response.
    4) After POSTing the video file to the url(s) you received in the Create Video request, a GET request should be made to this URL to signal that a video has finished uploading in its entirety and check for the response code to see if the file is uploaded
    5) If an upload cannot be completed signal that has uplaod has failed by by making another GET request to the server
    I am not sure how can i implement all these steps in one single java program. Can someone please advise
    Thank You

    ForumKid2 wrote:
    Although you could technically do it all in one Java class, it makes no sense.Agreed 100%. But the question was how to do it in one program, which of course could contain numerous classes. (Unless the OP is confused about what a program is...)

  • NTLM and Http request

    can anyone tell me how to do proxy authetication if NTLM authorization is involved...i wrote a java client that is behind MS Proxy server and hence facing problem in establishing connection with sites...i am getting UnknownHost Exception when i try to call conn.connect() i think it's due to NTLM protocol..Can any one help me in this.
    Thanks in advance
    mano

    Here is the solution for NTLM auth http://www.luigidragone.com/networking/ntlm.html
    You may need to change it to support auth on MS proxy...

  • Truncated POST requests in IE 10 - In Response to NTLM Authentication

    In Internet Explorer 10, the browser is incorrectly truncating HTTP POST requests and submitting unsolicited NTLM negotiate headers with a  HTTP Content-Length of Zero Bytes.  This results in HTTP POST parameters failing to be submitted to the
    server.
    Assume the following web application with a context root of:
    https://w3.someapplication.net/webapplication/
    Secure cookies for this site are established at the context root of this application.
    To reproduce this issue, a secure session is established at a protection space deeper than the root context of the web app:
    https://w3.someapplication.net/webapplication/secure/login
    After establishing a secure session with the web application, some client side artifacts are retrieved from a web proxy at a higher protection space:
    https://w3.someapplication.net/webapplication/somejs.js
    Subsequent HTTP POST requests to a deeper protection space will result in IE incorrectly attempting to pass an unsolicited NTLM negotiate header to the server side, and the HTTP POST request will be truncated with a Zero Content-Length header:
    https://w3.someapplicaiton.net/webapplication/submit/form
    The result is that the HTTP POST parameters submitted to the last URL will be lost.
    This is reproducible against IE6 and IE10.  It does not reproduce against IE8, or any non-Microsoft browser which all behave in a sane manner. 
    My Questions:
    Why is IE behaving this way?
    What can I do to make IE behave properly?  Please don't suggest that I change the entire structure of my company's website to overcome this kind of silly bug in IE.
    Is there a planned fix to correct this behavior back to the proper implementation observed in IE8?
    Additional details about this problem are documented by an IE Internals blogger at the following url:
    http://blogs.msdn.com/b/ieinternals/archive/2010/11/22/internet-explorer-post-bodies-are-zero-bytes-in-length-when-authentication-challenges-are-expected.aspx
    Michael

    Yes, I have read that blog post in detail.  All of the comments from Microsoft on this issue suggest making intrusive changes to the web application side to work around this "optimization".  This is not an acceptable answer.  This
    is clearly a bug in IE.  Evidence to support that this is a bug is that the behavior within IE's own browsers is not consistent; IE6 and IE10 will reproduce this issue, IE7 and IE8 will not. 
    I don't understand your suggestion; "ensure all paths are configured to require authentication".  This is not a reasonable expectation for any normal web app.  Our application does require authentication on all paths. However, when the first
    authentication request goes through, a HTTP Session is established.  Any subsequent request to that domain will not and should not be re-authenticated.  IE making assumptions about the authentication requirements of a server side application is incorrect.
    Further, even if i did re-challenge the browser for credentials on every path, regardless of whether a session is established or not, how would I handle the requirement to serve client side artifacts from a web proxy within that secure domain?  Am I expected
    to force my web proxy to require an NTLM header to serve up a CSS file?  That is just silly.
    You also suggested that my application might be incorrectly returning a 401.  I can assure you, that is not the case.  The flow is this:
    Perform a signon to the application and retrieve some client side artifacts required by the splash page
    https://w3.myapp.com/some/app/path?query=string
    401 + www-negotiate response header
    https://w3.myapp.com/some/app/path?query=string
    browser provides a ntlm token, user is logged in, session is started
    https://w3.myapp.com/some/file.js 200 response code, no challenge from the server side
    Splash page is loaded; user submits a POST request
    https://w3.myapp.com/some/app/path POST request fails because IE truncates the request and attaches an NTLM negotiate header with Zero Byte content length.  This is an unsolicited negotiate header from IE.
    Honestly, it really irritates me when people suggest we should change our entire application structure to accommodate IE bugs or "features" that are completely outside of the HTTP spec. I understand RFC4559 states that a browser MAY initiate a request
    to a server which includes an unsolicited negotiate header, but it doesn't say anything about truncating the contents of that request. 
    No other browsers exhibit this behavior, and even the behavior within Microsoft's own product is not consistent.  It is insanely frustrating as a web developer trying to deal with all of IE's little nuances. 
    Is there anyway this can be turned off via a registry entry?  Is there any plan to fix this in a future release? 

  • Park and Post for Down Payment Request (F-47)

    SAP Gurus,
    We are having requirement for park and post in Down Payment Request (F-47). So that it is approved by an authoriser.
    Hence, Is it possible to workflow a down payment request to an authoriser for approval
    Please share with me options available for this Down payment request
    Regards,
    Raj

    Hi Raj,
    Please check with your workflow consultant. Anyway, I'd like to share with you how to know whether there is a standard workflow for application component in question. T-Code SWDD -> Workflow -. Other Workflow/Version. Then drilldown on the task field. Then choose structure search. You will find the standard workflow for each of the component. Unfortunately, there is no standard workflow for downpayment but if you have workflow consultant, they may be able to help.
    Regards
    Fauzi

  • Weblogic POST requests and foreign characters

    We have Ajax post requests that work correctly in the Tomcat/Eclpse development environment. When moving them to the Weblogic environmnent, the POST requests no longer correctly send the data.
    A request object is created with a URL. The foreign character string is encoded using the Javascript encodeURIComponent.
    The request is sent to the servlet.
    When the servletbase class starts the parameter is printed and shows ????.
    On the Tomcat environment the servletbase (which extends HttpServlet) class shows the parameter as what looks like a UTF-8 string.

    Have you tried seeing what ServletRequest.getCharacterEncoding() returns on both Tomcat / WebLogic?
    http://download.oracle.com/docs/cd/E17410_01/javaee/6/api/javax/servlet/ServletRequest.html#getCharacterEncoding()

  • Plain HTTP sending Post Requests and Multipart Uploads

    Hi,
    I have a scenaio where I need to send an normal POST request
    to the server. This request needs to have not the XML payload but
    the same data in the form of a POST request.
    Is there a way to transform the data out of the XML format into
    the plain POST format prior to sending it?
    Also, another scenario requires an file upload via HTTP (like a
    file submitted by a web-form). Is this possible with PI and how?
    Thanks for any pointers
    Best regrads

    Hi,
    If you do not send any payload in the http request you are going to get a http error.
    For your second requirement, There is no any problem, You can use any existent tool, or maybe develop you own program.
    Http client.
    http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3417600)ID1536482550DB10501227175138097442End?blog=/pub/wlg/15296
    Regards
    Ivan

  • How to Record HTTP Requests and POST data

    Hai all..
    Can anyone help me to solve this issue..
    How to Record HTTP Requests and POST data by using java..
    regards
    Ranjith Nair

    You should read about TCP and splitting data stream into packets and learn how to understand packet header to assemble stream from packets.
    Actually there are few different stages:
    1. detect handshake to start new empty stream within your code;
    2. detect subsequent packets and assemble stream (there are counters within packet header and they will help).
    After creating start of TCP stream (usually 1KB is enough) you'll be able to detect is it HTTP request/header or no and start logging or ignoring packets for this connection.

  • Concurrent processing of POST requests and automatic flushing of the servlet response buffer in WLS6.1.

              Hi all,
              I encountered the following 2 servlet problems in WLS 6.0/ 6.1:
              1. Processing concurrent POST requests
              WLS seems to disallow concurrent executions of any servlet's doPost servlet method.
              When two clients attempt to send a request to a servlet using POST, the socond
              one
              is blocked until the first customer is served. In essence, the servlet ends up
              operating in
              1-user mode. I just learned from Jervis Liu that the problem is solved in WLS6.0
              if you disable http-keepalive.
              For WLS 6.1 a partial workaround is to make the servlet work in a single-thread
              mode (by implementing the javax.servlet.SingleThreadModel interface). In this
              case,
              WLS dispatches concurrent requests to different instances of the servlet.
              This doesn't completely eliminate the problem - still only one customer can be
              connected at a time. The improvement is that once the first customer is disconnects,
              the second can be served even if the doPost method for the first has not finished
              yet.
              2. Flushing the response buffer in WLS 6.1
              The servlet response buffer is not flushed automatically until doPost ends, unless
              you
              explicitly call response.flushBuffer(). Closing the output stream doesn't flush
              the
              buffer as per the documentation.
              I see that other people are experiencing the same problems.
              Has anyone found any solutions/workarounds or at least an explanation.
              Any input would be highly appreciated.
              Thanks in advance.
              Samuel Kounev
              

    Thanks for replying. Here my answers:
              > Did you mark your doPost as synchronized?
              No.
              > Also, try testing w/ native i/o vs not ... is there a difference?
              With native I/O turned off I get a little lower performance, but the
              difference is not too big.
              Best,
              Samuel Kounev
              > Peace,
              >
              > --
              > Cameron Purdy
              > Tangosol Inc.
              > << Tangosol Server: How Weblogic applications are customized >>
              > << Download now from http://www.tangosol.com/download.jsp >>
              >
              > "Samuel Kounev" <[email protected]> wrote in message
              > news:[email protected]...
              > >
              > > Hi all,
              > >
              > > I encountered the following 2 servlet problems in WLS 6.0/ 6.1:
              > >
              > > 1. Processing concurrent POST requests
              > >
              > > WLS seems to disallow concurrent executions of any servlet's doPost
              > servlet method.
              > >
              > > When two clients attempt to send a request to a servlet using POST, the
              > socond
              > > one
              > > is blocked until the first customer is served. In essence, the servlet
              > ends up
              > > operating in
              > > 1-user mode. I just learned from Jervis Liu that the problem is solved in
              > WLS6.0
              > >
              > > if you disable http-keepalive.
              > >
              > > For WLS 6.1 a partial workaround is to make the servlet work in a
              > single-thread
              > >
              > > mode (by implementing the javax.servlet.SingleThreadModel interface). In
              > this
              > > case,
              > > WLS dispatches concurrent requests to different instances of the servlet.
              > > This doesn't completely eliminate the problem - still only one customer
              > can be
              > >
              > > connected at a time. The improvement is that once the first customer is
              > disconnects,
              > > the second can be served even if the doPost method for the first has not
              > finished
              > > yet.
              > >
              > > 2. Flushing the response buffer in WLS 6.1
              > > The servlet response buffer is not flushed automatically until doPost
              > ends, unless
              > > you
              > > explicitly call response.flushBuffer(). Closing the output stream doesn't
              > flush
              > > the
              > > buffer as per the documentation.
              > >
              > > I see that other people are experiencing the same problems.
              > >
              > > Has anyone found any solutions/workarounds or at least an explanation.
              > > Any input would be highly appreciated.
              > >
              > > Thanks in advance.
              > >
              > > Samuel Kounev
              =====================================================
              Samuel D. Kounev
              Darmstadt University of Technology
              Department of Computer Science
              DVS1 - Databases & Distributed Systems Group
              Tel: +49 (6151) 16-6231
              Fax: +49 (6151) 16-6229
              E-mail: mailto:[email protected]
              http://www.dvs1.informatik.tu-darmstadt.de
              http://skounev.cjb.net
              =====================================================
              [att1.html]
              

  • BUGS and FEATURES REQUESTED. Please add to it.

    I've been using the z10 for the past couple weeks and wanted to start a thread of comprehensive Bugs and Features Requested.
    I've labeled Bugs by letters (A,B,C...) and Features Requested by numbers (1, 2, 3...) so that others can add sequentially.
    BUGS
    (Not listed in any particular order)
    (A.) Contact App adds current date as birthday. When I edit my contact, the current date gets listed as the birthday in local contact.
    (B.) Duplicate telephone numbers listed. Telephone numbers show up twice in my Contacts (e.g.., if I have the contact's cell saved in (000) 123-4567 format and the person has the number listed in Facebook, I get a duplicate entry of +10001234567).
    (C.) Telephone numbers and emails are not actionable in Web pages. In webpages, I can't click on telephone number to call (e.g., I look up a phone number for a restaurant). I should be able to easily call or copy into the Phone App or E-mail App.
    (D.) Auto capitulation for words on the word substitution list is wrong. For example, when the word substitution contains more than one word. I have "ru" change to "are you" but if the first letter is capitalized (R) then both words become capitalized words (Are You). I used to have shortcuts like "mysig" to create email signatures with legal disclaimers but I can't do that now.
    (E.) Backspace delete doesn't work consistently. The Shift+Delete function seems only to work after moving the cursor. This feature is the Alt+Del action to delete words after the cursor.
    (F.) All Emoticons do not list. Emoticons do not all fit on the the two screens (lists) of emoticons. I.e., two columns are missing from view and can be seen when sliding (swiping) between the lists. Also, sometimes when I select an emoticon, it doesn't correspond with the picture of the one I intended. I believe this error is related. As a separate note, there should be a way to see the underlying symbols of the emoticon. (Often times, other people don't have BlackBerrys so I'd like to know what symbols would be sent--my prior 9800 would show the characters as i scrolled through them).
    (G.) BlackBerry keyboard doesn't always work in input fields. E.g., certain Web pages. (I found a work around; two finger swipe up from the bottom makes the keyboard appear)
    (H.) Sent messages stay unread. This seems to be an issue when an app sends an email (e.g., share article). The email with the sent indicator (checkmark) stays bold and I have listed 1 unread email. I can't mark as read/unread but if I delete the sent email, my unread message gets cleared.
    (I.) Contact already added but I get the option to add instead of view contact. For some contacts, I get the option to add to contacts in the action menu cascade when that person is already in my address book. This bug is for emails and text messages.
    (J.) Cannot call from text message. When I hold a text message and select call under the action menu cascade, the OS opens up the phone app but doesn't call.
    (K.) Composing messages by name. When composting messages, the input must be by first, middle and last name. It should be, instead, by string and include nickname. E.g., if the person's name is "Andrew B. Cameron" I must type the name in as such. I can't type in "Andrew Cameron" or "Andy Cameron."
    Features Requested and Suggestions for Improved User Experience
    (In no particular order)
    1)      Option to reply in different ways from the Call List. Be able to select a name in a call list and have options to call, text or email the person. The action menu allows calls to other numbers but I can't choose to text or email the contact instead. Sometimes, I missed a call and want to reply via text because I’m not able to talk. (Long hold on the Torch 9800 trackpad button brought up the action menu allowing me to call, text, view history, add to speed dial, e-mail, delete, etc.)
    2)      Option to reply in different ways from the Hub. Related to above, when selecting an item in the hub, have the option to contact the sender or caller with multiple different ways.
    3)      Only show number once in contacts application. Tap on the number to bring up the "action" cascade menu with options to call or text the number. Why is the same number listed twice (once to call and below again to text it)?
    4)      Timestamps for individual text messages. I can't tell exact time on individual text message if it comes in near the time of another text. All messages are in one "bubble."
    5)      Ability to select MMS or text for a message. Sometimes I write a text longer than 160 characters and I prefer it to be sent in one message (i.e., MMS mode) rather than being broken into one or more standard text messages. I had this ability with my 9800.
    6)      Send button should be moved for text messages!!! Why the heck is it right underneath the delete button?!? Or next to the period button? I often times have accidentally hit send when composing text. It's very annoying and embarrassing. (Also, what happened to the ability to hit enter for a return carriage to next line?)
    7)      Bigger magnifying glass. My finger is often over the area I need to place the cursor. I find it difficult and erratic to place the cursor.
    8)      Select all option. Add the option to select all text in action menu cascade.
    9)      E-mail recipients and message headers. Difficult to tell if you are one of many email recipients. Can we have a way to pull the email down to see the list of recipients rather than have to click to expand the header info? I know this request is a little picky, but that's how it was done in the previous BlackBerry OS which I preferred; it is easier and faster to pull the e-mail down and 'peek' to see which e-mail box received the message, message status, from and to fields. This change would be consistent with BB's flow/peek rather than click.
    10)   Browser navigation. Hold down back arrow to get a list of recently visited websites similar to a desktop browser.
    11)   Dark/Night mode. A night mode (maybe in the drop down menu) to change all the white and bright backgrounds to black or dark which would be helpful when reading/viewing things at night in bed/etc.
    12)   Number of contacts. Ability to see how many contacts I have.
    13)   What happened to groups or categories? I'd like to have back the ability to filter or see categories and also a way to contact everyone in a category. E.g., family or friends or coworkers, etc.
    14)   Shutter sound mute. I was at a wedding and wanted to take pictures during the ceremony but the shutter would was too loud.
    15)   East Asian Language Input. I bought my parents two Samsung Galaxy S3 phones over the weekend because they need Korean input (and the Kakao talk app). (BTW, S3 is a great phone but I prefer the Z10 after having the weekend to use the Android phones).
    16)   Ability to freely place icons on the homesreen. Currently, icons are forced top left-right-to-bottom. I prefer to space my icons out.
    17)   Add a contact to the homescreen. I'd like to place a shortcut (similar to a Webpage) to the homescreen for a contact which will open up the contact. Android allows this feature and so did my previous 9800.
    18)   Search Contacts by nickname. The contacts app doesn't allow me to search by, e.g., Andy, even if I have that as my contact's nickname. The previous OS allowed this type of search which was very helpful.
    Finally, as a note, I've been using the BlackBerry Z10 for the past 2 weeks and it's a great platform. I just bought two Samsung Galaxy S3 phones over the weekend for my parents so they could use the Korean language input and related features so I spent a lot of time with the Android platform, setting it up and teaching them how to use it. The S3 is a great phone too.
    I prefer, however, the way BlackBerry has done their OS 10 and the integrated management of messages.
    It's too bad that BB doesn't have Korean input and apps like Kakao Talk or I would have considered it for them.
    The BlackBerry 10 is a great platform and I look forward to the continual improvements that will only make the experience better.

    This is a great post.
    I couldn't have written it myself better.
    I'm also in dying need of Korean input as I can't communicate with my Korean friends.
    But I second every point.
    I hope the tech teams are reading this.

  • Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination

    Problem with "SELECT...FOR UPDATE OF..." and "POST command" combination
    Problem in committing transactions in Multiple Forms (Oracle Forms) with POST built-in command:
    Consider that the following statements are written in WHEN-WINDOW-CLOSED trigger of a called form.
    Statements in called form (Form name: FORM_CHILD):
    go_block('display_block') ;
    do_key('execute_query') ;
    -- Data from table_b will be populated in this block, based on the value of COLUMN_1 obtained
    -- from TABLE_A.
    -- Example: If the value of COLUMN_1 is 10, then all the matching records from TABLE_B, which
    -- are inserted with value 10 in TABLE_B.COLUMN_1 will be fetched and shown here.
    if user_choice = 'YES' then
    commit ;
    else
    rollback ;
    end if ;
    Statements in calling forms:
    There are two calling forms having following statements and it is going to call the above said called form.
    CALLING FORM 1
    Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...; Statements in KEY-COMMIT trigger:
    post;
    call_form(form_child, no_activate) ;
    CALLING FORM 2:
    Statements in ON-INSERT trigger:
    select column_1
    from table_a
    for update of column_1
    where column_2 = 'X' ;
    update table_a
    set column_1 = column_1 + 1
    where column_2 = 'X' ;
    insert into table_b ...;
    insert into table_b ...;
    insert into table_b ...;
    Our understanding:
    Assume that both the forms are running from two different machines/instances, issuing commit at the same time. In this case, forms will start executing the statements written in ON-INSERT trigger, the moment POST command is executed. Though the commit is issued at the same time, according to oracle, only one of the request will be taken for processing first. Assume that calling form 1 is getting processed first.
    So, it fetches the value available in COLUMN_1 of TABLE_A and locks the row from further select, update, etc. as SELECT...FOR UPDATE command is used (note that NOWAIT is not given, hence the lock will be released only when COMMIT or ROLLBACK happens) and proceed executing further INSERT statements. Because of the lock provided by the SELECT...FOR UPDATE command, the statements in calling form 2 will wait for the resource.
    After executing the INSERT statements, the FORM_CHILD is called. The rows inserted in to TABLE_A will be queried and shown. The database changes will be committed when user closes the window (as COMMIT is issued in its WHEN-WINDOW-CLOSED trigger). Then the SELECT...FOR UPDATE lock will be released and calling form 2's statements will be executed.
    Actual happenings or Mis-behavior:
    Calling form 2 starts executing INSERT statements instead of waiting for SELECT...FOR UPDATE lock. Also, the value selected from TABLE_A.COLUMN_1 is same in both the calling forms, which is wrong.
    The rows inserted into TABLE_B are having similar COLUMN_1 values in calling form 2 and they are fetched and shown in the called form FORM_CHILD.
    Note that in calling form 2 also POST only is issued, but the changes posted there are accessible in calling form 1 also, which is wrong.
    Kindly suggest us as to how to fix above problem. It will be much use, if you can send us the information regarding the behavior of Oracle Forms POST built-in also.
    Our mail ID: [email protected]
    Thanks a lot in advance.

    You have several problems:
    1. On-Insert will ONLY run if you have created a new record in a base-table block. If you haven't done that, then the POST command will not cause it to run.
    2. Select for update without a "no wait" will lock records for the first form, but when the second form tries this, it will hit the ORA-00054 exception, and will NOT wait. The only way you could make it wait is to issue an UPDATE sql command, which is not such a good way to go.
    All POST does is issues SQL insert or update commands for any changes the user has made to records in a form's base-table blocks, without following with a Commit command.
    Also understand that Commit is the same as Commit_Form, and Rollback is the same as Clear_Form. You should read up on these in the Forms help topics.

  • Open URL in a browser with POST request from FlashPlayer?

    I have a SWF file that plays locally in Standalone Flash Player 11.2 under Win 8.1.
    I'm using the standard navigateToUrl() function to open a URL in a browser, so it's not published for AIR, I make sure that request data is not empty - it contains my URLvars, the function is user initiated on click, and the request method is POST.
    Still the browser sends a GET request.
    Am I missing something? Is it possible to fix, so it sends POST?
    Thanks!

    Can not post my code properly because it then requires moderation, so plain text:
    var req:URLRequest = new URLRequest(....);
    var vars:URLVariables = new URLVariables();
    vars.xxxx = hub.extras[3];
    vars.yyyy = hub.extras[4];
    req.data = vars;
    req.method = URLRequestMethod.POST;
    navigateToURL(req, "_blank");

  • Multiple Forms in a Flash Document and Posting Using ASP

    Hello everyone!
    I have some what of a dilemma on my hands. I am creating
    multiple forms in one document using Flash and need them to post
    using ASP script. I have been researching this for the last six
    days, and I have had NO luck. I have noticed that all the
    information that I have found is for one form, not more than one.
    What I have so far is the Flash document, with 4 forms. The
    basic idea is that a user chooses from a drop down menu (the
    combobox) a location, and depending on the location chosen, it
    takes the user to another frame in the flash document. The forms
    (all their own movie clip) contains a name field, a department
    field, and either a manager name a userID field or an employee
    number as well as the basic buttons for submitting the form or
    resetting the form.
    So far what I have working is the drop down menu (combobox)
    taking me to the proper frame and it shows the appropriate form.
    The reset button clearing the form (deleting any information that I
    have imputed into the input fields), but I have absolutely NO idea
    how to get the submit button to work (I did manage to get it to
    send me a message if there was nothing in one of the input fields),
    and NO idea how to get the information to the ASP file.
    Where there are 4 forms do each of them have to have their
    own ASP file attached to them, or can I use one?
    If anyone knows a site that deals with multiple forms in one
    SWF and posts using ASP that would be greatly appreciated, or if
    you know some actionscript that could be helpful.
    Thank you all in advance.

    That would be part of my problem, I really don't know ASP,
    and I am flying by the seat of my pants.
    The current script I have for the ASP file is:
    <% @Language = "VBScript" %>
    <%
    Option explicit
    Dim strfullName
    Dim strdeptName
    Dim strmanagerName
    Dim strobjeemail
    Dim strlocation
    strfullName.Request.Form("fullName_txt")
    strdeptName.Request.Form("deptName_txt")
    strmanagerName.Request.Form("managerName_txt")
    strlocation.Request.Form("locationName")
    Set strobjemail = CreateObject("CDO.Message")
    strobjemail.From = "[email protected]"
    strobjemail.To = "[email protected]"
    strobjemail.Subject = "Program from " + strlocation
    strobjemail.Body = "This user has completed this progrmam
    from " + strlocation & Chr(13) & Chr(10) & "Name: " +
    strfullName & Chr(13) & Chr(10) & "Department: " +
    strdeptName & Chr(13) & Chr(10) & + "Manager: " +
    strmanagerName
    strobjemail.Send
    Set strobjemail=nothing
    %>
    The AS code that I have so far is:
    function formValidationChecks(){
    if (fullName_txt.length==0){
    status_txt.text = "Please enter your Name";
    else if (deptName_txt.length==0){
    status_txt.text = "Please enter your Department";
    else if (managerName_txt.length==0){
    status_txt.text = "Please enter your Manager";
    else {
    status_txt.text = "Thank You!";
    variables.fullName_txt = fullName_txt.text;
    variables.deptName_txt = deptName_txt.text;
    variables.managerName_txt = managerName_txt.text;
    varLoader.load(varSend);
    trace("-----");
    trace("Name: "+fullName_txt.text);
    trace("Department: "+deptName_txt.text);
    trace("Manager: "+managerName_txt.text);
    trace("Form validated");
    submit_btn.onRelease = function(){
    status_txt.text = "";
    if(formValidationChecks()){
    var lv = new LoadVars();
    lv.fullName_txt = form.fullName_txt.text;
    lv.deptName_txt = form.deptName_txt.text;
    lv.managerName_txt = form.managerName_txt.text;
    lv.sendAndLoad("mail.asp", lv, "POST");
    reset_btn.onRelease = function()
    fullName_txt.text = "";
    deptName_txt.text = "";
    managerName_txt.text = "";
    So far my reset button clears everything, and the submit
    button is tracing the content in the form fields, but it's not even
    grabbing the asp page.
    Any suggestions? Even pages that have tutorials that are in
    the form of a video.
    Thanks

  • 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.

  • 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.

Maybe you are looking for