Accessing Request Parameters from ActionRequest with form/multipart

Hi,
I have a weblogic producer portlet which has form enctype="multipart/form-data". Now although I have correctly set the action according to JSR 168 standards like:
<form name="Checkin" method="POST" enctype="multipart/form-data"
action='<abcportlet:createURI><abcportlet:URIAction value="active.document.doUpdate"/></abcportlet:createURI>'>
but in my processAction method, I am not able to retrive the action parameter. Infact actionRequest's getParameter returned null.
On further investigation, I found that this is occurring due to enctype and some solutions suggested to use commons file upload. I have used the commons upload and retrieve the parameters but am not able to retrieve the action parameters that is embedded in wsrp-interactionState.
Is there any way of how I can get hold of the portlet action parameter?
Thanks,
Ansuman
Edited by: anshuman.roy on Dec 11, 2008 10:18 AM

Hello Ansuman,
Unfortunately, you have found a bug in WLP's implementation of the JSR168 form decoding- there is no way for you to get the form parameters and the action parameters at the same time. We already have a fix for the next version of WLP- if you open a support case to get a patch issued, please refer to CL (not CR) 1169718. If you would like for me to open a change request for you, which might speed up the support process, please let me know what version of WLP you are using.
Kevin

Similar Messages

  • Passing parameters from REPORTS to FORMS.

    Hi,
    Could anyone help my on this, I'm trying to pass parameters from reports to forms is it possible? could anyone give me an idea how do I have to proceed.
    thank youk,
    bino

    http://technet.oracle.com:89/ubb/Forum4/HTML/009647.html

  • WHY? Request Parameters From Form are NULL

    I have the following process, which by the way has been working successfully for months, until just recently.
    1) User comes to JSP page to upload images through a form that has the <input type="file"> fields as well as <input type="hidden"> to hold a few essential values.
    2) User submits form, form action attribute set to go to a Servlet
    3) Servlet reads all request params and inserts the images into a database.
    I have code to read in the images...I use classes from the org.apache.commons package.
    I could only assume it was the servlet that was the problem, but doubted that because why would it work all these months than suddenly stop.
    I set up a test html page with a form and had it go to a jsp page to read the request params and print them out. To my suprise they all had NULL values.
    Which tells me that the params aren't being read from the form.
    How could this be??
    Here is some example code snippets from my test pages:
    HTML PAGE
    <html><body>
    <form name="images" action="testing_operations.jsp" enctype="multipart/form-data" method="post">
    <input type="hidden" name="Customer_Number" value="4750">
    <table>
    <tr><td>
    <input type="file" name="image1" />
    </td></tr>
    <tr><td>
    <input type="file" name="image2" />
    </td></tr>
    <tr><td>
    <input type="submit" value="submit">
    </td></tr>
    </table>
    </form>
    </body>
    </html>JSP PAGE
    String cus = request.getParameter("Customer_Number");
    out.println("cus : " + cus +"<br>");
    String image = request.getParameter("image1");
    out.println("image: " + image); 
    I'm stumped...what am I doing wrong?
    I can't continue until I get this figured out, can anybody help me with this?
    Message was edited by:
    Love2Java

    I ran my original app with the enctype and without it:
    the tomcat dos-prompt that shows exceptions lists out this below...
    org.apache.commons.fileupload.FileUploadException: Processing of multipart/form-data request failed.
    C:\jakarta-tomcat\temp\upload_00000009.tmp (The system cannot find the path specified)
    at org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:429)
    at org.apache.jsp.testing_operations_jsp._jspService(testing_operations_jsp.java:113)The code on line 113 in testing_operations.jsp is:
    List items = upload.parseRequest(request);
    and what is this .tmp file its trying to find?? I'm passing it an image off my local disk, not a .tmp file, there isn't even a temp folder in my jakarta-tomcat main folder....
    It is failing on this line because it isn't reading the request parameters sent in, thus why too when I test for the values of the params they return null.
    True, when I take out the enctype my test page will show the values, but this doesn't help me. I need that enctype attribute in there to process the images sent in through the fields.
    So where does this leave me??
    I went to the apache site for the commons upload and they have a more current version than what I'm using which is version 1.0, they have 1.1.1
    I downloaded the new version but had no success in using it, the compiler couldn't find a class I attempted to use.
    I still don't understand how this could be working and then suddenly stop.

  • Problem with accessing init parameters from JSP file

    Hi,
    I have my init parameters and Jsp configured in web.xml
    <servlet>
              <servlet-name>TestJsp</servlet-name>
              <jsp-file>/Test.jsp</jsp-file>
              <init-param>
                   <param-name>username</param-name>
                   <param-value>Balboa</param-value>
              </init-param>
    </servlet> How do I access 'username' field from JSP file.
    Kindly help.
    Thanks.

    you can do this in the jsp
    <%=config.getInitParameter("username")%>or do it in the jspInit method in the jsp:
    <%!  String userName = null; 
      public void jspInit() {   
        ServletConfig config = getServletConfig();   
        userName   = config.getInitParameter("userName ");  
    %>
    Hello <%=userName%>

  • How to delete i.e. clear the pending access requests list from Access request page in SharePoint 2013

    Hi Team,
    I am site collection admin of a SP13 site. The issue is we have added some of the users manually after we got requests from them for site access. But this has left those users as pending on Access requests page. We don't want that list to stack up.
    I can not decline those requests as those users will be notified with declined mail. I searched for clearing the list of those pending requests but did't find any guidelines for this. 
    Is there any way I can do this. Any help is appreciated thanks in advance  

    You might consider using PowerShell to remove unwanted items from the "Access Requests" list of the web site.  This list holds all of the access requests including pending, declined and approved.  The following example demonstrates removing
    the first item from the list.  Please note, I'm not aware whether or not there are any negative side effects to removing items from this list so doing so would be at your own risk.
    $web = get-spweb https://yoursharepointsite
    $list = $web.lists["Access Requests"]
    $list.items[0].delete()

  • PL/SQL - Masking Parameters on URL with Form Post vs Get

    I am inquiring about the PL/SQL functionality of passing focus from one procedure/function to another
    via HTML web pages, using FORM ACTION="post" against "get".
    I've successfully written a good bit of code using the "get" functionality, where the parameters are passed
    on the URL, but security really wasn't an issue on that phase of the application. Now that it is, I'm researching
    further on how to use the ACTION="post" to mask the parameters from the URL and not receive failures in the process.
    I've seen multiple references in books showing the simple process of calling the procedure/function
    which does not explicitly require parameters, and using the ACTION="post", but when doing so, it returns
    the typical PL/SQL message that the page can not be found.
    We are running 9i, but not running 9iAS. Is it necessary to have 9iAS in order to reap these benefits,
    or is it not as simple as it's seems and I should just use Java Servlets/JSPs instead?
    Any information, or direction, would be appreciated.
    Thanks in advance.

    Encrypt the value of parameter and decrypt it back in processRequest of target page ??
    -Idris

  • Extracting parameters from URL for forms 6i

    Is there a way to get the portal logged in user
    in a 9ias forms 6i web form. Also if I pass user-defined
    parameters through a link to forms 6i is there a way
    I can extract these parameters from the URL and get
    forms 6i to read them?
    Any ideas will be greatly appreciated.
    Thanks,
    Suzanne

    Hi Suzanne,
    all that you need to do is parse the url string
    It is made up of:
    ?[Parameter Name]=[Parameter]
    &[Parameter Name]=[Parameter]
    &[Parameter Name]=[Parameter]
    &[Parameter Name]=[Parameter]
    I have some code that converts a url string into a form and then submits the form.
    you could use this as a base to work from.
    Regards Michael
    CREATE OR REPLACE PROCEDURE FORWARD_TO_URL_P (P_URL IN VARCHAR2) IS
         vParameter VARCHAR2(4000);
         vValue VARCHAR2(4000);
         vProcedure VARCHAR2(1000);
         vString VARCHAR2(4000);
         vLength NUMBER(10);
         vQ VARCHAR2(4) := '?';
         vE VARCHAR2(4) := '=';
         vA VARCHAR2(4) := '&';
    BEGIN
         htp.p('<HTML><HEAD><TITLE>ASP 3</TITLE>');
         htp.p('<META HTTP-EQUIV="PRAGMA" CONTENT="No-Cache"></HEAD><BODY bgcolor="#f1f1f1">');
         vString := p_url;
         IF INSTR(vString, vQ) > 0 THEN
              vProcedure := SUBSTR(vString, 1, INSTR(vString, vQ) - 1);
              vString := SUBSTR(vString, INSTR(vString, vQ) + vLength);
         ELSE
              vProcedure := vString;
         END IF;
         vQ := vA;
         htp.p('<FORM METHOD=POST action="' || vProcedure || '">');
         WHILE NVL(INSTR(vString, vE), 0) > 0 LOOP
              vParameter := SUBSTR(vString, 1, INSTR(vString, vE) - 1);
              vString := SUBSTR(vString, INSTR(vString, vE));
              IF INSTR(vString, vE) = INSTR(vString, vE, -1, 1) THEN
                   vValue := SUBSTR(vString,vLength+1);
                   vString := '';
              ELSE
                   vString := SUBSTR(vString,vLength+1);
                   vValue := SUBSTR(vString, 1, INSTR(vString, vQ) - 1);
                   vString := SUBSTR(vString, INSTR(vString, vQ) + vLength);
              END IF;
              htp.p('<INPUT TYPE=hidden name="' || vParameter || '" Value="' || vValue || '">');
         END LOOP;
         htp.p('</FORM>');
         htp.p('<SCRIPT>');
         htp.p('document.forms[0].submit();');
         htp.p('</SCRIPT>');
         htp.p('</BODY></HTML>');
    END;

  • Extracting Request Parameters from a POST.

    A client is POSTING some request parameters as part of its POST request.
    My servlet is getting this as part of the getInputStream.
    The contents of the inputStream received is:
    username=someUserName&password=somePassword
    Now how do I extract this username and password which is in the Body
    of the POST?
    I am trying request.getParameter("username")
    but am not getting the value of the username.
    Can some please help me as to how to get the request parameters?
    Attached is my servlet
    public class DeviceLocation extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html";
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    doPost(request,response);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    System.out.println("Servlet up and running...");
    InputStream requestInputStream = request.getInputStream();
    InputStreamReader isr = new InputStreamReader(requestInputStream);
    BufferedReader br = new BufferedReader(isr);
    String line = "";
    StringBuffer sb= new StringBuffer();
    while ((line = br.readLine()) != null)
    sb.append(line);
    br.close();
    System.out.println(sb.toString()); // display the input Stream
    // Display all the Request Parameters
    System.out.println("Request Method : " + request.getMethod());
    System.out.println("Host : " + request.getHeader("Host"));
    System.out.println("User Agent : " + request.getHeader("User-Agent"));
    } // End of servlet class.

    try doing it without reading in the requestInputStream first:
    public class DeviceLocation extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html";
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    doPost(request,response);
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    System.out.println("Servlet up and running...");
    // Display all the Request Parameters
    System.out.println("username Parameter : " + request.getParameter("username"));
    System.out.println("Request Method : " + request.getMethod());
    System.out.println("Host : " + request.getHeader("Host"));
    System.out.println("User Agent : " + request.getHeader("User-Agent"));
    } // End of servlet class.

  • Link Parameters from Report to Form in Insert Mode

    It seems like it should be possible to use the Report wizard to add a link to a form, select some link parameters using the Edit Link function, and then when one clicks on the link it would open the form in insert mode with the link parameters filled in as defaults. Instead what happens is it tries to open the form in update mode with a row that matches the link parameters, and if it can't find a match it opens in insert mode with no parameters filled in. I want it to always open in insert mode and with the passed parameters filled in.
    I've looked through all the documentation I have access to and have been through all the Portal FAQ's on OTN and can find nothing on this. There were a few questions in the FAQ's that told how to do it in PL/SQL, but I don't know how to get access to which instance of the link was selected by the user through PL/SQL, and it seems like there should be a way to do this from within the report wizard.
    Any help you can give me would be greatly appreciated.
    Best Regards,
    Jim Bladen

    If your report is created using ‘Reports From SQL Query’ then you can modify it using the following to achieve this:
    1. Remove the link from ‘Column Formatting’ section of the report object.
    2. In the SQL of the report , use custom link to the column where you want to provide link using the syntax
    select a.empno,’‘||a.ename||’‘ ename_link,a.deptno
    from scott.emp a
    Order by a.empno
    and the form will always open in ‘INSERT’ mode with passed values filled in.
    Thanks
    Krishnamurthy

  • Passing Parameters from JSP with Drill Down Graphs

    Hello,
    I have 2 JSP's where when user clicks on the bar graph it drill down and goes to next JSP, it is hyperlink. How can I pass parameters using HttpPortletRendererUtil.portletParameter
    My JSP code is something like this which is pasted below.
    StandardCategoryURLGenerator("xy_chart.jsp","series","section")) is the function, I need to use for drill down.
    Kindly help me with this and any help is highly appreciable.
    Thanks
    ************ JSP**************
    CategoryAxis categoryAxis = new CategoryAxis("Site");
    ValueAxis valueAxis = new NumberAxis("Value");
    StackedBarRenderer3D rend = new StackedBarRenderer3D();
    StandardCategoryToolTipGenerator tt = new StandardCategoryToolTipGenerator();
    rend.setItemURLGenerator(new StandardCategoryURLGenerator("xy_chart.jsp","series","section"));

    Trenton,
    One way to pass parameters to other portlets on the page while using a form is to create a hidden form field and assign it the value that you need to pass to it. If the hidden field has an unqualified name (i.e. not created by using the portletParameter method) then it will be seen by all portlets on the page.
    Since all the form fields are passed on to the query string as part of the URL, you can then use request.getParameter(paramName) to take different actions in your portlets.
    You could use different techniques where based on the values you pass on to parameters of the portlets, some portlets make specific updates to themselves. Though the whole page would be refreshed, you could allow portlets to decide based on the incoming parameter value whether they need to change or not.
    So given the functionality you desire - here's something you might try.
    1) Create hidden form field that gets populated when you select values from the drop-down lookup.
    One way to do this would be to add a onChange ="populateMyHiddenParam(this.form)" to your form item that changes.
    And you could add a small JavaScript function that populates the parameter.
    e.g.
    function populateMyHiddenParam(thisForm){
    thisForm.myHiddenParam.value=thisForm.elements[4].value;
    2)In the other JSP portlet (on the same page) where you need to populate a table based on the value selected, just get the parameter value passed by using request.getParameter("myHiddenParam").
    Since you want this parameter to be read by other portlets, you need to create it as an unqualified parameter. So dont call the HTTPPortletRendererUtil.portletParameter while assigning the name to the form component for the hidden field.
    Hope this helps.

  • Passing parameters from report to form

    Hello,
    I have a report based on a View with all the details of only one record. I whant to link this report with a form in insert mode, passing some of the fields as parameters.
    Anyone konws how to do it?

    Jan,
    Thanks for the succinct reply! I've been trying to 2 days to solve this problem. Whew!
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jan Willem Vermeer ([email protected]):
    Unfortunately linking reports and forms in insert mode is not completely tackled in the faq.
    For a long time Oracle Customer Support and I were not able to get the form in insert-mode. My forms kept on appearing in query-mode, so when I passed values from the report to the form, the form queried records based on the parameters passed through from the report. While I wanted these parameters filled in as default values.
    The solution is almost too easy to imagine. When you define the link-parameters in the report definition, you should leave the EQUAL-sign blank. On metalink you can read TAR 1258704.996 and bug 1696340 for more info.<HR></BLOCKQUOTE>
    null

  • Accessing ext3 partitions from Windows with FS Driver

    Hi everyone,
    I have a slight probem. I'm dual-booting ArchLinux and Windows. Here is my partition scheme:
    /dev/sda1 (NTFS) Lenovo Recovery partition
    /dev/sda2 (NTFS) Windows
    /dev/sda3 (ext2) /boot
    /dev/sda5 (JFS) /
    /dev/sda6 (JFS) /home
    /dev/sda7 (ext3) [documents] partition mounted on /media/data
    /dev/sda8 (swap) swap
    Everything works fine on the Linux side (of course).
    The problem is that I use http://www.fs-driver.org/ to access my documents (/dev/sda7) from Windows.
    This worked fine (I was using Kubuntu) but now I had to format the disk in order to install ArchLinux and FS Driver would not recognize the "documents" partition.
    I think it might be because the partition is not PRIMARY but LOGICAL. Is there a way to fix this without reformatting everything (just formatting /dev/sda7 is fine with me) ?
    Thank you in advance
    Last edited by yms (2009-09-11 14:08:17)

    Hi, I just stumbled across this one and thought I'd throw in my two cents....
    Something I've found about windows is that it's -very- picky about partition sizes.
    For  instance, on a new system of mine, I did dual booting windows/Linux from partitions on the same hard drive.
    The windows partition was first.  After creating my Linux partitions, windows would no longer boot, said the partition table was corrupt.
    (All partitions were primary)
    The solution?  I created my Linux partitions using windows tools (which wasted around 10Gigs of hard drive space) and finished them off with linux tools.
    Everything worked fine then.
    Bottom line, Linux can use partition sizes that (some?) windows will refuse to use.
    You should be able to simply remove the last 2 partitions (sda7 and sda8).  Any partitioner should work (gparted, cfdisk, windows logical disk manager).  Don't forget to move your documents.  If you do this from your installed Linux system, don't forget to disable your swap space or you won't be able to remove that partition.
    ...might also need to unmount /dev/sda7 to use cfdisk... I think gparted does this automatically but don't quote me on that one...
    Then you can recreate the last two partitions using windows.  Then use Linux to set their types, format them, and restore your documents.
    Just to simplify things with the swap space, it's probably easier to use a live distro than your installed Linux.
    If your fstab uses UUID's, don't forget to update as formatting will assign new UUID's to the partitions.
    ... should solve at least half the problem.
    laters,
    b

  • Passing parameters from URL to Forms 9i

    Hi,
    Can anyone tell me how I can pass a user-defined parameter into an Oracle 9i form running within a browser? I have tried passing it in the URL, by itself and as 'otherparms' parameter (otherparms=parm1=xxxx), but it does not seem to work. The documentation has no mention on how to do this (at least that I have seen). I'm sure there is a simple, obvious way to do this that I have completely missed!

    Anthony,
    it work the way you say it. The problem may be because you are running Oracle9iAS on Windows2000. There is a bug in accepting parameters passed in the request URL, requiring you to apply patch 1 (see metalink for patch 2705870).
    If you are on iDS then this should work. So let me knwo if this problem occurs on iDS or iAS
    Frank

  • Passing parameters from HTML to forms 9i

    I am currently trying to design an application which is called from the web but the application is on forms 9i.
    Once the URL is called the user id needs to be entered and then this needs to be passed on to the main form . As I understand it this user id needs to be passed form HTML into the first form on 9i.
    Can anyone help me with the way this can be done
    Thanks in anticipation
    Surojeet

    Thanks for all your replies but I still am not sure. Let me expain my problem in a little detail. I have an apps server which connects to the database using an user id and password. This is what is defined in the formsweb.config.
    However the users are given non database userids which are authenticated before they connect to the main form. I need to pass this user id to the main form as i use this user id to write into audit columns , the user id password entered in formsweb.config is fine but the one i am looking for is something that I authenticate with before calling the main form which is not the database userid.
    All in all when i enter a user id and password on a webpage and click a button when the url to call the mai n form start working as it has the label associated with the .fmx and defined in the formsweb.config and calls the main form so I need to pass that user id to the main form????
    Does this give a better idea of my problem???
    Many thanks in anticipation
    Surojeet

  • Passing parameters from report to form portlet

    I am trying to link data in a report to a form. Here's the gist: I click on a record in the report and the data is passed to a form in update mode. The problem is that when I click on the record the data is not passed right away to the form. Only after clicking the record again or refreshing the page does the data get passed. Any ideas? I'm sure it's something very simple that I'm missing. Here's the code below:
    report code:
    select 'http://jvic9/pls/portal30/portal30.empcust.set_context_refresh?p_context=EMPNO&p_context_value='||empno||'&p_page=reportform">'||empno||'' empno_link, empno, ename, job, mgr, hiredate, sal, comm, deptno
    from scott.emp
    set_context_refresh procedure:
    procedure set_context_refresh
    p_context in varchar2,
    p_context_value in varchar2,
    p_page in varchar2)
    is
    v_Session portal30.wwsto_api_session;
    begin
    v_Session := portal30.wwsto_api_session.load_session('CONTEXT','SESS_EMP');
    v_Session.set_attribute(p_context, p_context_value);
    v_Session.save_session;
    owa_util.redirect_url('http://jvic9/pls/portal30/url/page/'||p_page); end set_context_refresh;
    form code:
    /* ... before displaying the page section */
    portal30.empcust.autoquery_emp_form(p_session);
    autoquery_emp_form procedure:
    procedure autoquery_emp_form
    p_session in out portal30.wwa_api_module_session
    is
    v_RowID varchar2(100);
    v_Session portal30.wwsto_api_session;
    v_empno varchar2(40);
    begin
    v_Session := portal30.wwsto_api_session.load_session('CONTEXT','SESS_EMP');
    v_empno := v_Session.get_attribute_as_varchar2('EMPNO');
    begin
    select rowidtochar(rowid) into v_rowid
    from scott.emp
    where empno = v_empno;
    end;
    p_session.set_value(p_block_name=>'DEFAULT',p_attribute_name=>'_CALLED_FROM_LINK',p_value=>'ROWID');
    p_session.set_value(p_block_name=>'DEFAULT',p_attribute_name=>'_ROWID',p_value=>v_rowid);
    portal30.wwa_api_module_event.do_event('DEFAULT','QUERY_BOTTOM',1,'ON_CLICK',True,'',p_session);
    p_session.save_session;
    end autoquery_emp_form;

    Your code seems to be OK.
    The problem of the data not appearing when you do the query manually (i.e through an API call), is a bug and has been fixed in patch 3.0.9.8.3.

Maybe you are looking for