Present MS Word from JSP

We are using Solaris/Netscape Web Server.
          I have JSP question for the JSP community.
          Scenario:
          1. We are developing a web site to store sensitive MS Word documents
          for the authorized intrnet users to browse and download.
          2. Users are force to redirect to the company HR web site to enter their HRID
          and password first when they're accessing our site.
          3. Then the HR web site will redirect the users to our site with users'
          cookie info.
          4. Our site check the cookie info, if the accesing user is an authorized
          user, our site will set the session, and JSP codes will display links
          in HTML to allow user to access the sensitive MS Word documents.
          Security Risk:
          The users who accessing the sensitive MS Word documents could cut/paste
          the document URL and email to other parties, when other parties access
          this document URL they are by passing the session control, they can access
          it directly.
          What We Did:
          1. Convert all the MS Word Documents to HTML then warp with JSP codes. This
          will only work for those MS Word Documents without embedded marcos.
          2. Hide the URL from Popup Browser. Users can still get the URL from
          Browser's Properties.
          3. Put all the MS Word Documents in the secure directory. Two layers of
          password protection is annoying, our users are complaining.
          How Can We Improve:
          1. Could we set content type to "application/msword"? and present these
          sensitive MS Word documents directly thru JSP, then each embedded hyperlink
          is JSP presenting these Word files.
          If this is doable, how to include MS Word in JSP?
          2. Is there a better way to achieve this?
          Thanks,
          Willy Jair
          [email protected]
          

You can use iText (its open source) to generate rtf-files which can be read by Word.

