Creating dynamic HTML form from XML data in session

I'm a bit new to servlets, please bear with me if I don't make myself clear.
currently i have a HttpServlet that extracts a XML document into a jdom Document.
this is done within the doGet() method as the XML document is in the session object.
i would like to create a popup window (a JSP or servlet) that can access the same session, convert some of the data in the XML to a submit form that users can put input into, and have the JSP(or maybe servlet) send the form data and the XML back to the original HttpServlet (through the session object).
i have a few questions on how to make this happen:
1.how to create a popup window (JSP or servlet) in a servlet, and forward the session data as well?
2.if the popup window has a submit form that submits some extra data back to the original httpservlet, will the XML document still be retained in the session?
and any advise on how to go about this problem is highly appreciated!

Hi,
This is my first time posting a reply. Hope this helps.
I am assuming that you are hitting the servlet from a link. This is one way of doing it. You can create a new window using Javascript. like this.
<script language="javascript">
var popupWin
function openWindow(page){
popupWin=window.open(page,"","width=800,height=600,resizable,scrollbars");
</script>
link
The response of your servlet will be in the new pop-up window.
2.if the popup window has a submit form that submits
some extra data back to the original httpservlet,
will the XML document still be retained in the
session?The session should be retained as long as you are hitting the same servlet container . You should be able to access the seesion variable in the original servlet if the form in the pop-up window calls the original servlet.
--mv                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Automatically creating non-interactive PDF forms from XML data

    Hi All,
    I am a newbie to the whole Adobe LifeCycle Designer product and have been trying to find a definitive technical article on a way to automatically create pdf documents from template forms using XML data. I can create the XML, I can create the form based on the XML schema but I can't seem to find anything which explains how to automatically associate the form with the each xml file that I create and produce a pdf document based on the xml data.
    The project I am working involves creating marketing brochures, driven from our enterprise databases, to be sent to a printer. No user interaction is required, and I estimate that we'll need to create around 500-1000 pdf's per day.
    To me this seems like it should be quite a simple task but I can't find anything which gives me a starting point.
    Any help would be greatly appreciated.
    Regards
    Nick Smith

    Hi Nick,
    Just curious if you figured out how to generate a PDF out of a template? I've a similar requirement where I transform XML schemas into templates, convert the template into a PDF document, and at run time bind the PDF with the form data.
    To sort of answer your question of how to bind an XML instance file to a form, if that form is an XML-FORM, then all you'd need to do is open that document as a PDF document using the PDFFactory, and invoke the importFormData() method on it, passing the XML instance as the input stream.
    The harder part though is getting the PDF out of the template in the first place, without using any adobe user interface period.
    Karthick

  • Creating dynamic html forms

    Hi,
    We have a requirement to create a number of html forms where the fields displayed on the form could change based on the date a user requests the form.
    The technology stack we are using is jsp,struts, adf bc, although we may use jsf , adf bc.
    The only way I can see of doing this(assuming we get the database design correct) is to generate the required xml from the database and then transform this into html on the fly? This would obviosuly not be compatable with the ADF binding feature though.
    Has anyone done this, and/or found a way to make it work using ADF.
    Thanks,
    Richard

    I guess I could also just dynamically build up the from fields directly in the jsp.
    I guess I would just loop throught the meta data on the forms from the database,
    and then just write out the number and type of form elements required.
    This would still not make use of adf binding though.

  • Creating dynamic jsf page from xml

    I have an xml file with repeating content and from this xml file I have to build a screen with what is in the XML file
    The following is a sample of what I am talking about .I would have two RequestItem sections on the screen with a field ItemId ,RequestAction,
    Level,TelephoneNumber etc.
    The problem I face is knowing how many RequestItemes are in the XML .
    Any Ideas what is the best way to approach this .
    <RequestItem>
    <ItemId>3</ItemId>
    <RequestAction>ADD</RequestAction>
    <Level>LINE</Level>
    <TelephoneNumber>
    <TN>3035552224</TN>
    <CompressionType>729</CompressionType>
    </TelephoneNumber>
    <TenantLocationRecord>
    <Id>tlr1234567891
    </Id>
    </TenantLocationRecord>
    </RequestItem>
    <RequestItem>
    <ItemId>1</ItemId>
    <RequestAction>DELETE</RequestAction>
    <Level>LINE</Level>
    <TelephoneNumber>
    <TN>3035542224</TN>
    <CompressionType>730</CompressionType>
    </TelephoneNumber>
    <TenantLocationRecord>
    <Id>tlr1234567891
    </Id>
    </TenantLocationRecord>
    </RequestItem>

    Use Jaxb to read the XML and then programatically add components to the page.

  • Create HTML Form from PDF Form

    Does anyone know of a quick way to create an HTML Form from an existing PDF Form?
    Thanks everyone!
    mars

    From ID you can export to XHTML which is indeed consumed by DW but not via Acrobat...
    So, can I import a PDF form into ID?
    When I meant was - InDesign can export to XHTML
    Acrobat cannot
    Indeed, it would be great if forms could be created as ID objects and then exported to a PDF form but not yet (all fingers and toes crossed for CS5/CS6)
    Cheers,
    Jon

  • I am working in Adobe Acrobat 9 Pro and just created a pdf form from a MS Word document. I need to find out how to have a date field in my form which will update automatically. Can some one out there help me?

    I am working in Adobe Acrobat 9 Pro and just created a pdf form from a MS Word document. I need to find out how to have a date field in my form which will update automatically.

    Update automatically under which circumstances, exactly?

  • Can't create dynamic html elements with jsp????? important

    Hi All,
    I am having problem creating dynamic html elements with jsp tags, i have tried to use EL and java scriplet, both of them don't work.
    i am trying to create dynamic menu in my "rightMenu.jspf", based on, if user has logged in or not.
    some like this!
    <jsp:if test ="${validUser == null}">
    some simple text menu here
    </jsp:if>
    but it is not working. it simply loading all and images with in statement, regardless of whether user has logged in or not. i think some how if statement is not working properly.
    "validUser" is a session bean, which is not creating at this point, it will created when user will log in successfully. and also this session bean does not exist at the page, where i am trying to check that .
    Is there any way to create dynamic values in jsp. It is really important, is there any body who help me in this matter. i would be really grateful.
    zaman

    hi jaspre,
    thanks for replying me. you know what, is it not something wrong with web.xml file. i remember once, i deleted some from there, a property with "*.jsp". i can't remember what exactly was it though.
    all if statements works on files ending with extension ".jsp" but don't work only on with extension ".jspf". there must be to do with this.
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <servlet>
    <servlet-name>ValidateServlet</servlet-name>
    <servlet-class>ValidateServlet</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ValidateServlet</servlet-name>
    <url-pattern>/ValidateServlet</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>dwr-invoker</servlet-name>
    <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>pollAndCometEnabled</param-name>
    <param-value>true</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>dwr-invoker</servlet-name>
    <url-pattern>/dwr/*</url-pattern>
    </servlet-mapping>
    <session-config>
    <session-timeout>
    30
    </session-timeout>
    </session-config>
    <welcome-file-list>
         <welcome-file>
    main.jsp
    </welcome-file>
    </welcome-file-list>
    </web-app>
    if any one can figure it out. i would be grateful.
    zaman

  • Creating a PDF form from a docx or xlsx

    Hello,
    Pulling my hair out over here... Can you help me out?
    I am trying to create a PDF form from either a word or an excel file.
    When I choose File > Create > PDF Form, I get the dialouge box asking to use either a file or scan from paper. Choosing file, then hitting next shows the choice of current document or browse for file. I browse for file, find my docx file, but it shaded out. Docx or xlsx does not appear in the "show" drop down below, which suggests that this function doesn't support these formats. HUH?
    I have read & watched the tutorials linked below, both of which clearly say Word and Excel are supported.
    http://help.adobe.com/en_US/acrobat/pro/using/WSB3F26303-0F1D-494a-BC55-7BF7F6684B4D.html
    http://tv.adobe.com/watch/learn-acrobat-x/getting-started-creating-simple-forms/
    Then I noticed a difference in the create window from the video, to my version...
    The video says "(PDF, Word, Excel or other file format)":
    My pop-up says ONLY PDF:
    Whats going on?
    I am using:
    MAC OSX 10.7.4
    Office 2011 MAC
    Acrobat X Pro 10.1.3
    Only way I can create a Form from Word files is to first print it to PDF, then use the form wizard on the PDF file... Which seems to have POOR results in auto-recognizing fields.
    PLEASE HELP Adobe!
    Thanks.

    I just got Acrobat X for my mac, for a class.  I am SO frustrated.  Almost everything in the class focuses on PDFMaker options.   The 'save as adobe pdf' or save as pdf options have zero functionality.  So I now own PDF software that doesn't really function on a MAC, and have to go to a windows machine.  I keep reading that it is a Microsoft problem, but I don't know how that can be when the software I thought I bought is this fancy PDF software that converts everything!!
    I asked a tech today if there were 'any' adobe work-arounds for this and basically the answer is to save PDF with no attribute functionality.  Period.
    Wasted $$ for me

  • Reports 6i -- How to create an HTML form template before form processing

    Hello Oracle Reports Gurus,
    I'm using Oracle Reports 6i and trying to create an HTML form WITHOUT using the Oracle Reports 6i parameter form builder. The goal: to take a web page already in existence containing a form with checkboxes and radio buttons and make it 'transparent' to my users in hooking it to Oracle Reports. So far, I made my HTML page (with form and all) a "header" file for my Oracle report and didn't place anything in the parameter form builder. However, upon doing so, Reports 6i decided to be extra helpful and place form elements into the Parameter form builder.
    So,
    1) Is there a way to take a web page with a form and all and easily "plug it" into Oracle Reports 6i WITHOUT using the Parameter Form builder?
    2) Is there another way to create an HTML form that will allow me to have radio buttons, checkboxes, etc?
    Thanks in advance from this Oracle Reports newbie,
    Lee Lonitz
    Webmaster
    Lockheed Martin IS&S
    [email protected]

    lee,
    i am not exactly sure what you are trying to do. since you state you use HTML, i assume you are running 3-tier with the report server, right ?
    if so, the easiest way to hook your parameter form up to your report is to just pass the URL to the report as the action URL for your form.
    in 9i/10g we provide the Reports Web source, which is based on JSP and allows you to paste HTML into your report to create a highly customized HTML parameter form.
    i am afraid in 6i, we don't provide a way to actually combine your HTML form ito the report. it needs to stay separate, but can link to the report using the way i described above.
    thanks,
    ph.

  • Dynamic HTML generation from a Dynamic PDF/XDP

    I was wondering if LiveCycle is able to generate a dynamic HTML page from a dynamic XDP/PDF form in LiveCycle ES ?
    I have read up on the help contents regarding HTML generation from PDF forms but its not mentioned anywhere whether LiveCycle supports the creation of an HTML page that mimics the dynamic behavior of a dynamic PDF/XDP form.
    Thanks in advance

    Yes it does ....
    Paul

  • Pre-populate PDF from XML data

    I am looking into the feasibility of pre-populating a PDF form using an XML data file. The basic workflow I am investigating is this:
    1. both the PDF form (built in LiveCycle Designer) and XML file would be stored together on a web server.
    2. User would navigate to a web page containing a link to the PDF form, and click to open. The PDF form would open in their browser (using their installed PDF viewer plug in)
    3. the PDF form would be (partially) populated by the data in the XML file automatically
    4. User would fill out the unpopulated portion of the form, and save the resulting PDF to their computer.
    Is this workflow feasible? What are the problem areas? I realize that the the PDF would have to be Reader Extended to allow the user to save it.
    Many thanks for any and all help and direction.
    Matt LL.

    Hi Matt,
    yes, this workflow is perfectly feasible, not really with solely a standard HTTP server though.
    There are a variety of options. The issue is that the process of populating the form can usually not be done without any server-side application of logic.
    - You could use LiveCycle Forms to achieve that. That'd also allow you to use other LC components later on easily , such as Reader Extensions, Process Management or DRM for your documents.
    - You could use Adobe ColdFusion for pre-populating the form from XML, it's super easy (much more straightforward than LC imho). The downside is that CF doesn't have an option to Reader Extend the form for you. That being said, you could get Reader Extensions as a stand-alone module and use it's SOA APIs to hook into your CF code (ColdFusion is basically just an abstraction layer on top of Java).
    Hope that helps to get an idea.
    Cheers
    Kai

  • Creating a HTML page from the J2ME application

    Hi,
    I am developingan application in J2ME. Can anyone of you out there, help me whether there is any way I can generate a HTML page from the application.
    I have the data but I don't know ho to create a HTML page from a J2ME application.
    Any document or any code will prove handy.
    Thanking in anticipation.
    Ashish

    When you say that "you have the data" you mean that you have HTML code data(<html><body>Hello World</body></html>)? If yes you should create an algorithm that "read" html tag and display text in the appropriate layout/font/size/color...
    A solution could be simplify your HTML code (server side), so you can easly "decode" and display text.
    Giovanni
    Italy

  • How to create an Excel file from XML in the Receiver File Adapter Comm Ch

    How do I create an Excel file from XML in the Receiver File Adapter Communication Channel? I have my mapping done and I am outputting the file as a comma delimited csv file. However, the target can only process an Excel file (.xls). How can I generate an Excel in XI?
    I saw this blog, but I don't know how to create a XSLT transformation.
    /people/michal.krawczyk2/blog/2005/12/10/xi-generating-excel-files-without-the-java-nor-the-conversion-agent-not-possible
    Any help would be appreciated. Thanks.

    Here are the steps I took to create an XSLT transformation in XI 3.0:
    1. I created my source and target XSDs using XMLSpy.
    2. I created the XSLT mapping from source to target in XMLSpy (referencing the souce XSD schema).
    3. I created another XSLT mapping to format the target into Excel XML.
    4. Import the source and target XSDs in the IR's External Definitions
    5. Zip each XSLT mapping (.xls) and import it into the IR's Imported Archives
    6. Reference the XSL mappings in the Interface Mapping

  • I am creating a web form from a template and I need to change a field. It is just a text field at the moment but I need to change it to a field that the customer can fill in. How do I do this?

    I am creating a web form from a template and I need to change a field. It is just a text field at the moment but I need to change it to a field that the customer can fill in. How do I do this?

    See this thread:
    http://answers.acrobatusers.com/Is-add-instructional-text-text-field-disappear-clicked-q19 5078.aspx

  • I created a pdf form from a Word doc with 9 pt aerial font formatting; the text on the pdf form is aerial 9 pt, but the fields are formatted in courier 12 pt - How do I reformat the font in the fields??

    I created a pdf form from a Word doc with 9 pt aerial font formatting; the text on the pdf form is aerial 9 pt, but the fields are formatted in courier 12 pt - How do I reformat the font in the fields??

    You can set up a temporary button (or link, bookmark, etc.) and add the following JavaScript action:
    // Mouse Up script for a temporary button (or bookmark, etc.)
    // Change the font and font size for all text fields in this document
    for (var i = 0; i < numFields; i += 1) {
        var f = getField(getNthFieldName(i));
        if (f.type === "text") {
            f.textFont = font.Helv;
            f.textSize = 9;
    It also sets the font size, but you can remove that line if you don't need to do that.

Maybe you are looking for