How do I attach a JavaBean to a HTML Form submission

I found an example in the O'Reilly JavaServer Pages book that shows you how to pass a JavaBean from a JSP to a servlet.
<jsp:useBean id="userInfo" scope="request" class="com.ora.jsp.beans.userinfo.UserInfoBean">
<jsp:setProperty name="userInfo" property="*" />
</jsp:useBean>
<jsp:forward page="/myServlet" />
Then in the servlet, you do:
UserInfoBean userInfo = ( UserInfoBean )request.getAttribute("userInfo");
I want to do almost the exact same thing...but I don't want to forward the request. I want to pass the JavaBean along as part of an HTML form submission. Can anyone help me out with this? Thanks.

Assuming that you have setup your environment correctly and you have a web application server like Tomcat running.
Since you didn't provide the code for the bean I created my own. You can change the code any way you want.
Say UserInfoBean is :
package test17;
public class UserInfoBean {
    String firstName;
    String lastName;
    public UserInfoBean() {
    public String getFirstName() {
        return firstName;
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    public String getLastName() {
        return lastName;
    public void setLastName(String lastName) {
        this.lastName = lastName;
}And say you have a JSP page like this:
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
  <head><title></title></head>
  <body>
  <jsp:useBean id="userInfo" scope="request" class="test17.UserInfoBean">
  <jsp:setProperty name="userInfo" property="*" />
  </jsp:useBean>
  <form action="index.jsp" method="POST">
      <input type="text" name="firstName" value="${userInfo.firstName}"/>
      <br/><br/>
      <input type="text" name="firstName" value="${userInfo.lastName}"/>
      <br/><br/>
      <input type="submit" name="submit" value="submit"/>
  </form>
  </body>
</html>If you access the JSP page like this:
http://localhost:8080/p/test17/index.jsp?firstName=George&lastName=W
then it passes in the request parameter from the query string and populates the form.
Once the form is populated if you submit the form , data is transmitted to the next page , and you can access it via request.getParameter.
Is this the solution you are looking for?

Similar Messages

  • How do i attach a spreadsheet to my registration form?

    How do I attach a spreadsheet to my regiwtration form?

    As the author of the form you can't attach anything to the fillable web form. You can only add an attachment field so that the fillers can attachm a file to submit.
    If your form is an PDF form then as the author you might be able to use Acrobat to add an attachment to the fillable PDF form before distributing it but you can't add a attachment field to the PDF form (it won't work if you do) because the FormsCentral PDF form can't submit attachments.
    Hope this helps
    Gen

  • How does one attach other documents to a fillable form that was created?

    How does one attach other documents to a fillable form that was created?

    Are you asking about a web form or a PDF form? PDF forms don't support this, but for a web form you'd use File Attachment type field.

  • How can I attach any type of file in forms runtime

    Hi Friends,
    I need some help from any one of you.
    Is there any possibility to attach any type of file in forms runtime?
    If there is, how can. Please let me know the code.
    Thanks

    I think that you are going to have to explain what you want to do more clearly...

  • How can i get the value from a HTML Form

    hi,
    I am using HTML form (logfrm). there are userId field,password field, submit button,reset button, and a link.
    when i click on the link, it should fetch the value of userid.
    How it is possible?
    AE

    use jsp:
    which lets you embed java statments in your html -so you when you click on the link you can use request.getParameter("userID") to get the userid.
    Ideally with html forms use a combination of jsp and java beans, where the fields in the form are also fields in your java bean, which you can access through setters and getters.
    google for some jsp tutorials.

  • How do I attaching a confirmation page to a survey submission?

    The link below goes to my survey. I want to prompt participants to a confirmation page on submission. Where and how to I link to that confirmation page?
    http://www.diojeffcity.org/Home%20Page/Parishioner%20Survey/survey.html

    Hi
    At the end of your-
    sendresults.php
    page, you would have to redirect them to the confirmation page, using something similar to the following -
      $confirmGoTo = "confirm.php";
      header(sprintf("Location: %s", $confirmGoTo));
    PZ

  • How to add landing page s-parameter to a form submission?

    Hi,
    Really hoping somebody can help me. This is something I have seen used in many of my previouse roles and I would like to introduce it to my current position but am a bit lost. We develop our website inhouse and are currently in the process of migrating it to Dreamweaver CSS, which I am unfamiliar with.
    What I want to do is introduce a tracking code that allows me to see excatly where the original click came from on all Email submissions (conversions).
    What i would like to happen is, when a lead form from our website is submitted there is a hidden default field that comes through to us on the Email submission. That field should (if all goes to plan) pull the S parameter from the URL of the landing page. This S parameter is a code that I have generated and placed in the destination URL of all PPC ads and campaigns (as below)
    I believe I have the correct piece of script ,  I’m just not sure how to place it and what I need to amend within it .
        <form action="jspostto.htm" method="get">
            <input type="hidden" id="hiddenParameterValue" name="hiddenParameterValue" />
            <input type="submit" value="Submit" />
        </form>
        blah<br />
        <script language="javascript" type="text/javascript">
            document.getElementById("hiddenParameterValue").value = getParam("f");       
        </script>
    An example of the kind or code I am putting in is www.sapphiresystems.com/uk/sunsystems/index.htm?s=GUKAOOH02&K={keyword} in the destination URLs of PPC campaigns and Facebook links to the website as such www.sapphiresystems.com/sapb1/index.htm?s=FBSAPBOX.
    Really appreciate any help or insight you can offer,
    Many thanks
    Kiti

    Hi Both,
    Apologies, yes we are on PHP,
    This is what is really throwing me off .... i don't know what WEBBOT is? I have posted everything that was between form tags, just incase i let anything important out.
    Again really appreciate all the help and advice,
    Thanks , Kiti
    <!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script language="JavaScript" type="text/javascript"><!--
    function FrontPage_Form1_Validator(theForm)
      if (theForm.Name.value == "")
        alert("Please enter a value for the \"Name\" field.");
        theForm.Name.focus();
        return (false);
      if (theForm.Email.value == "")
        alert("Please enter a value for the \"Email\" field.");
        theForm.Email.focus();
        return (false);
      if (theForm.Heard_Sapphire.selectedIndex < 0)
        alert("Please select one of the \"Heard_Sapphire\" options.");
        theForm.Heard_Sapphire.focus();
        return (false);
      if (theForm.Heard_Sapphire.selectedIndex == 0)
        alert("The first \"Heard_Sapphire\" option is not a valid selection.  Please choose one of the other options.");
        theForm.Heard_Sapphire.focus();
        return (false);
      return (true);
    //--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="../../_derived/nortbots.htm" onsubmit="location.href='../../_derived/nortbots.htm';return false;" language="JavaScript" name="FrontPage_Form1" webbot-onsubmit="return FrontPage_Form1_Validator(this)" webbot-action="--WEBBOT-SELF--">
        <!--webbot bot="SaveResults" U-File="../_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" startspan B-Reverse-Chronology="FALSE" S-Email-Format="TEXT/PRE" S-Email-Address="[email protected]" B-Email-Label-Fields="TRUE" B-Email-Subject-From-Field="FALSE" S-Email-Subject="Sapphire Website - SunPlanning demo request" S-Builtin-Fields U-Confirmation-Url="thanks_demo.htm" --><input type="hidden" name="VTI-GROUP" value="0"><!--webbot bot="SaveResults" endspan i-checksum="43374" -->
        <table border="0" width="724" id="table6" height="681" cellspacing="0" cellpadding="0">
         <!-- MSTableType="nolayout" -->
         <tbody><tr>
          <td bgcolor="#FFFFFF" colspan="8" height="145" valign="top">
       <p style="margin-right: 25px; margin-top: 0; margin-bottom: 0; margin-left:18px; line-height:14pt">
       <b><font face="Arial" style="font-size: 14pt" color="#003366">Demo
       SunPlanning</font></b></p>
       <p style="margin-right: 25px; margin-top: 0; margin-bottom: 0; margin-left:18px; line-height:14pt"> 
       </p>
       <p style="margin-right: 25px; margin-top: 0; margin-bottom: 0; margin-left:18px; line-height:14pt">
       <font style="FONT-SIZE: 8pt" face="Arial">Please complete this short
       form and, upon receipt of your request, we’ll send you through your
       a link to your online demonstration. </font></p>
       <p style="margin-right: 25px; margin-top: 0; margin-bottom: 0; margin-left:18px; line-height:14pt"> 
       </p>
       <p style="margin-right: 25px; margin-top: 0; margin-bottom: 0; margin-left:18px; line-height:14pt">
       <font face="Arial">
       <span style="font-size: 8.0pt; font-style:italic">We respect your
       privacy. We do not share your details with anyone outside Sapphire.
       </span></font></p>
          </td>
          </tr>
         <tr>
          <td bgcolor="#FFFFFF"> </td>
          <td bgcolor="#FFFFFF" style="border-top: 1px dotted #C0C0C0"> </td>
          <td bgcolor="#FFFFFF" style="border-top: 1px dotted #C0C0C0"> </td>
          <td colspan="2" bgcolor="#FFFFFF" style="border-top: 1px dotted #C0C0C0"> </td>
          <td bgcolor="#FFFFFF" height="19" style="border-top: 1px dotted #C0C0C0"> </td>
          <td bgcolor="#FFFFFF" height="19" style="border-top: 1px dotted #C0C0C0"> </td>
          <td bgcolor="#FFFFFF" height="19" style="border-top: 1px dotted #C0C0C0"> </td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left">
          <span style="font-weight: 700">
          <font face="Arial" style="font-size: 8pt" color="#003366">
          Title</font></span><font face="Arial" style="font-size: 8pt; font-weight: 700" color="#003366">:</font></td>
          <td colspan="6" bgcolor="#FFFFFF" height="23">
           <select size="1" name="Title0" style="font-family: Arial; font-size: 8pt; background-color: #F4F4F4">
          <option>Mr</option>
          <option>Mrs</option>
          <option>Miss</option>
          <option>Ms</option>
          <option>Dr</option>
          </select></td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left">
          <p>
          <font face="Arial" style="font-size: 8pt; font-weight: 700" color="#003366">
          Name:</font></p></td>
          <td colspan="6" bgcolor="#FFFFFF" height="23">
          <font color="#003366">
           <!--webbot bot="Validation" b-value-required="TRUE" --><input type="text" name="Name" size="35" style="font-family: Arial; font-size: 8pt; background-color:#F4F4F4">  </font>
          <font color="#FF0000" face="Arial" style="font-size: 8pt; ">
          * Required Field</font></td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left">
          <p>
          <font face="Arial" style="font-size: 8pt; font-weight: 700" color="#003366">
          Title:</font></p></td>
          <td colspan="6" bgcolor="#FFFFFF" height="22">
          <font color="#003366">
           <input type="text" name="Position" size="35" style="font-family: Arial; font-size: 8pt; background-color:#F4F4F4"></font></td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left">
          <p>
          <font face="Arial" style="font-size: 8pt; font-weight: 700" color="#003366">
          Company:</font></p></td>
          <td colspan="6" bgcolor="#FFFFFF" height="22">
          <font color="#003366">
           <input type="text" name="Company" size="35" style="font-family: Arial; font-size: 8pt; background-color:#F4F4F4"></font></td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left">
          <p>
          <font face="Arial" style="font-size: 8pt; font-weight: 700" color="#003366">
          Email Address:</font></p></td>
          <td colspan="6" bgcolor="#FFFFFF" height="23">
          <font color="#003366">
           <!--webbot bot="Validation" b-value-required="TRUE" --><input type="text" name="Email" size="35" style="font-family: Arial; font-size: 8pt; background-color:#F4F4F4"> </font>
          <font color="#FF0000" face="Arial" style="font-size: 8pt; font-weight: 700"> 
          </font><font color="#FF0000" face="Arial" style="font-size: 8pt; ">
          * Required Field</font></td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left">
          <p>
          <font face="Arial" style="font-size: 8pt; font-weight: 700" color="#003366">
          Telephone:</font></p></td>
          <td colspan="6" bgcolor="#FFFFFF" height="22">
          <font color="#003366">
           <input type="text" name="Telephone" size="20" style="font-family: Arial; font-size: 8pt; background-color:#F4F4F4"></font></td>
         </tr>
         <tr>
          <td colspan="8" bgcolor="#FFFFFF" height="19"> </td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left" style="border-top: 1px dotted #C0C0C0"> 
          </td>
          <td bgcolor="#FFFFFF" style="border-top: 1px dotted #C0C0C0"> 
          </td>
          <td bgcolor="#FFFFFF" style="border-top: 1px dotted #C0C0C0"> </td>
          <td bgcolor="#FFFFFF" style="border-top: 1px dotted #C0C0C0"> 
          </td>
          <td bgcolor="#FFFFFF" height="20" style="border-top: 1px dotted #C0C0C0"> </td>
          <td bgcolor="#FFFFFF" height="20" style="border-top: 1px dotted #C0C0C0"> </td>
          <td bgcolor="#FFFFFF" height="20" style="border-top: 1px dotted #C0C0C0"> </td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left">
          <font face="Arial" style="font-size: 8pt; font-weight: 700" color="#003366">
          Address 1:</font></td>
          <td colspan="6" bgcolor="#FFFFFF" height="23">
          <font color="#003366">
           <input type="text" name="Address1" size="30" style="font-family: Arial; font-size: 8pt; background-color:#F4F4F4"></font></td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left">
          <span style="font-weight: 700">
          <font face="Arial" style="font-size: 8pt" color="#003366">
          Address 2</font></span><font face="Arial" style="font-size: 8pt; font-weight: 700" color="#003366">:</font></td>
          <td colspan="6" bgcolor="#FFFFFF" height="23">
          <font color="#003366">
           <input type="text" name="Address2" size="30" style="font-family: Arial; font-size: 8pt; background-color:#F4F4F4"> </font></td>
          </tr>
          <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left">
          <font face="Arial" style="font-size: 8pt; font-weight: 700" color="#003366">
          Town:</font></td>
          <td colspan="6" bgcolor="#FFFFFF" height="22">
          <font color="#003366">
           <input type="text" name="Town" size="22" style="font-family: Arial; font-size: 8pt; background-color:#F4F4F4"></font></td>
           </tr>
           <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
                <td bgcolor="#FFFFFF" align="left">
          <font face="Arial" style="font-size: 8pt; font-weight: 700" color="#003366">
          Post Code:</font></td>
          <td colspan="6" bgcolor="#FFFFFF" height="23">
          <font color="#003366">
           <input type="text" name="PostCode" size="10" style="font-family: Arial; font-size: 8pt; background-color:#F4F4F4"> </font>
          <font color="#FF0000" face="Arial" style="font-size: 8pt; font-weight: 700"> </font></td>
             </tr>
         <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left" style="border-bottom: 1px dotted #C0C0C0; border-top-style:none; border-top-width:medium"> 
          </td>
          <td bgcolor="#FFFFFF" style="border-bottom: 1px dotted #C0C0C0; border-top-style:none; border-top-width:medium"> 
          </td>
          <td bgcolor="#FFFFFF" style="border-bottom: 1px dotted #C0C0C0; border-top-style:none; border-top-width:medium"> </td>
          <td bgcolor="#FFFFFF" style="border-bottom: 1px dotted #C0C0C0; border-top-style:none; border-top-width:medium"> 
          </td>
          <td bgcolor="#FFFFFF" height="20" style="border-bottom: 1px dotted #C0C0C0; border-top-style:none; border-top-width:medium"> </td>
          <td bgcolor="#FFFFFF" height="20" style="border-bottom: 1px dotted #C0C0C0; border-top-style:none; border-top-width:medium"> </td>
          <td bgcolor="#FFFFFF" height="20" style="border-bottom: 1px dotted #C0C0C0; border-top-style:none; border-top-width:medium"> </td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> </td>
          <td bgcolor="#FFFFFF" align="left"> </td>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF"> </td>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" height="19"> </td>
          <td bgcolor="#FFFFFF" height="19"> </td>
          <td bgcolor="#FFFFFF" height="19"> </td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF" valign="top"> 
          </td>
          <td bgcolor="#FFFFFF" valign="top" align="left">
          <p>
          <font face="Arial" color="#003366" style="font-size: 8pt; font-weight: 700">
          Notes/Additional
          Info:</font></p></td>
          <td colspan="6" bgcolor="#FFFFFF" height="84">
          <p>
           <textarea rows="5" name="Notes" cols="40" style="font-family: Arial; font-size: 8pt; background-color:#F4F4F4"></textarea></p></td>
         </tr>
         <tr>
          <td colspan="8" bgcolor="#FFFFFF" height="19"> </td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left" style="border-left-width: 1px; border-right-width: 1px; border-top: 1px dotted #C0C0C0; border-bottom-width: 1px"> 
          </td>
          <td colspan="6" bgcolor="#FFFFFF" height="22" style="border-left-width: 1px; border-right-width: 1px; border-top: 1px dotted #C0C0C0; border-bottom-width: 1px"> 
          </td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> 
          </td>
          <td bgcolor="#FFFFFF" align="left">
          <p>
          <font color="#003366" face="Arial" style="font-size: 8pt; font-weight: 700">
          How did you find us? </font>
          </p></td>
          <td colspan="6" bgcolor="#FFFFFF" height="22">
          <font color="#003366" face="Arial" style="font-size: 8pt; font-weight: 700">
           <!--webbot bot="Validation" b-value-required="TRUE" b-disallow-first-item="TRUE" --><select size="1" name="Heard_Sapphire" style="font-family: Arial; font-size: 8pt; background-color:#F4F4F4">
          <option>Please Select...</option>
          <option>Advertising</option>
          <option>Direct Mail</option>
          <option>Email Promotion</option>
          <option>Other</option>
          <option>Press Article</option>
          <option>Recommendation</option>
          <option>Web Search - Google</option>
          <option>Web Search - Bing</option>
          <option>Web Search - Other</option>
          <option>Web Search - Yahoo!</option>
          </select> </font>
          <font color="#FF0000" face="Arial" style="font-size: 8pt; ">
           * Required Field</font></td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> </td>
          <td bgcolor="#FFFFFF" align="left"> </td>
          <td bgcolor="#FFFFFF"> </td>
          <td colspan="2" bgcolor="#FFFFFF"> </td>
          <td bgcolor="#FFFFFF" height="19"> </td>
          <td bgcolor="#FFFFFF" height="19"> </td>
          <td bgcolor="#FFFFFF" height="19"> </td>
         </tr>
         <tr>
          <td bgcolor="#FFFFFF"> </td>
          <td bgcolor="#FFFFFF" align="left"> </td>
          <td bgcolor="#FFFFFF" colspan="6">
          <input type="submit" value="Submit Enquiry" name="Enquiry" style="float: left; font-size:8pt; font-family:Arial; color:#FFFFFF; font-weight:bold; background-color:#FF6600"></td>
         </tr>
         <tr>
          <td width="17"> </td>
          <td width="158" align="left"></td>
          <td width="136"></td>
          <td width="34"></td>
          <td width="137"></td>
          <td height="1" width="40"></td>
          <td height="1" width="174"></td>
          <td height="1" width="30"></td>
         </tr>
         </tbody></table>
       </form>

  • How to get the upload file from a html form ?

    I have a <input type=file ...> control in my form, and the user use that
              control to submit a file
              to my web server. The porblem is the getParameter() function of
              HttpServletRequest only return the
              filename. Does anyone know how to get the file body ?
              Frances
              

    http://www.servlets.com/jsp/examples/ch04/index.html#ex04_17
              Frances Fan <[email protected]> wrote:
              > I have a <input type=file ...> control in my form, and the user use that
              > control to submit a file
              > to my web server. The porblem is the getParameter() function of
              > HttpServletRequest only return the
              > filename. Does anyone know how to get the file body ?
              > Frances
              Dimitri
              

  • How to simply add custom property to a HTML Form Web Part?

    Hello.
    Is it possible to add a custom property (like a date-field) to a HTML Form Web Part with help of JavaScript? I do not want to use Visual Studio / Nappa etc. Is this possible in an easy way?
    Thanks for your help.

    Hi,
    Based on your description, my understanding is that you want to count the date between today and the latest event date.
    You can create a calendar in a page firstly, then add a content editor web part rather than the html form web part, as html form web part can't place the Jquery element.
    Then you can firstly read the date field value of the calendar list using JavaScript Client Object Model and then calculate the difference between two date values using Jquery. You can add the code directly in the content editor web part.
    Here are some detailed code demos for your reference:
    Get SharePoint calendar list field value using JavaScript Client Object Model:
    <script src="http://code.jquery.com/jquery-1.9.1.js"></script>
    <script>
    $(document).ready(function(){
    SP.SOD.executeFunc("sp.js", "SP.ClientContext", retrieveListItemsCal);
    function retrieveListItemsCal() {
    var clientContextCal = new SP.ClientContext.get_current();
    var oListCal = clientContextCal.get_web().get_lists().getByTitle('Calendar');
    var camlQueryCal = new SP.CamlQuery.createAllItemsQuery();
    AllItemsCal = oListCal.getItems(camlQueryCal);
    clientContextCal.load(AllItemsCal);
    clientContextCal.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceededCal), Function.createDelegate(this, this.onQueryFailedCal));
    function onQuerySucceededCal(sender, args) {
    var listItemInfo = '';
    var listItemEnumeratorCal = AllItemsCal.getEnumerator();
    var htmlCal = '';
    while(listItemEnumeratorCal.moveNext()) {
    var oListItemCal = listItemEnumeratorCal.get_current();
    htmlcal= oListItemCal.get_item("Start Time").format("MMMM d, yyyy"));
    break;
    function onQueryFailedCal(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    </script>
    Calculate the difference between two dates:
    http://stackoverflow.com/questions/2609513/jquery-calculate-day-difference-in-2-date-textboxes
    Thanks
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected].
    Jerry Guo
    TechNet Community Support

  • In mail, how do I attach pictures or documents as icons that open full size

    in mail, how do I attach pictures or documents as icons that will open full size?

    Try Option + click the picture and choose Show as Icon

  • How can user attach file to interactive form, and be read by abap program?

    Hello,
    I created an abap interactive form, sent to the user, then user fills out the form fields, then it is uploaded back to sap, then my program reads this data and process it.
    It works.
    Now I want users to be able to attach any file they want, and the abap program to extract this file out of the PDF, to put it into SAP (or anywhere).
    I succeeded in attaching a file, I can "see" it via function module get_annotations, but I get the file in compressed form by Adobe (filter="FlateDecode").
    Do you know how to unzip the file, or is there another way to attach files in adobe reader/extract them via abap?
    I use acrobat reader 8.1.2
    Thx a lot!
    sandra
    Below is the xml obtained by GET_ANNOTATIONS. We see that there are other text annotations, and that the attached file has {length="98005"}, though real file (before "attach file" to the PDF, and also after "detach file") has length 111 995 bytes. It's why I deduced that there is a compression (I also tried to extract it as-is and open it with adobe but it doesn't work.
    <?xml version="1.0" encoding="UTF-8"?>
    <xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
      <annots>
        <highlight rect="212.347,624.257996,252.979004,636.539978" creationdate="D:20080604100938+02'00'"
    name="2114308b-275d-4eca-8bfc-c8288ef4a77c" color="#FFFF00" flags="print"
    date="D:20080604100938+02'00'" title="mtresori" subject="Texte surligne "
    coords="215.432999,636.179016,249.893005,636.179016,215.432999,624.619019,249.893005,624.619019"
    page="0">
          <popup rect="595.276001,516.179016,775.276001,636.179016" flags="print,nozoom,norotate"
    open="no" page="0"/>
        </highlight>
        <fileattachment rect="15.345001,802.841003,29.345001,822.841003"
    creationdate="D:20080604101011+02'00'" name="f6e12648-c9b0-4cd1-b08b-82876c8300d7"
    color="#4055FF" flags="print,nozoom,norotate" date="D:20080604101019+02'00'" title="mtresori"
    subject="Piece jointe" file="SAP_WIDGETS2.pdf" mimetype="application/pdf"
    creation="D:20080603112937+02'00'" modification="D:20080603112937+02'00'" size="111995"
    checksum="9F846412B510089F7C6DBCC6527C6339" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>SAP_WIDGETS2.pdf</p>
            </body>
          </contents-richtext>
          <data MODE="raw" encoding="hex" length="98005" filter="FlateDecode">
    4889CC570B5414D719F651A38EC468D5C6A2980104E528BBF3B8F3B2626405242920020A0AA4AEBB
    C3B2BAECEAEEA2A018030A628C8FFA4A0F568F58426A1EF5118FB5266A8D9AA2B16A55044541C5
    A62656EBA315935AE8BDB3BBEC2C0BD9D5B39EB3671966FEFBFCE6BF
    ETC. (all hexa code is the attached file, but with compression by adobe)
          </data>
        </fileattachment>
        <text rect="96.187408,680.099976,116.186996,698.099976" creationdate="D:20080613144537+02'00'"
    name="73360fcf-f5e5-4d5b-9315-fe4c42924300" color="#FFFF00" flags="print,nozoom,norotate"
    date="D:20080613144617+02'00'" icon="Comment" title="srossi" subject="Note" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p dir="ltr">
                <span dir="ltr" style="font-size:10.0pt;text-align:left;color:#000000;
    font-weight:normal;font-style:normal">
    ffffffffffffffffffffff
                </span>
              </p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,578.099976,775.276001,698.099976" flags="print,nozoom,norotate"
    open="yes" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144627+02'00'" state="Marked"
    name="d524b7d5-1a85-4b62-80b3-5875dd152c51"
    color="#FFFF00" flags="hidden,print,nozoom,norotate" date="D:20080613144627+02'00'"
    icon="Comment" title="srossi" subject="Note"
    inreplyto="73360fcf-f5e5-4d5b-9315-fe4c42924300" statemodel="Marked" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Marked definie par srossi</p>
            </body>
          </contents-richtext>
          <popuprect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144633+02'00'" state="Accepted"
    name="88af2cb6-7516-4f21-81e6-97edc7a85184"
    color="#FFFF00" flags="hidden,print,nozoom,norotate" date="D:20080613144633+02'00'" icon="Comment"
    title="srossi" subject="Note" inreplyto="d524b7d5-1a85-4b62-80b3-5875dd152c51" statemodel="Review"
    page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Accepted definie par srossi</p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144642+02'00'" state="Marked"
    name="a8c6b485-c3f9-44e2-ad53-c61b2766d9d5" color="#FFFF00" flags="hidden,print,nozoom,norotate"
    date="D:20080613144642+02'00'" icon="Comment" title="srossi" subject="Note"
    inreplyto="f6e12648-c9b0-4cd1-b08b-82876c8300d7" statemodel="Marked" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Marked definie par srossi</p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144647+02'00'" state="Accepted"
    name="0136b689-575c-46b8-a21a-86e3c8d73904" color="#FFFF00" flags="hidden,print,nozoom,norotate"
    date="D:20080613144647+02'00'" icon="Comment" title="srossi" subject="Note"
    inreplyto="a8c6b485-c3f9-44e2-ad53-c61b2766d9d5" statemodel="Review" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Accepted definie par srossi</p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
        <text rect="100,82,120,100" creationdate="D:20080613144657+02'00'" state="Accepted"
    name="a21fc3c5-cf6a-4c6f-bc1f-328a91050b4e" color="#FFFF00" flags="hidden,print,nozoom,norotate"
    date="D:20080613144657+02'00'" icon="Comment" title="srossi" subject="Note"
    inreplyto="2114308b-275d-4eca-8bfc-c8288ef4a77c" statemodel="Review" page="0">
          <contents-richtext>
            <body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"
    xfa:APIVersion="Acrobat:8.0.0" xfa:spec="2.0.2">
              <p>Accepted definie par srossi</p>
            </body>
          </contents-richtext>
          <popup rect="595.276001,-20,775.276001,100" flags="print,nozoom,norotate" open="no" page="0"/>
        </text>
      </annots>
      <f href="acTempF-00000028453-00000000089"/>
      <ids original="03473EFED11DB2110A00000000000000" modified="959796E85292D54DB7FA558CAAD4A346"/>
    </xfdf>

    Hello everybody,
    I am sure you have an answer to my question above. It was :
    how is it possible for a user to ATTACH files to a PDF interactive form, and then be able to READ them via a program ? (I guess the solution to read them via ABAP or JAVA is quite the same?)
    Thx a lot !
    sandra

  • TS3899 Hi. How do I attach more than one document to an email on the iPad, especially if they come from different apps? When writing an email on the iPad there's no option for attachments.

    Hi. How do I attach more than one document to an email originating from my iPad, especially if the documents come from different apps? When starting an email there's no option for attachments, unless you send the document from inside an app like iBook and then you can only send one at a time.

    How to add, send and open iPad email attachments
    http://www.iskysoft.com/apple-ipad/ipad-email-attachments.html
     Cheers, Tom

  • How do I attach more than one photo to an email?

    How can I attach more than one photo to an email?

    Yes. With the mail you want to attch the photos to open, tap and hold in the body of the email. One of the Menu ittems will be Insert Photo or Video. Tap that, Select the photo, Tap Use. Repeat for each photo.

  • How do I attach a form to my Wix website....I tried and everything works EXCEPT payment options.

    How do I attach a form to my Wix website.  I was able to attach a form (through link a document) but the payment options do not work.  Payment options work when I use the preview on the Adobe site.

    Hi,
    Please see this link on how to embed a form into a webpage:
    http://forums.adobe.com/docs/DOC-1991
    Please see this link on how to setup the form for payment collection:
    http://forums.adobe.com/docs/DOC-1632
    Hope this helps, if you still have questions, please write back.
    Thanks,
    Lucia

  • How can I attach j-pegs and other documents to an email unopened and stop each them taking up a whole page of my email ?

    How can I attach j-pegs and other documents to an email unopened and stop each them taking up a whole page of my email ?

    In addition to the last poster's suggestion  -  just so you know, it also depends on the email program the recipient uses as to how they will see any attachments - for instance, when I am using my Yahoo Mail, I am absolutely unable to view any attachment within the browser window - Yahoo forces me to download it; there is no way for me to check it (like a preview) to see if I want to download it or not.
    And, FWIW: the window shown in the screenshot does not show on my version of Mail 5.1 (which is the latest for 10.7.2); the only one similar shows when viewing a message received with an attachment, not while sending one. So that must be a different version.

Maybe you are looking for

  • Calling Parameterized Method from one class to another class

    Hi, below is my sample code test.java public class test      int op1[][]=new int[][]{{1,2},{2,3},{4,5}};      int row=0;     public void  test() {           int op2[][]=new int[][]{{2,3},{4,5},{6,7}};                          row=1010;           getR

  • Installer wrong path

    error 1324

  • UDF for repeated node

    Hi, My requirement is how to map data in below situation. I have one node which occur repeatedly. Source: Node A   comment Node A   comment Node A   comment Target: comment comment comment How can I achive this using UDF.

  • I can't install Microsoft SQL

    Hi, I can't install Microsoft SQL server 2008 or 2008R2 Could you please help me? Thank you.

  • Error launching Edge Animate 1.0

    Hello, I have installed Edge Animate 1.0. The program is correctly installed, but when it is launched, a message box appears with the following message: "EdgeAnimate.exe - Entry point is not found. Procedure entry point InitializeConditionVariable is