Similar Messages

  • Extract words from JSP into text file

    Hi,
    I have a big problem:
    I want to extract selected words from a jsp file.
    Following are found in one of my jsp file:
    E.g.
    1) <td width="217"><font face="verdana,arial" size=2>ORGANISATION UNIT NAME<font color="#FF0000"> <font
    id="fontMandatory">*</font></font>
    I want to retrieve "ORGANISATION UNIT NAME"
    2)errPrompt(frm.txtDesc, "Maximum length is just 100 character only");
    I want to retrieve "Maximum length is just 100 character only"
    I try String tokenising, then check that is the token ends with ">", then the next token is the one
    I want, then loop until "<" is found. BUT this would not work as there is no spacing between some of
    the tags and the words.(e.g. <p>abc)--> This cauese the whole token to be <p>abc, so the "abc" will
    not be extracted as it does not have a "ends with >" in front of it.
    Even with using ">" as a checking does not work for pop up messages, as it does not have tags(refer
    to e.g 2).
    Please reply a.s.a.p...
    Really urgent!!
    Thank You
    Michelle

    for extracting the HTML tags, u can use DOM/DHTML
    I dont remember the syntxes, how to use, but i know that it is possible, just go thru' the DOM/DHTML
    Regards,
    Ritesh

  • Microsoft Word from JSP

    Hi geeks! help me out..
    How can u create a MS Word document from JSP?
    I am developing an application which takes in large user data.I want it to be saved in ".doc" format at the server side.
    Please help me
    Alternate solutions will also help!
    javed p m

    Take a look to this :
    http://www.must.de/default.html?Javactp.htm
    you can also create a RTF and PDF document using the iText excellent free API at : http://www.lowagie.com/iText/
    regards

  • How to generate Word document from JSP ?

    Hi,
    I want to generate Word documnet from JSP. I am using Neva objects to generate Word document. Now my problem is Word doc generation code works alright as a Java application but when I place that piece of code in a JSP bean it throws an exception. The reason seems to be unavailibility of DLLs and other files of Neva in Tomcat environment. I do not want to use other complex packages like JIntegra, I would prefer any freeware solution. There is not much info. about Word document generation on POI project in Jakarta site.
    Could anyone suggest way out ? Any Java examples doing the same would be of great help.
    Thanks,
    Akash

    Hi Saurabh,
    Thanks for the reply.
    I have tried that too. Problem with that solution is that if you have used CSS in your JSP code MS word does not understand it and generates word doc which is not the same as HTML which JSP otherwise would have generated.
    Akash

  • How to call cystal report8 report file from jsp page

    hi guys
    present i am using cystal report8 already i am having ReportViewer.jar and ReportviewerBean.jar files
    using that please send me sample code how to call that report from jsp page..
    and how to pass the parameters from jsp page to crystalreport8 report file.
    it was very urgent task to me..so please send sample code on above topic..
    or send me crystalreport8 API
    thanks
    regards

    Hi,
    I also want to work on crystal report but i dont have the ReportViewerBean.jar and ReportViewer.jar. So, please tell from where will i get those jar files.
    Thanks in advanced.

  • How to call custom Login Module from JSP

    Hi,
    I am stuck with the following issue:
    1) Exactly as presented in help.sap.com (http://help.sap.com/saphelp_nw04/helpdata/en/3f/1be040e136742ae10000000a155106/content.htm) I created custom login module and deployed it as a library on J2EE server. When I configured it to be used for my applications in the Security provider but I am getting "No user name provided" exception everytime when my applications use this custom login module.
    2) I realized that I would need to call my custom module somewhere within my application (simple JSP) using LoginContext class and then use MyLoginContext.login() spec to initiate login process. But I am not able to pass CallbackHandler parameters from JSP application to my custom login module.
    So I have the following questions:
    1. Can I pass parameters using LoginContext and CallbackHandler from JSP to my custom login module (created as exact copy of HELP.SAP.COM example) or this module cannot be used this way.
    2. How to pass CallbackHandler correctly to my custom login module from JSP. When I am trying to use CallbackHandler, I am getting "Abstract Class cannot be called" error.
    I'd appreciate any little help on this matter.
    Thanks and regards,
    Mike

    You have two alternatives to do this:
    You can declare your JSP as a protected resource with the use of the deployment descriptors of the application (web.xml) and add the custom login module in the authentication stack of the application. This way, you will use container-based authentication, i.e. the Web Container will enforce the authentication and it will call the custom login module before it dispatches to the JSP. I recommend you this approach because it requires less coding and it makes the whole thing a matter of configuration. The configuration can be later on enhanced or changed runtime without the need to re-build and re-deploy the application. If you choose this approach you can go to the documentation of the server for help on how to modify the login module stack of the application.
    You can also use programmatic authentication by using JAAS API. To do this you need to create a custom security policy configuration with login module stack containing the custom login module, and then use the standard JAAS mechanism - new LoginContext(<configuration>, <callback-handler>).login(). This approach requires that you write your own callback handler and handle any LoginException.
    Let us know which approach you prefer and whether you have difficulties implementing it!

  • Exporting from JSP into PowerPoint or an Image file

    I am having a JSP file, the data from which need to be exported into a PowerPoint presentation. Can you suggest me some code examples of exporting the data from JSP to PowerPoint or rather to an image (.gif or .jpg), this image file can then be inserted into the PowerPoint.
    I tried exporting to Excel and from there Copy+Paste but this leaves a chance of modifying the data, the other option I used was exporting the data into a .pdf file, but we are currently having Acrobat Reader 4.0 in which there is no Graphic selection tool unless I use the full version.
    My first preference is to export the data into PowerPoint or if that does not work then into an image file.
    Would be helpful if you have some code examples to look at or if you can guide to some useful sites that can help me in achieving this.
    Thanks in advance...

    For exporting the data into .ppt files try the following.
    Set the content type for the jsp as "application/ms-powerpoint"
    and whatever HTML u have would be sent to the ppt.

  • To display consecutive words from an array on a keypress. Event listeners not working.

    I need to display a series of words consecutively on a black background. A new word presented each time the Enter key is pressed (It is necessary that its the same key each time i.e the Enter Key). The words are arranged in an array. I have created a function for each Keypress and a listener. Also, as the previous word is replaced by the next, I have a removeChild() to get rid of the the last word.
    I have a removeEventListener set up also, to avoid any problems with the listeners. I have been at this a long time without sucess. It must be a listener problem (i.e I have not got the listeners focussed properly?) or a display problem. It only ever displays one word. Please see below code for the display of two of the words from the array which is called cvcwords. The main problem is that the words do not display one after the other (indeed not at all, except for the first one) when the enter key is pressed. Very much as a powerpoint presentation would, thats the idea anyway. I have just a sample of the code below. any help appreciated.
    var cvcwords : Array = ["bad", "mod", "hud", "mit", "sat", "fog", "puc",];
    this.stage.addEventListener(KeyboardEvent.KEY_DOWN, modKeyDown);
                                  function modKeyDown(e : KeyboardEvent) : void {
                                            if (e.keyCode == Keyboard.ENTER) {
                                                      removeChild(myText);               // to remove previous word from screen
                                                      myText.text = cvcwords[1];        //to display element one of the array
                                                      addChild(myText);
                                            } else if (e.keyCode == Keyboard.SPACE) { //this is for another seperate option
                                                      myText.text = "try again";
                                                      addChild(myText);
                   this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, modKeyDown);
                                  this.stage.addEventListener(KeyboardEvent.KEY_DOWN, hudKeyDown);
                                  function hudKeyDown(e : KeyboardEvent) : void {
                                            if (e.keyCode == Keyboard.ENTER) {
                                                      removeChild(myText);  //to remove previous word from the screen      
                                                      myText.text = cvcwords[2];
                                                      addChild(myText);
                                            } else if (e.keyCode == Keyboard.SPACE) {
                                                      myText.text = "do again";
                                                      addChild(myText);
                   this.stage.removeEventListener(KeyboardEvent.KEY_DOWN, hudKeyDown);

    Based on what I see of your code, the following is all you might need...
    var cvcwords : Array = ["bad", "mod", "hud", "mit", "sat", "fog", "puc",];
    var counter:int = 0;
    stage.addEventListener(KeyboardEvent.KEY_DOWN, modKeyDown);
    function modKeyDown(e : KeyboardEvent) : void {
        if (e.keyCode == Keyboard.ENTER) {
            myText.text = cvcwords[counter];      
            counter++;
        } else if (e.keyCode == Keyboard.SPACE) {
            myText.text = "try again";
            addChild(myText);
            stage.removeEventListener(KeyboardEvent.KEY_DOWN, modKeyDown);
    When you test this in Flash, in the player you need to be sure to select the Diable Keyboard Shortcuts option found under the Control option in the top toolbar
    If you really mean to have them try again, you probably do not want to remove the event listener

  • How to make SOAP call from jsp

    how can i make a SOAP call from JSP.
    I'm new to this.
    This is my requirement
    After the user logs in i need to make a soap call to a given url.
    i need to fill two values in the xml. i have the value with me.

    Although you could do it, why would you put this kind of logic into a presentation file like JSP? It depends on the API you want to use:
    Try this one:
    https://jax-ws.dev.java.net/
    MeTitus

  • Text auto-correct grabbing words from gmail / etc.

    I'm not sure if this is a Gingerbread issue, but this is a problem that I was introduced to when I got my Xperia PLAY. 
    The on-screen QWERTY keyboard lends itself to frequent typos.  Since I started using the Xperia, the auto-correct dictionary has been automatically synced and populated with various words that it apparently grabbed out of my gmail, email, contacts, address book, or elsewhere.   This includes names, segments of email addresses, already misspelled words, etc.  
    This has made the auto-correct function useless on my phone, and makes text messaging a convoluted and futile chore that' I'd simply rather not do.   
    For example, when I'm trying to send a text to someone asking them, "what time?"  -- I commonly typo "time" as "timr."  
    Now, auto-correct on my Xperia always wants to change "timr" into "TimeBomb4321" -- which is a segment of an email address out of my address book.   
    And, there's apparently no way to turn this off.   
    There's no way to toggle this under "Accounts & sync."    
    "User Dictionary" under Settings only includes words that I have manually added to it.    
    HOW DO I FIX THIS??? 

    Hi chuckk,
    I understand the importance of having a streamlined text experience.  I would suggest deleting some of the auto-saved words from the dictionary. Settings>Language & Keyboard>User Dictionary.  Press on hold the word you no longer want and the select delete.  I am hopeful this information is helpful.  Please let me know if you need further assistance.
    Thank you for your contribution to our community forums,

  • Values from JSP to Struts Action Class

    Dear All,
    Am working on a small struts project, i want to get values from JSP in the Action class, i tried with sending variables using request through URL, it works fine, any other way is there to send the values from JSP to action class. Am not having any input fields in the JSP.I have links.
    Thanks,
    vyrav.

    I have a dispatch action for that am calling the action like this viewfiles.do?parameter=edit, and i have to send a variable ID from the same page, so am doing like this through java script, viewfiles.do?parameter=edit&id=10. Am able to get the id in the dispatch action edit, but when i start tomcat with security manager its not calling the action itself and its giving accesscontrol exception, but when i directly type viewfiles.do in URL its calling the action.
    I dont know wats the problem, tomcat security manager not allowing this. Please help me.
    Thanks,
    vyrav.

  • How to get an ArrayList Object in servlet from JSP?

    How to get an ArrayList Object in servlet from JSP?
    hi all
    please give the solution for this without using session and application...
    In test1.jsp file
    i am setting values for my setter methods using <jsp:usebean> <jsp:setproperty> tags as shown below.
    After that i am adding the usebean object to array list, then using request.setAttribute("arraylist object")
    ---------Code----------
    <jsp:useBean id="payment" class="com.common.PaymentHandler" scope="request" />
    <jsp:setProperty name="payment" property="strCreditCardNo" param="creditCardNumber" />
    <%-- <jsp:setProperty name="payment" property="iCsc" param="securityCode" /> --%>
    <jsp:setProperty name="payment" property="strDate" param="expirationDate" />
    <jsp:setProperty name="payment" property="strCardType" param="creditCardType" />
    <%--<jsp:setProperty name="payment" property="cDeactivate" param="deactivateBox" />
    <jsp:setProperty name="payment" property="fAmount" param="depositAmt" />
    <jsp:setProperty name="payment" property="fAmount" param="totalAmtDue" /> --%>
    <jsp:useBean id="lis" class="java.util.ArrayList" scope="request">
    <%
    lis.add(payment);
    %>
    </jsp:useBean>
    <%
    request.setAttribute("lis1",lis);
    %>
    -----------Code in JSP-----------------
    In testServlet.java
    i tried to get the arraylist object in servlet using request.getAttribute
    But I unable to get that arrayObject in servlet.....
    So if any one help me out in this, it will be very helpfull to me..
    Thanks in Advance
    Edward

    Hi,
    Im also facing the similar problen
    pls anybody help..
    thax in advance....
    Litty

  • Launching a Discoverer report from jsp page

    Hi
    I have a discoverer workbook created using BI Discoverer (for relational). I want to accept some parameters for this workbook from a jsp page, which will also have a "View report" button. This button when pressed should open up the Discoverer workbook and all the parameters from the jsp should be passed to the workbook.
    Is it possible? If yes, any details on it?
    We do the same thing successfully to launch Oracle Reports from jsps, we simply build the url in the jsp, and from jsp we submit it to a new window, and it opens up the report. Similar functionality we are looking to launch Discoverer reports.
    Any help will be appreciated.
    Thanks
    Shalu

    You can open the workbook with URL parameters with Discoverer Viewer much like you would Oracle Reports. Setting anything form the username, password, workbook name, worksheet, and parameters. All the information can be found in the following document:
    http://download-east.oracle.com/docs/cd/B14099_11/bi.1012/b13918/urlstart.htm
    The specific question your asking is addressed under 13.5.2 Example 2. Let me know if you have any issues
    Matt Topper
    Technical Management Consultant
    TUSC, The Oracle Experts
    [email protected]

  • How to call Crystal Reports10 from JSP?

    Hi!
    I want to generate a crystal report based on the parameters from database which in turn will be taken from jsp page.Can anybody help me on this?
    Thanks in advance!

    http://www.businessobjects.com/products/dev_zone/java/default.asp?ref=devzone_main
    Check their top 5 java downloads for documentation on how it works.

  • How to call servlet from jsp

    i m trying to call it from jsp using
    <a href="../purchaseP?orderno=<%=pno%>"><%=pno%></a>
    but its giving error..
    type Status report
    message HTTP method GET is not supported by this URL
    description The specified HTTP method is not allowed for the requested resource (HTTP method GET is not supported by this URL).

    i m trying to call it from jsp using
    <a href="../purchaseP?orderno=<%=pno%>"><%=pno%></a>
    but its giving error..
    type Status report
    message HTTP method GET is not supported by this URL
    description The specified HTTP method is not allowed
    for the requested resource (HTTP method GET is not
    supported by this URL).Are you implementing the doGet or doPost method in your servlet? If you are calling from a hyperlink then it needs to be implementing the GET method. To access the POST method use a html form.

Maybe you are looking for

  • How to connect Airport Time Capsule to WD Live TV

    I recently bought an Airport Time Capsule with 2tb storage. I am wanting to access the media files I save to the Time Capsule on my WD TV Live. I have tried doing wirelessly and it works but if I shut my computer it disconnects and wont automatically

  • Logical Standby Database and XMLDB

    I couldn't find a proper group to post this message and thought I would try here. I want to set up a Logical Standby Database for our production database server 9.2.0.4.0 with XMLDB. I am having problem with some system tables that were created when

  • Can you snap a picture of the screen when on Facetime?

    I was on a video call with my daughter via FaceTime from my iPad to her MacAir and I wanted to take a picture of her and my Grandson as seen on the iPad screen.  Is there a way to do this?  I know it is possible when using Skype on a PC with a Webcam

  • Strange trackpad

    Hi everyone have a little problem with my trackpad, would be nice if you could help me. my trackpad is not working, but in a strange way. i can move the little arrow as I like to, but the active corners nor the dock are reacting, neither can I click

  • Home sharing, more tab not displaying? iOS8

    Hi everyone, I am trying to share from iTunes 11 on my mac running 10.9.5 to my iPad3 running iOS8. I have turned on home sharing on Mac and Sharing was already on on my iPad. When I launch the Music app, the only buttons I have at the bottom of the