Save content of a JSP page to word document

I am using jsp page to fill data to the page & download the page as a word file
response.setContentType("application/vnd.ms-word");
response.setHeader("content-disposition","attachment; filename=Application.doc");
This page download asking open save dialog box.
when we open this it gives other save dialog box.
Can u help me.
Thanks

Hello Boris!
You can use the WordRpt_NewPage function to add a new page into an opened word document.
Here is some documentation about this function: http://zone.ni.com/reference/en-XX/help/370051Y-01​/toolslib/functionreference/cviwordrpt_newpage/
You'll also find useful hints on how to use it in the sample program that ships with CVI: <samples>\activex\word\wordrpt.prj.
Best regards!
- Johannes

Similar Messages

  • Save a JSF page as word document

    Hi All,
    I have a simple JSF page with some generated content. In that page, there is a button as "save as word". When the link is clicked , i need the save dialog to appear and prompt the user to save the content in the JSP page as word document.How can i do this in JSF.
    Please guide me in this regard.
    Thanks & Regards,
    Pals

    I don't think this is easily achieveable, if even possible
    A web page as you see it is the result of a web browser rendering the html in its own way. Different browsers can display the same html differently. So what gets displayed to the user is dependent on their browser.. In order to produce an image of what they see, you would need to somehow render the image differently depending on the value of the User-Agent header.
    Maybe by hacking around the hotjava browser you could start to do something like this, but I'd imagine it would be quite messy and again different to what the user views.

  • How to display a document content in a JSP page

    Hi friends,
    I am trying to display a document's content in a JSP page after user authentication.For that I mapped a jsp file with extension ".sens" in Content Management SDK manager,and put the file in the directory '/ifs/jsp-bin' of webstarterapp,but it is not working.Please help me to solve the probleb as earliest.
    Regards
    Prasenjit

    under view put a new tag
    <f:view>
    <ui:script url="page.js"/>
    and thats it

  • Exporting Content of a JSP page into Excel Spread Sheet

    I am trying to export the content of a JSP page into an excel spread sheet. I know this issue had been posted before, but if you any one has the source code of a sample that's working please send it to me at [email protected]
    Your help is appreciated.
    Jamais.

    http://forum.java.sun.com/thread.jspa?threadID=664249

  • How do I download content from a webpage onto a word document?

    I need to download content from a webpage onto a word document so  I can submit an assignment

    If you phrase  your question in something specific,
    I am using Pages and want to embed a photo into an article I am writing.
    I think different browsers save photos just fine but you would want to Save As and have the browser Ask with each save or download where it was to go, otherwise navigate to the default download folder and move it to a more suitable location or just point to it in Pages.
    I think this should go in forum for Pages if that is the app you use.
    https://discussions.apple.com/community/iwork/pages
    It might even be possible to do all this on an iPad of course.
    https://discussions.apple.com/community/app_store/iwork_for_ios#
    https://discussions.apple.com/community/ipad/using_ipad#

  • I am typing 3 page of Word Document.  It has locked up and has this round multi colored circle going around when mouse is on the document....help!!!  Why is it doing this

    I am typing 3rd page of Word Document.  It has locked up and a round multi colored ring turning when the mouse is on the document.  It will not allow me to save it or move forward?   Help!!!

    Hopefully Word's auto-save feature will have saved most of your work.
    If Word will not allow you to do anything, you have to force-quit the evil thing:  > Force Quit...

  • How to get number of pages in word document

    I am developing an OCR application where I need to get number of pages of word documents. I am currently assuming that each page consists of 46 lines but some how, I am not getting convinced with this logic. Is there any simplest way to get this information?
    Let me tell you that in the OCR system I am converting tiff iamges to .txt file and again reading txt file and counting number of pages based on number of lines.
    regards,
    Ranjan

    The number of pages depends on the font size, length of each line and any page break in between.
    You could just say, one page per 46 lines, it depends on how accurate you must be.
    Why not count the number of pages you scanned?

  • Subject content missing access JSP page on Unix

    Hi, everyone:
              I've got a problem when I access my JSP page on unix system.The
              problem is that when I transfer a varable from one page to next. Some
              content are missing. But when I access this page on PC, no this
              problem.
              

    Hi Joseph,
              I have two JSP pages: messages page which has a reply link, it can
              link to replies page.
              <a href = "messages.jsp?CatName=<%= sCatName %>&CatID=<%= sCatID
              %>&MsgID=<%= sMsgID %>"><%=sHeader%></a>
              In this statement, sHeader will go to replies page. It should display
              on the Subject textbox, it is like our message reply interface. But on
              the replies page, only the first word be displayed, the following
              words is gone.
              Sorry, I don't understant what is WLS. And the Unix system which I
              used don't have JVM. Thanks for your reply.
              Joey Fan
              "Joseph Nguyen" <[email protected]> wrote in message news:<[email protected]>...
              > Hi Joey,
              >
              > What do you mean by "transfer" of a variable? Can you please elaborate and
              > provide the WLS version and service pack level along with the Unix
              > vendor/brand/version (and also JDK information)?
              >
              > Thanks,
              > Joseph Nguyen
              > BEA Support
              >
              > "joey" <[email protected]> wrote in message
              > news:[email protected]..
              > > Hi, everyone:
              > > I've got a problem when I access my JSP page on unix system.The
              > > problem is that when I transfer a varable from one page to next. Some
              > > content are missing. But when I access this page on PC, no this
              > > problem.
              

  • Is there a way to set the default Initial View to Bookmarks Panel and Page on word documents that I save as PDF?

    When I save my word 2013 documents as Adobe PDF I have to open the PDF up, go to File>Properties>Initial View>Navigation Tab and then set the initial view as Bookmark Panel and Page; it gets pretty tedious.
    I use Save as Adobe PDF rather than Print to Adobe PDF Printer because I like being able to have the security settings automatically set.
    I just want to be able to save my word document as Adobe PDF with the initial view already set as Bookmark Panel and Page, and with security, so I can send it out immediately.
    Is this possible?
    Thank you.

    Use the Firefox Android Addon - Phony
    *https://addons.mozilla.org/en-US/android/addon/phony
    for more
    *https://addons.mozilla.org/en-US/android/

  • How to show an xml content in a Jsp page?

    I use <jsp:include page=".....xml" /> tag in a jsp file to include an xml file. When this jsp page is open, only the text content in the xml file shows up with plain text. I want this xml file shows up like in IE (with xml format). Does anyone know how to do it? Thanks.
    northcloud

    Thank you, BalusC & evnafets. Someone told me to use <c:import> to load the XML file into a scoped variable, and then use <c:out> to display it. The <c:out> will automatically convert the markup to HTML entities. I tried it, it works. It shows the content in the xml file as plain text (a long string). Any one give me some suggestion to make it looking better, for example, show each element in seperated lines. Thanks.

  • Refreshing the Content on a JSP page

    Hi,
    I am developing an application where a JSP page (index.jsp) is displaying some data from the database. There is an HTML form on the JSP page too. When the user fills in the data and clicks submit, he is redirected to a servlet (via form's action)... the servlet inserts the data into the database and the user is redirected back [Response.sendRedirect("index.jsp")] to the original JSP page.
    The problem I am facing here is that when the user is back on the original index.jsp page, the newly inserted data is not being displayed on the page. The user MUST refresh the page manually in order to view the new data.
    How can I display the new data automatically, without the user refreshing the page?
    PS: I have already tried <META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">... but it is not working...
    Any help will be greatly appreciated.
    Thanks.

    Thanks for info... Have you got any idea of dynamic updation of JSP page? I have been debugging the problem since 2 days and I have tried various methods but nothing seem to help. I have tried to use meta http-equiv and javascript as well for the refresh but its of no use...
    My business logic is pretty simple...
    index.jsp
    =======
    [Connect to database]
    [Fetch  & Display data]
    [HTML Form] ---> submit to Servlet 'test'
    test.java (Servlet)
    ======
    [Fetch the request parameters sent by JSP page]
    [Insert the record into database]
    [response.sendRedirect("index.jsp");]

  • How to implement content caching for jsp page ?

    Hello everyone,
    I am reading an article <Servlets and Jsp Best Practice>,at
    http://developer.java.sun.com/developer/technicalArticles/javaserverpages/servlets_jsp/#author, on one section it is saying :
    "Cache content: You should never dynamically regenerate content that doesn't
    change between requests. You can cache content on the client-side, proxy-
    side,or server-side. "
    Now I am working on a project. For every user, some of the content servlet generated will be the same for at least a week . I am thinking if I implement caching for these jsp pages, that would increase performace a lot.
    But I have no idea how to implement it either client-side or server-side, can someone give me a hint ?
    Thanks,
    Rachel

    You mean actually you are caching the response stream
    and the key to distinguish between different response
    streams are made of user's different request
    parameters. And the filter's function is to intercept
    the request to see if this request parameter's
    combination already exists in the Hashmap,then either
    use the cached response or forward to
    servlet.....really interesting...Do I get it right ?Yes that's it in a nutshell.
    >
    Then how do you build those response streams in
    advance ? You did it manually or have some mechanism
    to build it automatically ?
    The data gets cached the first time somebody visits the page.
    Find some examples on Filters, and take a look at the HttpServletResponseWrapper class. You need to cache response headers as well as the body. Another pitfall that you might run into is handling an If-modified-since header on the request. Don't cache the results of those requests.
    -Jonathan
    >
    Thanks again !
    Rachel

  • Content search over jsp pages

              Hi,
              I am using IIS indexing server to do the content search, but the site is writetn
              in jsp page, so i need to produce the same file in html to be searched. It is
              pain to modify the content. Is there a way to search jsp pages?
              Thanks
              

    Well, Servlet and JSP both are server side technologies and both can be used in web applications. You can write web pages using both servlet and JSP. In fact, your JSP pages are converted to Servlet by container while serving requests. However, writing a JSP page is relatively easier and requires minimal Java knowledge.
    When you will develop real world java based web applications you will find that you are writing more JSP pages than servlet.
    In a typical MVC (Model View Controller) architecture a single servlet is used as controller and JSP pages are used to generate web content.
    Thanks,
    Mrityunjoy

  • Writing html page into word document

    HI,
    I want to write the HTML document using java code in to a word document.
    When I save the webpage as word document. It's properly saving the font...
    I almost did it with following code but the font is missing it is just writing all the text in single font.I want the exact replica of the html page in to the word document.Plz help me out with some input.
    Thanx in advance.
    Regards,
    Ashok.
    public String readContent(){
    String contText="";
    EditorKit kit = new HTMLEditorKit();
    Document doc = kit.createDefaultDocument();
    // The Document class does not yet
    // handle charset's properly.
    doc.putProperty("IgnoreCharsetDirective",Boolean.TRUE);
    try {
    // Create a reader on the HTML content.
    Reader rd = getReader(fileName);
    // Parse the HTML.
    kit.read(rd, doc, 0);
    // Iterate thsrough the elements
    // of the HTML document.
    //ElementIterator it = new ElementIterator(doc);
    //javax.swing.text.Element elem;
    //while ((elem = it.next()) != null) {
    //SimpleAttributeSet s = (SimpleAttributeSet)elem.getAttributes().getAttribute(HTML.Tag.A);
    // code to read the content
    int nleft = doc.getLength();
    Segment text = new Segment();
    int offs = 0;
    text.setPartialReturn(true);
    while (nleft > 0) {
    contText+=doc.getText(offs,nleft);
    System.out.println(contText);
    // do someting with text
    nleft -= text.count;
    offs += text.count;
    if(nleft > 0)break;
    /*if (s != null) {
    //System.out.println(s.getAttribute(HTML.Attribute.HREF));
    System.out.println(s.getAttribute(HTML.Attribute.HREF));
    } catch (Exception e) {
    e.printStackTrace();
    //System.exit(1);
    return contText;
    } //end of reading content method
    static Reader getReader(String uri)
    throws IOException {
    if (uri.startsWith("http:")) {
    // Retrieve from Internet.
    URLConnection conn = new URL(uri).openConnection();
    return new InputStreamReader(conn.getInputStream());
    } else {
    // Retrieve from file.
    return new FileReader(uri);

    Maybe Im missing something here, but where are you doing anything using MS Word? I see you write the text to std out but where does it go to a word document? How do you create the word document, using JNI or is it a java API?

  • How to insert a new page to word document

    Does anybody knows how i can insert  a new page to the opened word document ?
    I am searching for the documentation for the activex word functions and i have no idea where i can find it ?
    I am using LabWindows CVI 8.5.

    Hello Boris!
    You can use the WordRpt_NewPage function to add a new page into an opened word document.
    Here is some documentation about this function: http://zone.ni.com/reference/en-XX/help/370051Y-01​/toolslib/functionreference/cviwordrpt_newpage/
    You'll also find useful hints on how to use it in the sample program that ships with CVI: <samples>\activex\word\wordrpt.prj.
    Best regards!
    - Johannes

Maybe you are looking for

  • HT4623 I tried updating my iphone 5c, but it didn't have enough space and it disabled my iphone. What do I do?

    I didn't realize that my iphone has already been updated to that ios 7 thing. I tried to update it so that I could redo all my music selection to make more space for my TV shows on it, but it failed and my iphone 5c was disabled with only a picture o

  • Is there a way to directly paste as image from clipboard

    I am an old Paint Shop Pro user but finally bought Photoshop CS5. However in Paint Shop Pro there is this excellent feature where you paste whatever image is on your clipboard directly as an image. In PhotoShop CS5 I first need to create a new file a

  • What will happen to Contribute in the future?

    I think Contribute has been discontinued or will not show up in the next CS. Reasons: In the CS5.5-to-CS6 free upgrade offer, It listed a few products that are not eligible for the upgrade: Acrobat, OnLocation, Flash Builder, Flash Catalyst and Contr

  • Standby questions

    Hello everbody, 1) What is the difference between Real-Time Apply and Non Real-Time Apply? 2) How Oracle decides whether the archival of the primary database redo logs to remote destination(Standby Database) is permitted? Regards

  • Query in Servlet not displaying results in html table

    Hi, I am aware that putting html in a servlet is not good practice. In my case, it is just for testing purposes. Environment: WLS 12c on Windows, DB 11.2.0.3 I created an html form and a servlet in a Dynamic Web Project. The form parameters are sent