Capturing the output from jsp selvlet

          Hi,
          I have a requirement where I need to capture the output of the JSP generated servlet
          , and do something with it before it get's to the client side.
          Has someone done something like this before.Any ideas, suggestions .
          Thanx,
          Tajdar
          

You can set the MIME content type as .doc and try to open the Page.
res.setContentType("application/vnd.ms-excel"); to generate the Page output as Excel
res.setContentType("application/vnd.ms-word"); to generate the Page output as MS Word doc
Hope this helps..

Similar Messages

  • How to capture the data from a JSP form

    Hi
    I have a JSP form, My task is to capture the data from a JSP and submit to Data Base. for example I have the field like
    Enter Table name to be created in data base: The table name is to be captured by a servlet and by that table name, table should be created in the data base.
    Edited by: Reddy_Prasad on ?? ?????, ???? ?:?? ???????
    Edited by: Reddy_Prasad on ?? ?????, ???? ?:?? ???????

    Get the entered value from the jsp into servlet using request.getParameter("enteredTableName"). it will return the String,pass this table name to execute query using JDBC connection and statement objects.
    -cheers Ram

  • Capturing the output of a jsp page and save that output in a WORD .doc file

    Hi,
    This is Naveen. I got stuck up with a problem/doubt. URGENT ! URGENT !
    My doubt is how to capture the output of a jsp page(the content is dynamic generated) and save that output to a MS-Word doc file.
    I know that therez an option of using Servlets Filters, but this concept is supported by Servlet 2.3 spec. and not earlier. And we are working on previous spec. and our web-servers also supports the prev. version and not the 2.3 version.
    If incase, therez a third-party utility for free usage, suggestions are appreciated.
    Hope most of them came across this kind of functional requirement. If anyone of them succeeded in this, please express ur bitter experience if any, faced during the coding.
    Thanks in Advance for help.
    Naveen

    You can set the MIME content type as .doc and try to open the Page.
    res.setContentType("application/vnd.ms-excel"); to generate the Page output as Excel
    res.setContentType("application/vnd.ms-word"); to generate the Page output as MS Word doc
    Hope this helps..

  • How to capture graphical outputs from other programs

    Does anyone know how we capture the graphical outputs from the other programs and show them
    on the swing?
    I'd like to use a java program to run gnuplot, capture the outputs, and show them using swing.

    Depends on what you mean by "graphic outputs".
    Taking a quick glance at the gnuplot homepage, it looks as if you can output to PNG files, so just run the app, and load the png file.

  • Reading the output from a object running in the local machine.

    Reading the output from a object running in the local machine.
    By using a signed applet i am lunching a small application that returns an image object, how to read that without storing it in the hard disk.
    Which means i need to read the image object return by the local application using applet or jsp .
    i am using tomacat and an html page with an applet with it to lunch the application.

    You can write that image in a binary format using OutputStream for System.out and then read it in your applet.

  • Capturing the output of a os command line

    I need to capture the output of a os command line executed from one java program and I don't know how can do it.
    For example:
    Runtime.getRuntime().exec("hostid");

    Your suggestion worked very well, just in case that this could interest somebody, this is the complete solution
    Thanks for your help
    import java.io.*;
    public class HostID
    public static void main(String args[]){
    try{
    InputStream in = (Runtime.getRuntime().exec("hostid")).getInputStream();
    byte[] arreglo= new byte[200];
    int cantidad = in.read(arreglo);
    System.out.println(new String(arreglo,0,cantidad));
    } catch (IOException ioe){System.out.println(ioe.getMessage());}
    }

  • I am trying to display the output from my ipod touch on apple tv. i can get the audio but no video. please help

    i am trying to display the output from my ipod touch on apple tv. i can get the audio but no video. Thank you for any advice.

    What output are you trying to get to your tv?

  • Getting the output from a Perl script using Runtime.exec

    I cannot get the output from a perl script using Java. Can someone PLEASE help?
    I used the following code:
    Process p = Runtime.getRuntime().exec("C:\\Perl\\bin\\Perl.exe script.pl) ;
    InputSream in = p.getInputStream();
    b...
    do
    System.out.println(b);
    while ((b = in.read()) > 0)
    But there is no way that I get the output in the inputstream. If I use the command "cmd script.pl", the output is displayed in the Dos box, but also not in the inputstream.
    I will appreciate any help.

    Try this
    Process p = Runtime.getRuntime().exec("C:\\Perl\\bin\\Perl.exe script.pl) ;
    BufferedReader rd = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String str;
    while((str=rd.readLine())!=null){
    System.out.println(str);
    Manu

  • Is it Possible to upload the output from Oracle reports To Access database

    Hi All,
    Wish you All a Very Happy New Year.
    I have a query.Is it possible to
    upload the output from the Oracle reports
    to the Access database???
    Any suggestions would be appreciated.
    TIA
    sg

    Hi sg,
    Research the DDE option.
    Dynamic Data Exchange (DDE) is a mechanism by which applications can communicate and exchange data in Windows.
    I have imported data into the excel spreadsheet using DDE built in functions. I am sure it can work with MS Acess as well. If not, then you need to create a 2 step process .. reports -> excel -> access.

  • How to capture the output of another program into a File/String

    I needed to capture the output of a dos program in an String/file I tried doing Runtime.getRuntime.exec("ipconfig /all >tmp.txt");
    but still I am unable to capture the output frm the program which I would like to capture in a file or String.Can anyone help

    When you use the Runtime.exec() method, it returns a Process object, that process object has access to the streams; stdout, stdin, and stderr of the application you just executed. what you'll want to monitor is the stdout or stderr streams using the
    p.getInputStream() or p.getErrorStream(), where p = the process object returned via the Runtime.exe() method.

  • Can I capture the video from the TV card or video capture card to publish

    Can I capture the video from the TV card or video capture card to publish?
    I tried to use the USB camera, it's OK. But, will the TV card or video capture card also work?

    Hi,
    iChat will set up a Video chat window that takes in to account your Processor speed and Internet Speed and to some extent the Buddy's speed.
    This then denotes the pixel content of each frame.
    OS X 10.6.x tells me this is iChat 5 which in turn mean you have  at least an Intel Core 2 Duo Processor.
    This should be capable of 30 frames a sec at  about 640 X 480 pixels  (Check the Connection Doctor (Video Menu) and the Statistics tab during a Chat).
    iChat 5 cannot do HD  (Max of 4:3 ratio at the above figures)
    After that it depends how you are recording the chat.
    Quicktime X would do it.
    iChat will do it itself (if the Buddy agrees)
    10:14 PM      Wednesday; February 1, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Lion 10.7.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Openshot + Blender: No frame was found in the Output from Blender

    Can't get this to work. Anyone know why?
    Using  OpenShot version 1.4.0
    blender -v
    Blender 2.61 (sub 0)
    build date: 2012-01-05
    build time: 10:31:02
    build revision: unknown
    build platform: Linux
    build type: Release
    build c flags: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -fopenmp -msse2 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -Wall -Wcast-align -Werror=declaration-after-statement -Werror=implicit-function-declaration -Werror=return-type -Wstrict-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wno-error=unused-but-set-variable
    build c++ flags: -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -D__STDC_CONSTANT_MACROS -fopenmp -msse2 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -Wall -Wno-invalid-offsetof -Wno-sign-compare
    build link flags: -pthread
    build system: CMake
    Blender command: blender -b '/usr/lib/python2.7/site-packages/openshot/blender/blend/blur.blend' -P '/home/user/.openshot/blender/fdd1c574-44dd-11e1-bf0d-54e6fc88c972/blur.py'
    Traceback (most recent call last):
    File "/home/user/.openshot/blender/fdd1c574-44dd-11e1-bf0d-54e6fc88c972/blur.py", line 150, in <module>
    bpy.context.scene.render.file_format = params["file_format"]
    AttributeError: 'RenderSettings' object has no attribute 'file_format'
    No frame was found in the output from Blender
    Blender render thread finished
    Last edited by whoops (2012-01-22 09:47:37)

    yes, that is correct that it crashes with the new code when i have both made it a separate library function node and when i incorporated it into an existing code.  the odd thing is that it actually seems to work now.  i believe that i was using the wrong environment to call the new codes, which is why whenever i tried to revert to the original code previously, it still crashed.  it seems that in order to be called, i need to use Deployment rather than Development and ppc instead of i386 in the active configuration and architecture in Xcode, respectively.  while playing around with the iphone app, it must have reset my defaults to a non-labview friendly form.  so now that i've got that part of the code working, i need to find out why it's still crashing on me.  at first, i thought it must be the random number generator, but testing that separately in the code works just fine, so there must be something internal in the code.  probably a memory allocation fault.  but now that i can actually get everything running once more, i should be able to sort that issue out myself.
    thank you very much for the help.  sorry i didn't actually have anything to fix, unfortunately.  i'm going to spend some time trying to debug this section of code to find where the fault lays.  i may come back if i cannot find it in there, but hopefully it will not come to that.
    take care and many thanks,
    justin 

  • How to change the path of sysprep files that were copied to reference computer when i capture the image from reference.

    Dears ,,
    how to change the path that sysprep were copied to reference computer when i capture the image from reference.
    Should i modify some codes in LTIAPPLY.wsf? how to modify it?
    Thanks.

    Sysprep and capture has *Three* steps.
    1. Run sysprep on the local machine (easy).
    2. Copy WinPE down to the local machine so we can reboot into winpe for capture.
    3. Capture the drive in an *offline* state from within WinPE.
    What is most likely happening is that you are having problems with step #2. 100MB is *WAY* too small to copy down WinPE. By default MDT will make this System partition much bigger, 499MB. IF you install Windows 7 from the default media. IT will only create
    a 100MB partition.
    By default MDT 2012 Update 1 and greater *should* recover to a fallback drive with the OS on it, however if you are running older versions that might not happen correctly.
    If you are still having problems, copy your BDD.log file to a public share like OneDrive and copy the link here.
    Keith Garner - keithga.wordpress.com

  • HT1695 IPhone 4 could not capture remote Wi-Fi but can capture the network from close range to Ataatjos meter

    IPhone 4 could not capture remote Wi-Fi but can capture the network from close range to Ataatjos meter

    I tried the process and was happy to note that there was some process that I managed to start because the process did start ...
    However to my disappointment,  landed back at the same status which says
    We're sorry, we are unable to continue with your activation at this time.
    Please try again later, or contact customer care
    I was using a GEVEY sim unlock with iOS 4.1 since (almost) last 2 yrs now in India on Vodafone. But as Apple designed it, there were several apps including Whatsapp, Facebook, Gmail and LinkedIn that stopped functioning due to the iOS updates and the subsequent (I guess 'mandatory' App updates). Finally yesterday I thought of updating to the iOS 6. As soon as I did that, I have been left with no choice but to see the above message.
    The process by jhidrowoh starts corectly but iTunes doesnt give you the option of restore only ... it is forcefully clubbed with update and the button that is displayed in the dialog box that appears on pressing 'Restore' in teh recovery mode, shows 'Restore and Update' and as soon as the iPhone is restored, it automatically updates the iOS as well to iOS 6 and hence leaves you hanging in the stale situation.
    Guys ... Need the data desperately ... Can anybody please help???

  • Need to fetch results as the output from QGA2

    Hi Gurus,
    My scenario is that i need to develop an interface in which I would send Material,Plant,MIC and Period from one system to SAP R/3 and I need to fetch the output as I get the output from QGA2 while i enter the above mentioned fields.
    Input: Material,Plant,MIC and Period
    Output:
    1) Inspection Start Date
    2) Inspection Lot number
    3) Material
    4) Material Description
    5) UD code and code group
    6) Quality Score( at inspection lot level)
    7) UD code text
    8) Valuation of characterstic
    9) System Status of lot
    10) Characterstcic description
    11) Operation Number at which charaterstic was inspected
    12) Characterstic Number inspected
    Please let me know any BADI or FM which could help me in fetching out these values as standard QGA2 transaction does fetch out these values.
    Thanks

    hi
    Please check
    BAPI_INSPCHAR_GETREQUIREMENTS
    BAPI_INSPCHAR_GETRESULT
    BAPI Modify result lot inspection
    Regards
    Sujit

Maybe you are looking for

  • Can I convert to a higher bitrate AAC file for purchased iTunes music?

    I don't like that the 99 cent download I purchased can't be switched to a different audio filetype. Is there a way I can at least convert to a higher bitrate (128 kbps up to 320 kbps instead?)

  • Java.lang.LinkageError while deploying.

    Hello All, I am working on an application which runs on jboss and while deploying I come accross the below error. 09:55:37,607 ERROR [[ehaweb]] Servlet.service() for servlet ehaweb threw exception java.lang.LinkageError: loader constraint violation:

  • T/X power malfunction

    My T/X will not turn on.  I have tried to charge it multiple ways without success.  I have done both a soft and hard reset without success.  I think my battery is dead.  Any suggestions?  I need to back up my data and not sure how to do this without

  • Variables -  Sap business one

    Hi I have a print layout design form designed by someone else.  I would like to modify it and have noticed that it uses a variable number for one of the fields.  How can i tell what the variable definition is for this variable? thankyou

  • The question about the service fee

    I went to the apple store and I got an apple iphone replacement so what does this mean?(flat rate repair retail-int) and how much should i pay that ??