How to use a pdf file just like a jsp file?

Hi! My question is quite simple, I was wondering if it is possible to use PDF files as if they were html forms and post the data to a servlet with PDFBox? I read the spec and it seems that PDFBox is meant to treat local pdf files, am I right?
I guess what I will have to do is save the pdf file once the user has finished entering data in it with a unique file name, and then treat the local pdf file with PDFBox... Is that the way to go or is there an other way to use pdf forms just like an html forms and then treat the data in a servlet?
Thanks!

Cross-post
http://forum.java.sun.com/thread.jspa?threadID=617229

Similar Messages

  • Is it possible to use a PDF just like a JSP?

    Hi! My question is quite simple, I was wondering if it is possible to use PDF files as if they were html forms and post the data to a servlet with PDFBox? I read the spec and it seems that PDFBox is meant to treat local pdf files, am I right?
    I guess what I will have to do is save the pdf file once the user has finished entering data in it with a unique file name, and then treat the local pdf file with PDFBox... Is that the way to go or is there an other way to use pdf forms just like an html forms and then treat the data in a servlet?
    Thanks!

    No, I think I've seen PDF forms which post to servers like web pages. I could be wrong, though. But that would probably require the full Adobe Acrobat to generate those.

  • How to use deafult pdf viewer ? when i give windows in my pc pdf file open in firefox deafultly but suddenly its not working how to fix this ?

    please tell me how to use default pdf reader in firefox ? when i give windows in my pc pdf file open in firefox deafultly but suddenly its not working how to fix this ? pdf not open when i give ok with preview in firefox its not open its offer again same message

    In order to change the default pdf reader please see: [[View PDF files in Firefox without downloading them]]
    In order to change the file association: [[Applications panel - Set how Firefox handles different types of files]]

  • Please help : How to make the anomalistic table just like below?

    Hi all,
    How to make the anomalistic table just like below? Anyone can give the way detail or thoughtway ?
    http://61.132.17.188/webber/table.gif

    This is just a suggestion.
    If you put your "JTable" in a "JScrollPane", then you can add any "java.awt.Component" to the corner of the "JScrollPane" -- using the "setCorner()" method (of "JScrollPane").
    I would suggest making a custon "JPanel" and overriding its "paintComponent()" method to draw a diagonal line (and the required text) on it.
    You can find out more about how to do this from the links I provided in my first reply.
    Hope this helps.
    Good Luck,
    Avi.

  • CS6. I cant duplicate lighting effects using an alt key, just like in CS3. I dont want a new light i want to duplicata an existing one that i created.

    CS6. I cant duplicate lighting effects using an alt key, just like in CS3. I dont want a new light i want to duplicata an existing one that i created.
    Nie mogę duplikować zaprogramowanego efektu świetlnego za pomocą altu tak jak w poprzednich wersjach.

    http://java.sun.com/j2se/1.4.1/docs/api/java/io/FileOutputStream.html#FileOutputStream(java.io.File, boolean)
    Kind regards,
    Levi

  • Is there any charge with my ipad icloud when i use it outside canada just like philippines?

    Is there any charge with my ipad icloud when i use it outside canada just like philippines

    There have been a few reports of problems, but most users on this forum report no problems.
    If you have an iPad 1, the max iOS is 5.1.1. For newer iPads, the current iOS is 6.1. The Settings>General>Software Update only appears if you have iOS 5.0 or higher currently installed.
    iOS 5: Updating your device to iOS 5 or Later
    http://support.apple.com/kb/HT4972
    How to install iOS 6
    http://www.macworld.com/article/2010061/hands-on-with-ios-6-installation.html
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    If you are currently running an iOS lower than 5.0, connect the iPad to the computer, open iTunes. Then select the iPad under the Devices heading on the left, click on the Summary tab and then click on Check for Update.
    Tip - If connected to your computer, you may need to disable your firewall and anitvirus software temporarily.  Then download and install the iOS update. Be sure and backup your iPad before the iOS update. After you update an iPad (except iPad 1) to iOS 6.x, the next update can be installed via wifi (i.e., not connected to your computer).
     Cheers, Tom

  • Adding a fragment file (*.jspf) to a *.jsp file

    Adding a fragment file (*.jspf) to a *.jsp file
    What I did:
    1. Mkdir Web Pages\pages\common
    2. Create a *.jspf in directory
    3. Mkdir Web Pages\pages\common
    4. Create a *.jsp in directory
    5. Select page fragment
    Outcome:
    My *.jspf file is not shown in the combo list box of the "Select Page Fragment" dialig box, unless I create the *.jspf in the Web Pages directory.
    Question:
    Why?

    Since you're talking about "mkdir" etc. it sounds like you're trying to do this outside of the IDE. If so, you should note that a fragment is NOT just a .jspf file! All web forms in Creator have two files: a markup file (.jsp or .jspf) and a backing bean (.java). You must create both, by the same name, in the correct location, for the form to be considered a valid fragment. It's best to do this through the IDE.
    In case you did use the IDE and it's still not working, perhaps there's an issue with creating page fragments in subfolders. I know we had some bugs with creating regular forms in subfolders and most of those bugs were fixed but perhaps there are some additional issues for fragments.
    -- Tor

  • Using the value "Image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of preconfigured file types (.jpe, .jpg, .jpeg, .?

    On a form, using the value "image/*" for the accept attribute of the HTML input Element, how can I add .pdf to the array of pre-configured file types (.jpe, .jpg, .jpeg, .gif, .png, .bmp, .ico, .svg, .svgz, .tif, .tiff, .ai, .drw, .pct, .psp, .xcf, .psd, .raw)?
    Say I wanted to add .gif, .jfif or .ico. I find this array limited, how can I add types to image?
    <input type="file" name="file" accept="image/*" id="file" />
    mimeTypes.rdf does not seem to allow this.

    ''mimeTypes.rdf'' has nothing to do with web development. It's a file that stores your file handling preferences (e.g. if you want ZIP files automatically saved or opened).
    You can't change the file types of the pre-defined content specifiers (audio/*, video/*, image/*), but you can specify additional MIME types. To add PDF to your above example,
    <pre><nowiki><input type="file" name="file" accept="image/*,application/pdf" id="file" /></nowiki></pre>
    For details, see
    * [https://developer.mozilla.org/En/HTML/Element/Input developer.mozilla.org/En/HTML/Element/Input]

  • How to use preprocess​or directives (#define) in C++ header file with LabVIEW 8.2

    I have a C++ header file that contains around 2000 preprocessor directives:
    #define MEM_1   0xC
    #define MEM_2   0xD
    #define MEM_3   0x18
    I want to be able to "access" these memory offsets by identifier name (MEM_1) in my LabVIEW program like I would in a C++ program.  I do not want the overhead of parsing through the header file and storing all the offsets into an array or similar structure. 
    I've written a simple Win32 console program to return the memory offset given the identifier (see code below), and created a DLL to use with my LabVIEW program.  In the console program, you notice that I can call a function and pass in the identifer name, and get the offset back correctly:
    getOffset(MEM_1);
    In LabVIEW, I was hoping to be able to pass in the identifier (MEM_1) but was unsure what datatype to use.  In my C++ code, I defined the parameter as an int.  But in LabVIEW, I can't enter in MEM_1 as an int.   Can someone advise on how to do this?  Or if there is an alternate way to use #define's from external code inside LabVIEW?
    #include "stdafx.h"
    #include "scrmem.h"
    #include "stdio.h"
    void getOffset (int var);
    int _tmain(int argc, _TCHAR* argv[])
     getOffset(MEM_1);
    canf("%d");
     return 0;
    void getOffset (int var)
     printf("The address of MEM_1 is %x", var); 

    kaycea114 wrote:
    Hi,
    Where do you think I should use the string? 
    The way that getOffset is currently defined in the DLL, I have to connect an integer input into the LabVIEW function.  This prevents me from entering in: MEM_1 as the input to the LabVIEW function.
    Are you suggesting that I change getOffset to receive a String parameter ("MEM_1")?  Does that mean I need to do a string compare (line by line) through the header file to get the offset?  It seems like doing this search through the header file would degrade performance, but if that's the only work around, then I'll do it.
    Please advise.
    Well, what you want to do is indeed entering a string and getting back the assigned integer. That is what the C preprocessor is doing too although there it is done only once at the preprocessor stage of course and not at runtime anymore. But LabVIEW is not a C preprocessor.
    What you did so far seems to be to define getOffset() that accepts an enum that needs to be created from the C source code to then return the assigned constant. That's of course not very helpful.
    And writing a VI that could parse the C header file and create a name/constant array is really a lot easier than doing the same in C. You don't even need to parse the file each time again, but can instead cache them in an uninitialized shift register (LV2 style global).
    Even more easy would be to create from that data a ring control using property nodes and save it as custom control and voila you have the most direct lookup you can get in LabVIEW and it works just as comfortable as using the define in C code. It would mean that you need to seperate your header file possibly into several different files to only get related constants into the same ring control, but that is easily done.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to use old archieve logs with a new control file

    Environment:
    ORACLE_BASE="/export/home/oracle"
    ORACLE_HOME="/export/home/oracle/product/8.1.6"
    NLS_LANG=".UTF8"
    2 partitions:
    i) /data1 -- contains important datafiles (OS striping on 3 hard
    disks)
    ii) /export/home -- contains the oracle program, and SYS/SYSTEM
    datafiles
    Problem:
    -/data1 cannot be read/mount (damaged)
    -oracle failed
    Action Performed:
    -reinstalled OS
    -mount /export/home successfully (all oracle system files,
    instance init files exist)
    -/data1 is an empty partition
    -created the oracle user, and its groups
    -chown recusively for the $ORACLE_BASE directory
    -set all the oracle environment variables
    -attempted to start the instance, but failed due to a control
    file was
    missing
    -since control files were set to be mirrored, i copied a control
    file somewhere
    from /export/home/oracle/oradata/<SID>/control1.ctl to
    /data1/oracle/oradata/<SID>/control2.ctl (i.e. have them back to
    their original locations)
    -the instance failed to start as well, since the datafile set in
    the control files couldn't be found
    -this forced me to re-create the control file... b4 i re-create
    a new control file, i backed up the old one
    -once the control file was created, the database can be started,
    but, to oracle, all achieve log information are lost (although
    the achieve log's physical files r still there)
    -i imported the important data from a dump file that was
    exported a week ago b4 the system failure
    -since we r using the new control file, the redo logs switch
    contains no achieve log information that the old control file
    has, so running "recover database" doesn't do anything
    Purpose:
    since the dump file is a week old, i'd like to get the data
    after my last export and b4 the system failure. the database was
    run in arhieve log mode, how can i recover those data with the
    new control file
    Question:
    -how can we create a new control file that can drive the old
    achieve logs?
    -can we convert the achieve log data (.dbf format) into text
    format?
    -can we still use the old control files to start the database?
    -what's a suggested solution if we'd like to re-construct the
    database up to the moment b4 the system failure in another
    server?
    thx

    user3930585 wrote:
    I am in an unenviable position, with an unsupported database.
    We are running Oracle 9i on Windows XP. We are upgrading soon to Oracle 11g on a newer platform, but need to get our development environment working first.
    We lost a system that was running our development database without having a database export. The C drive was placed into a new system as the D drive.
    I have loaded Oracle 9i on the C drive, but I have been unable to determine how to point it to the existing data files on the D drive. My search skills may be the limiting factor here...
    We cannot simply load the drive as C, since the hardware is different.
    What are the steps to point the new database software at the data files on the D drive? Or, how do I copy the old data files into the new Oracle Home and have them recognized properly?
    Are you stating that you don't know how to use COPY command?
    Can you recreate same directory structure on new C drive as exist on old C drive?
    Can you then drag & drop copies of the files?

  • How to create a TEST form just like in workshop

    Hello
    I am using WL Workshop 7.0.2. and Java 1.4. Could anyone pls tell me how to create
    my own test form like in Workshop.
    Is it possible to have a HTML client without any java class or JSP in between
    the HTML form and the webservices(jws). In workshop I know that knexServlet is
    somehow resposible for creating the test form in work shop.
    Any example which has used webservices created by workshop and has a HTML form
    has a client.
    Any HELP will be greatly appreciated.
    Thanks
    madhu

    Thanks Anurag,
    Could you point me to some rich JSP client example, (not the HelloWorld or MazeDisplay).
    preferably which takes a XML as request.
    Thanks
    madhu
    "Anurag Pareek" <[email protected]> wrote:
    Madhu,
    To call a webservice, a client using HTTP should be able to send a SOAP
    request to the server hosting the webservice. Generally, it is complicated
    to code the SOAP request manually and hence clients use a proxy on their
    side to do the job for them. For a Java client, this job is taken care
    of by
    the client proxy JAR file which can either be downloaded from the Test
    View
    web page or generated using the <clientgen> ant task.
    Requests from the Test View page are given special treatment, and there
    is
    special functionality provided in the server to help in iterative
    development using the Test View.
    For any client other than the Test View such special wiring is not
    available. Hence you need to use a JSP or a Java class on the client
    side.
    Regards,
    Anurag
    "madhu" <[email protected]> wrote in message
    news:3ee8cca3$[email protected]..
    Hello
    I am using WL Workshop 7.0.2. and Java 1.4. Could anyone pls tell mehow
    to create
    my own test form like in Workshop.
    Is it possible to have a HTML client without any java class or JSPin
    between
    the HTML form and the webservices(jws). In workshop I know thatknexServlet is
    somehow resposible for creating the test form in work shop.
    Any example which has used webservices created by workshop and hasa HTML
    form
    has a client.
    Any HELP will be greatly appreciated.
    Thanks
    madhu

  • Sample project how to use Itext (pdf) in webdynpro

    Hi all,
    Have someone a sample how to use Itext in a webdynpro.
    Richard

    Hi Roberto and Bala,
    Sorry, I was thinking the wrong way!!
    Please can you check my source, I a'm get an error by opening the new window. the error : D:\PDFfromJava.pdf (The system cannot find the file specified)
    this my source:
        //@@begin wdDoInit()
        wdContext.currentPersonalDataElement().setFirstName("Richard");
        wdContext.currentPersonalDataElement().setLastName("Middelburg");
         Document document = new Document();
         try {
          PdfWriter.getInstance(document, new FileOutputStream("D:
    PDFfromJava.pdf"));
           document.open();
           document.add(new Paragraph("Hi, this is demo PDF file from JAVA!"));
         catch(DocumentException de) {
         //     wdComponentAPI.getMessageManager().reportException(de.getMessage(),false);
         wdContext.currentContextElement().setTest("fout1");
         }catch(IOException ioe) {
         //     wdComponentAPI.getMessageManager().reportException(ioe.getMessage(),false);
         wdContext.currentContextElement().setTest("fout2");
         File file = new File("D:
    PDFfromJava.pdf");// from iText library
         try
              IWDResource wr = WDResourceFactory.createCachedResource(getBytesFromFile(file), "PDF Report", WDWebResourceType.PDF);
              IWDWindow w = wdComponentAPI.getWindowManager().createNonModalExternalWindow(wr.getUrl(0), "PDF Report");
              w.show();
         catch (Exception e)
              wdComponentAPI.getMessageManager().reportException(e.getLocalizedMessage(), false);
              wdContext.currentContextElement().setTest("fout3");
        //@@end
    //@@begin others
      public static byte[] getBytesFromFile(File file) throws IOException {
                    InputStream is = new FileInputStream(file);
                    // Get the size of the file
                    long length = file.length();
                    // You cannot create an array using a long type.
                    // It needs to be an int type.
                    // Before converting to an int type, check
                    // to ensure that file is not larger than Integer.MAX_VALUE.
                    if (length > Integer.MAX_VALUE) {
                         // File is too large
                    // Create the byte array to hold the data
                    byte[] bytes = new byte[(int)length];
                    // Read in the bytes
                    int offset = 0;
                    int numRead = 0;
                    while (offset < bytes.length
                             && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {
                         offset += numRead;
                    // Ensure all the bytes have been read in
                    if (offset < bytes.length) {
                         throw new IOException("Could not completely read file "+file.getName());
                    // Close the input stream and return bytes
                    is.close();
                    return bytes;
      //@@end
    Richard

  • How can I use the same object in the different jsp files?

    I am doing a project. I have finished my jave source files and compiled them successfully. And I also wrote a main method to test my classes, they also worked well. Now I am trying to use my jave code in the jsp files. But I meet a problem, in my method of java source file, I can generate a object of a class, and use it in the whole main method. But in the different jsp files, how can I do same thing?
    For example, in the .java file,
    Vector vl = new Vector();
    While ...{
    vl.add(...)
    In each of my .jsp file I want to do one loop of the above, meanwhile I want to do that in the same object.
    I hope you can understand what I mean. Really need your help!

    put your object into a session and you can the use it in all the jsps as long as the session is valid. Or you could create a static variable in the class that only creates one instance off an object and then create a static method to return this object.

  • How to use a PDF template with OA Framework

    I have a question that is hopefully quite simple. I am using JDeveloper to add a button to a page that will create a PDF document.
    According the the documentation it should be quite easy to merge a PDF template file with an XML data file to produce an output PDF file.
    The problem I have is that although I can create the XML data file OK - the output PDF file is not produced (the file gets created but it is 0 bytes - I don't get an error message though). Can someone tell me what I'm doing wrong?
    My code is as follows:
    try
    DataProcessor dataProcessor = new DataProcessor();
    dataProcessor.setDataTemplate("/oraapp02/apphrutv1/hrutv1comn/work_accident.xml");
    Hashtable parameterTable = new Hashtable();
    parameterTable.put("hendelse","3574");
    dataProcessor.setParameters(parameterTable);
    dataProcessor.setConnection(jdbcConnection);
    dataProcessor.setOutput("/oraapp02/apphrutv1/hrutv1comn/accidentout.xml");
    dataProcessor.processData();
    } catch (SQLException e)
    throw new OAException("Couldn't create xml file. SQL Error="+e.getMessage(),OAException.ERROR);
    } catch (XDOException e) {
    throw new OAException("XDOException" + e.getMessage(),OAException.ERROR);
    } catch (ClassNotFoundException e) {
    System.out.println("ClassNotFoundException " + e.getMessage());
    //OK - we created the XML file, now let's send it into the pdf template:
    FormProcessor fProcessor = new FormProcessor();
    fProcessor.setTemplate("/oraapp02/apphrutv1/hrutv1comn/NAV.pdf");
    fProcessor.setData("/oraapp02/apphrutv1/hrutv1comn/accidentout.xml");
    fProcessor.setOutput("/oraapp02/apphrutv1/hrutv1comn/NAVout.pdf");
    fProcessor.process();
    I haven't registered the PDF template file in Oracle Applications - but that shouldn't be the problem should it? Or is it better to use a PDF template that is registered in Oracle Applications?

    Can you give me some tips on setting up the appropriate libraries to use the DataProcessor class? I have tried the BIP libraries and the classes from JAVA_TOP but I always get the same error when the constructor of DataProcessor is called:
    java.lang.NoSuchMethodError: oracle.apps.fnd.i18n.common.util.DateFormatMaskConverter.getJavaDateFormatFromOracle(Ljava/lang/String;Ljava/util/Locale;Z)Ljava/lang/String;
         at oracle.apps.fnd.i18n.common.util.FormatMaskUtil.isOracleCompatible(FormatMaskUtil.java:693)
         at oracle.apps.fnd.i18n.common.util.FormatMaskUtil.detectDateFormatMaskType(FormatMaskUtil.java:580)
         at oracle.apps.xdo.dataengine.Format.<init>(Format.java:68)
         at oracle.apps.xdo.dataengine.XMLPGEN.<init>(XMLPGEN.java:65)
         at oracle.apps.xdo.dataengine.DataProcessor.<init>(DataProcessor.java:168)
    I have been successful in displaying a PDF file in an OAF page but I had to generate the xml data using a PL/SQL package rather than the data template. I know it works because Concurrent Requests using the XDODTEXE executable work and this uses DataProcessor.

  • How to add button on heading just like this page in template?

    Hi,
    I'd like to create template that have many buttons on heading
    just like this page. But in the wizard to create template, it
    can only add three button: one for application,another for
    home,and the other for help. What should I do? Do I create
    template by coding? Please tell me.
    Thanks,
    Sirin

    You need to use an unstructured UI template. Structured UI
    templates are not supported with Portal pages.
    Regards,
    Jerry

Maybe you are looking for

  • FF keeps crashing- can someone decipher this errror report?

    My FF has been crashing a ton latley. Trying to pinpoint why. I uninstalled & reinstalled flash & java. The crashes seem to happen mostly when a page is loaded that has a lot of content displayed all at once (photos, embedded videos, etc.). Firefox h

  • Go button in View Panel of Query Region

    Hi, I have a search page uses Query Region, and query region includes Simple Search Panel and View Panel, I understand to get the id of the Go button in Simple Search Panel, the method is: queryBean.getGoButtonName(). How can get the id of Go button

  • Activating CS3

    I've been in an Adobe nightmare for almost 2 months, trying to activate one copy of CS3 that was on my computer for almost 4 years and worked fine, but wouldn't activate when my husband moved the hard drive it is on from one computer to another, sayi

  • Calyear with quarter restriction

    hi i have 3 key figures 5% of female 5% of disability 5% of ehinic orign now i want show at report these 3 kf with present year 4 quarters and previous year 4 quarters and 2 yrs back with 4 quarters so i am going drag these kf restricted with year an

  • Why is OS X ignoring my colour profile?

    I calibrated my monitor using a Spyder3 and the results it returned were...confusing. Images in Chrome and Safari look fine, but the rest of the system appears to be ignoring my colour profile Here's a couple of examples: