HTML POST method in a dynamic page

Greetings Portalists,
I have a basic question here. I need to pass the values of an html form (constructed within a dynamic page) to a procedure to process the users' inputs. The form is highly dynamic in terms of numbers of parameters, but we're talking about upwards of 200 text fields that require passing. Now, I realise that this in itself isn't a problem, and I've set this up without too much difficulty using method="POST" - but the called procedure in the form's action=... attribute seems to need to be publicly-executable for this scenario to work. For a production environment, I don't want to keep the PUBLIC grant on the procedure, but whenever I revoke it, the Portal throws me back a 404 Not Found when I submit the form.
So my question is this -- how can I tighten the security around executing the procedure? Are there any best practices for this sort of situation (which I can't imagine are all that rare)?
I've searched through many various web toolkit and Portal documents looking for an answer to this but to no avail, so any suggestions really would be highly appreciated.
Many thanks.
*.s.*

Granting execute to public make a procedure accessible to portal_public (the schema) which contains the mappings to all the authenticated light-weight users. You can keep the public or portal_public grant for execution on the procedure and yet have a good control on who would be able to see your form. That would be based on your pl/sql logic.
For instance, if you wish to keep it for only authenticated users (users who are in registered with your portal) or with any certain group of users, you can always apply a block containing code for checking their group memberships. If a user belongs to your desired group, you can let the desired logic expose to them, otherwise not.
Please check the portal pl/sql api's that come with portal version you are using, for help.
AMN

Similar Messages

  • 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

  • Trying to Imitate the html POST  method with an applet

    I am trying to imitate the POST method with an applet, so that I can eventually send sound from a microphone to a PHP script which will store it in a file on a server. I am starting out by trying to post a simple line of text by making the PHP script think that it is receiving the text within a POST-ed file. The reason I am doing things this way is in part because I am, for the time being, limited to a shared server without any support for servlets or any other server side java.
    The code I am trying is based in part on an old thread found elsewhere in this forum, concerning sending data to a PHP file by imitating the POST method:
    link:
    http://forum.java.sun.com/thread.jspa?threadID=530399&messageID=2603608
    someone named "harmmeijer" provided most of the answers on that thread. If that person is still around hope they take a look at this,also I have some questions to clarify what they said on the other thread..
    My first attempt at code is below. The applet is in a signed jar file and is trying to pass a text line to the PHP script in the same directory and on the same server that the applet came from. It is doing this by sending header information that is supposed to be identical to what an html form would send if it was uploading a .txt file with the line of text within it. The applet displays one button. When you press it, it sucessfully starts up the postsim method (defined at the end), which is supposed to send the info to the PHP script at the server.
    I have two questions:
    1) I know that the PHP script is starting up, because it prints out a few messages depending on what happens. However, the script does not recognize any file coming down the line, so it does not save anyting on the server, and prints out a message saying the no file was uploaded.
    Any idea what might be going wrong? I'm not getting any error messages from the applet. I've tried a few different variations of the 'header' information contained in the line:
    osToServer.writeBytes("--****4353\r\nContent-Disposition: form-data; name=\"testfile\"; filename=\"C:testfile.txt\"\r\nContent-Type: text/plain\r\n");
    The commented out line below it shows one variation (which was given in the thread mentioned above).
    2) You'll notice that I've commented out the two lines having to do with the input line:
    //InputStream isFromServer;
    and
    //isFromServer = uc.getInputStream();
    The reason is that the program crahes whenever I put the latter line in - to the extent that Opera closes down the JVM and then crashes when I tried to exit it.. I must be doing something horribly wrong there! I first tried using isFromServer = new DataInputStream(uc.getInputStream());
    becuase it was consistent with the output stream, but that caused the same problem.
    Here's the code:
    public class AudioUptest1 extends Applet{
    //There are a few spurious things defined in this section, having to do with the fact the microphone data is evenuatly going to be sent. haven't yet insterted code to get input from a microphone.
    AudioFormat audioFormat;
    TargetDataLine targetDataLine;
    SourceDataLine sourceDataLine;
    DataOutputStream osToServer;
    //InputStream isFromServer;
    URLConnection uc;
    final JButton captureBtn = new JButton("Capture");
    final JPanel btnPanel = new JPanel();
    public void init(){
    System.out.println("Started the applet");
    try
    URL url = new URL( "http://www.mywebsite.com/handleapplet.php" );
    uc = url.openConnection();
    //Post multipart data
    uc.setDoOutput(true);
    uc.setDoInput(true);
    uc.setUseCaches(false);
    //set request headers
    uc.setRequestProperty("Connection", "Keep-Alive");
    uc.setRequestProperty("HTTP_REFERER", "http://applet.getcodebase");
    uc.setRequestProperty("Content-Type","multipart/form-data; boundary=****4353");
    osToServer = new DataOutputStream(uc.getOutputStream());
    //isFromServer = uc.getInputStream();
    catch(IOException e)
    System.out.println ("Error etc. etc.");
    return;
    //Start of GUI stuff
    captureBtn.setEnabled(true);
    //Register listeners
    captureBtn.addActionListener(
    new ActionListener(){
    public void actionPerformed(
    ActionEvent e){
    captureBtn.setEnabled(false);
    //Postsim method will send simulated POST to PHP script on server.
    postsim();
    }//end actionPerformed
    }//end ActionListener
    );//end addActionListener()
    add(captureBtn);
    add(btnPanel);
    // getContentPane().setLayout(new FlowLayout());
    // setDefaultCloseOperation(EXIT_ON_CLOSE);
    setSize(250,70);
    setVisible(true);
    }//end of GUI stuff, constructor.
    //These buffers might be made larger.
    byte tempOutBuffer[] = new byte[100];
    byte tempInBuffer[] = new byte[100];
    private void postsim(){
    System.out.println("Got to the postsim method");
    try{
    //******The next four lines are supposed to imitate a POST upload from a form******
    osToServer.writeBytes("--****4353\r\nContent-Disposition: form-data; name=\"testfile\"; filename=\"C:testfile.txt\"\r\nContent-Type: text/plain\r\n");
    //osToServer.writeBytes("Content-Disposition: form-data; name=\"testfile\"; filename=\"C:testfile.txt\"\r\nContent-Type: text/plain\r\n");
    //This is the text that's cupposed to be written into the file.
    osToServer.writeBytes("This is a test file");
    osToServer.writeBytes("--****4353--\r\n\r\n");
    osToServer.flush();
    osToServer.close();
    catch (Exception e) {
    System.out.println(e);
    System.out.println("did not sucessfully connect or write to server");
    System.exit(0);
    }//end catch
    }//end method postsim
    }//end AudioUp.java

    Hi All,
    I was trying to write a signed applet that helps the
    user of the applet to browse the local hard disk and
    select a file from the same. The JFileChooser class
    from Swing is what I used in my applet. The problem
    is with the policy file. I am not able to trace the
    exact way to write a policy file which gives a total
    access to read,write,delete,execute on all the drives
    of the local hard disk.
    I am successful in signing the applets and performing
    operations : read,write,delete & execute on a single
    file but failing to grant permission for the entire
    file.
    Any help would be highly appreciated.Which policy file are you using? there might be more than one policy file.
    also, u have to specify the alias of the signed certificate in the policy file to grant the necessary priviledges to the signed applet.

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

  • Dynamic page form

    I have a HTML form created as a dynamic page in portal
    the structure is as below
    <html>
    <script>
    some javascript ....for form validation
    </script>
    <body>
    <form>
    --form elements ..
    </form>
    </body>
    </html>
    When i have this dy page included in Portal page as portlet along with templates for the header foooter etc ..
    I cannot get my form to submit or the javascript to work ..
    as i think portal is putting the dynamic page code as is
    and so the portal generated html has multiple html/body tags ..
    whats is the right way to do this ..

    Hi,
    You can see the html source of a form with javascript when put on a page. You should do something similar for the dynamic page you write.
    -Sharmila

  • Html dynamic page

    Does mailto code with text attachment work in oracle portal. I tried this in a dynamic page but not giving me proper result.Can we use ENCTYPE ?
    <FORM METHOD = POST ENCTYPE = "text/plain" ACTION = "mailto:[email protected]" >
    Suggestions please!

    Hi,
    If you are using "mailto:test.com" then what are you trying to submit? I assume you are having some text / texarea with
    data. You wont be able to send the output of the dynamic page. Only the form items will be submitted and their content
    will appear in the mail. And for the enctype for plain text you can use enctype= "text/plain" for html you can use
    enctype= multipart/mixed; boundary="------------2A9240C34ACEDCCF1FCE1E33"
    Thanks,
    Sharmila

  • Redirect page with POST method in JSTL

    how to redirect page with POST method in JSTL.
    below is the code that i make, but the page redirected with GET method,
    so, the URL shown as http://localhost:8080/tes2/coba2.jsp?nama=saya
    how to hide the parameter, so it didn't show at the URL..??
    anybody help me..??
    server1 -> coba1.jsp
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <html>
    <head>
    <title>coba1</title>
    </head>
    <body>
    <c:url value="http://localhost:8080/tes2/coba2.jsp" var="displayURL">
      <c:param name="nama" value="saya"/>
    </c:url>
    <c:redirect url="${displayURL}"/>
    </body>
    </html>server2->coba2.jsp
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <html>
    <head>
    <title>coba2</title>
    </head>
    <body>
    <c:forEach items="${param}" var="currentParam">
            <li><c:out value="${currentParam.key}" />
                = <c:out value="${currentParam.value}" /></li>
          </c:forEach>
    </body>
    </html>

    There are other two way communications methods as well. One such would be:
    Server1Page1: Take response with parameters.  Use HttpURLConnection to make a request to DataInputServlet
                  on Server2 and send the parameters there with a POST operation
    Server2DataInputServer: Takes request with data in it and starts a new session.  Puts the data into the session and
                  returns the session id to the requester
    Server1Page1: Reads the response from the DataInputServer (the session id) and generates a sendRedirect to
                  Server2's display page using the session id.  Server1Page1 is now done.
    Server2Page1: Gets a request from the client with the session id, and pulls the parameters out of the session.  Then
                  can continue as normal.Server2Page1 can also do a quick refresh to itself not using the session id as well, which will keep the URL visible by the client relatively clean.

  • Older Business HTML and Dynamic Page Table question

    I am not sure if anyone will know here (or if this is the best place to post), but I have a question concerning using the Business HTML template library controls/API for use with ITS. I am attempting to use the "Dynamic Page Table" control, and have hit some problems. Does anyone have any example code they can share on getting this to work correctly (ie, paging through records, selecting from rows, etc)? I have "torn apart" the underlying Javascript and even modified my code to adjust for some formatting issues that the API's do not handle, however, my "pages" all display at once in the beginning and only hide when I use one of the paging icons (forward,back,all back, etc). THe "isVisible" parameter seems to do nothing for the "page" DIVs. Currently running the latest version of ITS and R/3 4.6b on the backend if that helps. Also, the example from the SAP Design Guild cookbook is very basic and does not "page" as I need. Thanks in advance!
    CSolomon

    Check the following Tables
    FND_FORM_CUSTOM_RULES
    FND_FORM_CUSTOM_SCOPES
    FND_FORM_CUSTOM_ACTIONS
    FND_FORM_CUSTOM_PARAMS

  • Dynamic Page truncating html form text item

    I have created a dynamic page that displays the system date on a form. When the
    page displays, the date truncates after the space or comma. ie.
    instead of displaying "Monday, December 30" it displays "Monday". If i remove
    the comma or spaces from the format, it will display ok. Is there some type of
    URL encoding I need to to.
    <FORM action="stars3.star_portal.process_student_att" method="post">
    <TABLE border="0" cellspacing=0 cellpadding=2>
    <TR BGCOLOR="#000063">
    <ORACLE>
    BEGIN
    htp.p('<TD ALIGN="CENTER"><FONT COLOR="WHITE">' );
    htp.p('<input type="text" name="T1" size="30" value=' ||
    to_char(sysdate,'Day, Month DD') || '>' || '</FONT></TD>');
    END;
    </ORACLE>
    </TR>
    </TABLE>
    </FORM>

    Hi,
    Yes, it is an encoding problem. You can make use of htp.formText to overcome this. The spaces and commas are interpreted properly with formText.
    Here is an example.
    <ORACLE>
    declare
    l_date varchar2(100);
    BEGIN
    select to_char(sysdate,'Month, Day, DD') dt
    into l_date
    from dual;
    htp.p(l_date);
    htp.p('<TD ALIGN="CENTER"><FONT COLOR="WHITE">' );
    htp.formText(cname => 'T1',
    cvalue => l_date,
    csize => 30,
    cmaxlength => 30);
    END;
    </ORACLE>
    Thanks,
    Sharmila

  • How to send an entire HTML, PHP dynamic page using phpmail()?

    How to send an entire HTML, PHP dynamic page using phpmail()
    from PHP website, similar to mail this page or send to a friend
    link?

    Hello,
    Please change the mail address
    "info[at]furkids[dot]co[dot]za" from this thread ^^^look above^^^
    to "[email protected]"
    Thank you

  • How to use Custom Search in Dynamic Page or HTML Portlet ?

    Gurus,
    1. I have a tab called My Space in the portal web site, where user gets a personalized view of the content.
    2. I am using custom attributes and custom item types. I have a custom attribute called 'Location', which is a attribute of custom item types.
    3. I have 2 pages - News and Events.
    4. All the content in News and Events page is tagged by the attribute 'Location'.
    5. The requirement is to let the user search the News and Events by Location.
    6. To achieve this I used the Custom Search portlet and the user can select the attribute Location and see the resultant News and Event items by location in the Search portlet.
    7. The requirement is to present the News items and Event items in separate regions on the page and show only the first 5 News and Event items in the result and show a More link which would guide the user to rest of the News and Event items.
    8. Eventually there may be more content other than News and Events tagged by location. If so, the requirement is to create a new region and display the new content.
    9. How would I do this using custom search ? I was thinking if there is anyway I could use the custom search api (where can i find it ?) in the HTML portlet or Dynamic page and submit the result to IFRAMES in each region and show the output ?
    Pls advise.
    Thanx a bunch.

    I would suggest that you use two custom search portlets; one for the news items and one for the events items. Switch the custom search portlets to "AutoQuery" mode and add the relevant criteria. On the results display tab of the the "edit defaults" screen, choose to show just 5 items.
    To add a link to show the user mode results, I'd create two new pages that have just a single custom search portlet on it that is customised to show more of the results and maybe has the pagination links enabled.
    Then I'd add two "Page Link" items underneath the two news and events portlets on the first page in an item region.
    I'm sure there are other ways of doing this as well. Hope that helps to get you started.

  • How to display html document returned by utl_http package (POST method)

    I am using oracle forms 10g, data base version is 10g.
    I have written a database procedure that calls utl_http package POST method and request returns an html document. How do display this html document from oracle form?
    Thank you
    Hema

    Here you have...
    A Full Web Browser Java Bean - Oracle Forms PJCs/Java Beans
    http://forms.pjc.bean.over-blog.com/article-26251949.html

  • A page with a post method form is not opening in PageViewer web part

    Hi,
    I wanted to display a page in the Page Viewer web part. So, i gave the URL of the page in the Page Viewer web part.
    The page is rendered as expected. 
    Now, the page has a link when clicked opens another page which has a form with a post method. The issue is the page with the form is not opening. I want the page to open and function as expected.
    Any suggestions?

    Hello Raghavendra_RT,
    Is that page on SharePoint, or is that on the internet?
    If the second is the case I would just use a hyperlink which opens in a new tab via target blank attribute:
    http://www.w3schools.com/tags/att_a_target.asp
    And you can place it in a content editor web part.
    Btw, with SharePoint 2013 you can use the Script Editor Web Part to embed a form from a source like Survey Monkey:
    http://community.bamboosolutions.com/blogs/sharepoint-2013/archive/2013/05/20/how-to-use-script-editor-web-part-in-sharepoint-2013.aspx
    - Dennis | Netherlands | Blog |
    Twitter

  • Want to send information in Header dynamically using HTTP adapter using post method

    Hi ,
    I have a requirement to send below information in http Adapter header dynamically using post method. which will be authenticated by third party system.
    Authorization : WSSE realm="SDP", profile="UsernameToken", type="AppKey" X-WSSE : UsernameToken Username="XXXX", PasswordDigest="Qd0QnQn0eaAHpOiuk/0QhV+Bzdc=", Nonce="eUZZZXpSczFycXJCNVhCWU1mS3ZScldOYg==", Created="2013-09-05T02:12:21Z"
    I have followed below link to create UDF
    http://scn.sap.com/thread/3241568
    As if now my third party system is not available while sending request I am getting 504 gateway error. is there any approach I can validate my request is working fine?
    Regards,

    Hi Abhay,
    Correct me if I'm wrong but I think WSSE requires a SOAP Envelope. If that is the case, there are two approaches: the first one is to use SOAP Axis and the second one is just to build SOAP Envelope via Java mapping.
    You also need to test it successfully externally, capture the request and replicate it in XI.
    Hope this helps,
    Mark

  • WebDB - Dynamic Pages SVG/HTML Encoding Help

    I have been playing around with WebDB 2.2
    to generate an SVG document from a table with X/Y locations
    in columns.
    I can generate the SVG content fine but when WebDB sends it to
    my browser (IE 5.5) it is displayed as XML rather than as an SVG document.
    Now I think that the problem is that the document does not have an SVG extension
    and WebDB is typing the document as HTML. When I check the properties of the
    document (right mouse click and select properties), Windows tells me the type of the
    document is HTML. If I File>Save the document with an SVG extension and then open it
    in IE I get my map.
    I can't see how to force WebDB to change the document type.
    Can anyone help me?
    I hope I am making sense :-)
    Simon

    Have you specified any value (greater than 0) in the Portlet expires in ... minutes field ?
    If you have, then I guess your dynamic page is getting cached.
    Before submitting the form, do a right click on the browser page and view the page source.
    What does the <form> tag look like ?
    Does it still show the old procedure name ?

Maybe you are looking for

  • Dynamic query with Data Access Layer

    I have a program that has a multiselect box (JSP form) to select certifications and then search to see which employee may have them. I have no issues when searching by only one, but if I select multiple certifications from the multiselect box, it doe

  • HP Pavilion All in one PC: Shutting down

    I will just turn my computer on an a few minutes later it will shut down on me can someone help me please 

  • MIGO posting  for asset

    Hi During creation of MIGO for asset we got error " YOU CAN NOT POST TO ASSET IN COMPANY CODE BP01 FISCAL YEAR 2011" We have copied an existing one asset.Plz tell us the solution.

  • File saving name

    Greetings I am working on a museum project. I have been asked to convert full resolution files to web based files using "Save for Web and Devices". The problem is in the file naming. Museums typically use accession #s for each work. Example   1999.63

  • MacBook Pro will not detect displays. . .

    I found this link, and it best discribes what is happening on my macbook. I have a thunderbolt to cdmi cord that I use on my TV. Then all of a sudden, it just stopped working. . . My screen flashes black for about a second like its about to connect t