Save servlet html output as jpeg.

Hello everybody,
I have a servlet that creates an html page.
The html consits of information from a database and displays a data sheet with images and text.
I have been asked if the outputed data sheet can be saved as an image (jpeg).
Is this possible?
Thanks.

I am can of confused how this works
I know that there is more to do in order to create an
image.First you have to make a desition, what do you need?
* if you only want to save a data sheet i think the better solution is a Excel format file, for this yo coul take a look at http://jakarta.apache.org/poi/hssf/index.html
* if you want to generate a pdf with images, tables, etc. yo should take a look at http://xml.apache.org/fop/
* if you want to create a custom image i cant help you
the proces to generate excel isnt dificult but to make a pdf is a little hard. but if you read the documentation and the examples you shouldnt have problems
Jorge

Similar Messages

  • UNABLE TO SAVE PORTAL REPORTS OUTPUT TO DISK WHEN USING INTERNET EXPLORER

    Hi,
    We are unable to save portal reports output to disk when we are using
    Internet Explorer. This works fine if we use Netscape.
    Steps to reproduce
    1. Run a report from portal
    2. Now from the IE menu, select File-> Save As
    We get a warning saying that IE cannot save the web page
    Any thoughts ?
    Thanks
    Tim

    Tim,
    Are you trying to save the HTML output ? You might encounter probs. with that, but that is more due to IE security
    settings than the Portal.
    You might want to check your IE security settings.
    Hi,
    We are unable to save portal reports output to disk when we are using
    Internet Explorer. This works fine if we use Netscape.
    Steps to reproduce
    1. Run a report from portal
    2. Now from the IE menu, select File-> Save As
    We get a warning saying that IE cannot save the web page
    Any thoughts ?
    Thanks
    Tim

  • Customizing Cp HTML output

    I'm looking for a little assistance regarding the best way to insert an HTML + Flash wrapper around the wrapper that is automatically generated by Cp4 in its HTML output. I'm a FL newbie/intermediate DW user, and I don't want to screw up the existing scripting in the HTML template files.
    So I guess my question really surrounds best practice for adding a header/footer/maybe rt-or-left nav frame around the content that CP produces. Would anyone who has done this be willing to share some code (stripped of your content, if you prefer) that might help me achieve this?
    Or, if I'm thinking about this in entirely the wrong way, can someone point me in the right direction? I feel like I'm being particularly dense about this!
    Thanks in advance!!
    A. Stringer

    Hello Brian and Marcel:
    I have the same question as you did. Did you get any further
    information about this? I am dying for a solution. If anybody
    has a solution, please share with us. Thanks.
    Brian Lin (guest) wrote:
    : Hi all,
    : Marcel, I got the same questions (problems) with you did. I
    have
    : been searching this topic for long time, still I can not have
    : right materials. Recently AMAZON (www.amazon.com) will have
    : Oracle JDeveloper 2.0 (ISBN: 0072120983) on the market, but
    I'm
    : not sure what's the contents inside talking about DBServlet.
    : Good luck!
    : Brian Lin
    : Marcel Sansaricq (guest) wrote:
    : : Hi everyone,
    : : I am a new user of JDeveloper 2.0. I have been trying to
    : : understand how JDeveloper's Wizard generated Database
    Servlets
    : : generate standard HTML pages for Querying, Updating,
    inserting
    : : database records. The InitializeDBServlet method that is
    : : generated by the DBServlet Wizard provides very little
    insight
    : : into the HTML generation engine.
    : : The JDeveloper documentation gives some hints on customizing
    : : Servlet HTML output in section "Creating a Custom HTML
    form".
    : : Basically, it recommends to use
    : : methods provided in oracle.jdeveloper.servlet.DBServlet,
    : : oracle.jdeveloper.servlet.UserSession,
    : : oracle.jbo.rt.cs.RowIterator and oracle.jbo.rt.cs.Row
    : interfaces
    : : to implement custom HTML forms that servlets can generate.
    : : The documentation files for oracle.jbo.rt.cs.* interfaces
    are
    : : missing within the JDeveloper help menu and coverage on
    : : oracle.jdeveloper.servlet.DBServlet,
    : : oracle.jdeveloper.servlet.UserSession is very basic.
    : : Can anyone point me in the right direction to get thorough
    : : documentation, containing examples if possible, on the
    : mentionned
    : : interfaces.
    : : Thanks in advance,
    : : Marcel Sansaricq
    null

  • Help: No Parameters, HTML Output from Java Servlet

    I have a Java Servlet that reads parameters passed from an HTML form and displays them to another HTML page. I know the servlet is being invoked; however, I am not seeing any HTML output. Sending the output to a file reveals the parameters are coming in as NULL as well.
    I attempted a simple sample app with the same results. Here is what I am running:
    The HTML Form:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE>Collecting Three Parameters</TITLE>
    </HEAD>
    <BODY BGCOLOR="#FDF5E6">
    <H1 ALIGN="CENTER">Collecting Three Parameters</H1>
    <FORM ACTION="ThreeParams">
    First Parameter: <INPUT TYPE="TEXT" NAME="param1"><BR>
    Second Parameter: <INPUT TYPE="TEXT" NAME="param2"><BR>
    Third Parameter: <INPUT TYPE="TEXT" NAME="param3"><BR>
    <CENTER><INPUT TYPE="SUBMIT"></CENTER>
    </FORM>
    </BODY>
    </HTML>
    The Java Code:
    public class ThreeParams extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String title = "Reading Three Request Parameters";
    out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
         "Transitional//EN\">\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1 ALIGN=\"CENTER\">" + title + "</H1>\n" +
    "<UL>\n" +
    " <LI><B>param1</B>: "
    + request.getParameter("param1") + "\n" +
    " <LI><B>param2</B>: "
    + request.getParameter("param2") + "\n" +
    " <LI><B>param3</B>: "
    + request.getParameter("param3") + "\n" +
    "</UL>\n" +
    "</BODY></HTML>");
    What happens when I "submit" from the form is the same form reloads with the query string in the URL: "http://localhost:8080/ThreeParams/?param1=1&param2=2&param3=3"
    Any assistance with either (or both) would be thoroughly appreciated:
    a) why the parameters are not being passed correctly to the servlet
    b) why the HTML output page is not displayed
    Thanks in advance!
    - Steve

    I have found the answer to my problem listed in another thread.
    Thank you.

  • How to format html output of a servlet

    Hello.
    My servlet/JSP is processed by custom tags and XSL Translation.
    After all its HTML output looks not formatted.
    How to format it?
    It is possible in a standard way (using a web.xml'd directive)?
    What roughly I want:
    <html>
      <body>
      <body>
    <html>

    I'd try
    indent="yes" in your XSLT's<xsl:output .../>element.
    Hope this helps,
    -Scott

  • Save html output generated by portal

    Hi,
    How can I save html output from portal
    with UTL_FILE or something else?
    I would like to save html output generated from portal pages to a static html page
    Thanks in advance.
    Anton

    I may misunderstand your question, but how about File > Save from your browser?
    Or do you want to automate this process? There are all kinds of tools out there that you can use; wget comes to my mind right now.
    Peter

  • Can SQL Developer be used for Oracle Support "HTML Output" Diag Scripts ?

    Hi All,
    Oracle Support has asked me to run a diagnostic script (OTL_Diag.sql for anyone familar with the script) that produces output in HTML format using SQL*Plus to help troubleshoot an OTL problem we are having. Unfortunately I don't have SQL*Plus installed and my company is not on board with me installing it because of the SQL*NET connection required. Instead I have access to SQL Developer 3.1.0.7. While this works fine for most situations I'm having problems generating the required .html output file that Support needs.
    I've tried runing the OTL_Diag.sql a couple of ways using SQL Developer. First, I opened the file from SQL Developer and using the Run Script functionality (F5) I executed the code that way. This method did give me an opportunity to input the necessary parms and it did create the 'start' of the HTML file on my (Windows) file system, but the script seemed to abort with a java error that indicated some sort of format error (sorry, I'm not a java person so I can't provide any more info, but I'll be glad to get the exact error message if anyone thinks that will help solve my issue).
    My second approach was to open a SQL Window where I typed in @C:\OTL_Diag.sql without quotes. This approach also gave me the opportunity to enter the necessary input parms and it seemed to end normally. It also created the 'start' of the diaganostic output file on my Windows file system, but it 'completed' before any of the 'real' diaganostic output was written to the .html file.
    The Metalink note clearly specifies that the OTL_Diag.sql script is to be run with SQL*Plus 10.2 or above so I don't think I can complain too loudly to Oracle about this...but given that I don't have access to this product (and it is useless for me to again ask to install it) I am hoping someone out there has some ideas or insight as to how I can use SQL Developer to execute this diag script in a manner that will produce the required .html output file.
    Thanks in advance to anyone taking time to read my post !!
    Jeff
    Edited by: user13111861 on Jul 10, 2012 6:43 PM
    Edited by: user13111861 on Jul 10, 2012 7:51 PM

    >
    As a result, at this point in time my only available tool to run the OTL_Diag.sql script (provided by Oracle Support) is SQL Developer
    >
    Then you will have to edit the script, break it into pieces, execute each piece manually and save the output to feed into the next piece as required based on what the script is actually doing. Don't post the script or contents as that will likely violate your support agreement.
    As I already mentioned the script may be using syntax and/or commands that are simply not supported by sql*developer. One likely area is the script may be producing intermediate output scripts that are then processed by a later portion of the script. If that is the case then my suggestion to execute the pieces manually should work but you will need to do some trial-and-error to see.
    Even if you appear to be successful you will still have an issue when you communicate the results of your 'test' to Oracle support and they determine you didn't follow their instructions to use the proper tool.
    Sounds like your management is either ignorant or incompetent so I suggest you cover yourself by documentating the instructions from Oracle support and the direct orders you were given to disregard those instructions. No need to discuss that issue further but clearly there are resources available somewhere in the org that has the proper privileges or they wouldn't be able to maintain and support the database. If they want to pay for support they should heed their advice. Nuff said.

  • Getting question marks in html output when xml file has an mdash or rsquo

    I have a java servlet that gets an xml file out of ifs, applies
    a style sheet to it, and sends it to the browser as html.
    I have:
    DOMparser parser = new DOMParser();
    parser.parse(XmlUrl);
    The characters ampersand, greater than, less than, and
    apostrophe work fine.
    HOWEVER, When the xml file has an mdash(&#X2014) or a rsquo
    (&#x2019) in it, my html output in IE shows up with question
    marks where these characters are supposed to be.
    Does anyone know what I can do to fix this? I don't understand
    why it would work with some special characters and not others?

    UPDATE
    Compiling from command line I found out that the class definition for oracle.oats.scripting.modules.basic.api.IteratingVUserScript is missing. Do you know what .jar file contains this class?
    Thanks.
    Fede.

  • HTML output with CrystalReports Server 2008

    Hi there,
    I am thinking of evaluating the Crytsal Reports Server 2008. But basically, I just have one question about it:
    - How does the HTML output of the Crystal Reports Server look like? Can it be directly shown in a browser window?
    - Does the Crystal Reports Server offer a viewer such as the JRC? Does ther viewer also only run in a servlet or can it also be included in a web service?
    Thanks,
    Pascal

    With the Web Service SDK, you will need to have Crystal Reports Server running to use it. 
    Both the JRC and the Web Service SDK allow you to render reports in HTML; the JRC uses a built in viewer object to render the report in a web browser, whereas with the WS SDK you need to create your own viewer.
    In terms of the functionality they both employ, the Web Service SDK is very similar in nature to the Enterprise SDK and in fact uses the Enterprise SDK to perform many of its tasks, the difference being of course that requests are passed in the form of a web service to the server.  Enterprise SDK uses "managed reporting" (opens reports from the CMS database), and the JRC uses unmanaged reporting (opens reports from the file system).
    The [Developer Library|https://boc.sdn.sap.com/developer/library] is a good resource for finding tutorials and information about the SDK's available with Business Objects products.

  • Declarative security of servlet- html view changes depending upon  the role ??

              Hi All,
              There is acl for ejb methods and we can restrict roles to use certain
              methods of the bean. Now my question is that
              Is something possible in a declarative fashion so that user can have
              certain options enabled and certain disabled in the jsp/servlet output
              depending upon his role ?
              For example, let suppose we have a servlet MyServlet that creates an
              html output with some input boxes and buttons (add, modify, delete). Now
              is it possible, that ceratin user will only see modify button, some
              won't see any button, can only view the screen depending upon their role
              and verything in declarative fashion ?
              Any suggestion is welcome.
              TIA,
              Sudarson
              

    Servlet security is defined in the context of the web application containing
              the servlet, and web app security provides for the declarative protection of
              resources like servlets, jsps and html pages; so the answer is no.
              See http://e-docs.bea.com/wls/docs61///webapp/security.html
              Thanks
              Jim
              sudarson wrote:
              > Hi All,
              >
              > There is acl for ejb methods and we can restrict roles to use certain
              > methods of the bean. Now my question is that
              >
              > Is something possible in a declarative fashion so that user can have
              > certain options enabled and certain disabled in the jsp/servlet output
              > depending upon his role ?
              >
              > For example, let suppose we have a servlet MyServlet that creates an
              > html output with some input boxes and buttons (add, modify, delete). Now
              > is it possible, that ceratin user will only see modify button, some
              > won't see any button, can only view the screen depending upon their role
              > and verything in declarative fashion ?
              >
              > Any suggestion is welcome.
              >
              > TIA,
              > Sudarson
              [Reply.vcf]
              

  • How to save applet in image(gif/jpeg) format

    Hi there !
    how to save applet in image (gif/jpeg) format. i have just gone through JIMI package where serilization is there ,WHERE U CAN SORE in image format ...........can anybudy help me out.........if possible then pleeez provide me some example.
    Thanks in advan...........

    I think that is possible because i have seen some commercial applets that do that.
    -http://www.izhuk.com/painter/
    -http://www.lawrencegoetz.com/programs/signature/
    Thses two saves the image in the server since applets cant write in the host they are running. Maybe it would be possible whit JFS, i don't know.
    For now I am trying to store an image draw in the applet on my server.
    My idea now is copying the image to a buffer or something, open a connection to the server and receive the image with a perl CGI.
    There is an example with text:
    -http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html
    I want to do something similar but with an image.

  • How to save the ALV Output in diffrent formats

    Hi Experts,
    I have a requirement wherein i need to save Hierarchical ALV output in different formats such as(as per user)in
         Unconverted
         Spreadsheet
         Rich text format
         HTML format
         Copy to clipboard
    This has to be acheived by clicking a button in application toolbar.
    Can you share the CODE in detail
    Thanks & Regards,
    Ullas.

    hi Ullas
    http://abap4.tripod.com/Save_Report_Output_to_a_PDF_File.html
    award points if u think it was useful

  • Editing Save for Web output settings with script

    I'm just curious if it is possible to edit the Save for Web Output Settings in a script (Not the save for web options, but the "Edit Output Settings" in the drop down menu). I figured it would be somewhere under the .options, but I'm not finding anything.

    You can find examples here in forum.
    Here is one by Paul Riggott:
    Paul Riggott wrote:
    Here you are...
    function main(){
    if(!documents.length) return;
    var Name = app.activeDocument.name.replace(/\.[^\.]+$/, '');
    var saveFile = File(Folder.desktop + "/" + Name + ".jpg");
    if(saveFile.exists){
       if(!confirm("Overwrite existing document?")) return;
        saveFile.remove();
    SaveForWeb(saveFile,100); //change to 60 for 60%
    main();
    function SaveForWeb(saveFile,jpegQuality) {
    var sfwOptions = new ExportOptionsSaveForWeb();
       sfwOptions.format = SaveDocumentType.JPEG;
       sfwOptions.includeProfile = false;
       sfwOptions.interlaced = 0;
       sfwOptions.optimized = true;
       sfwOptions.quality = jpegQuality; //0-100
    activeDocument.exportDocument(saveFile, ExportType.SAVEFORWEB, sfwOptions);
    Have fun

  • Missing a single space in html output

    Hello to all,
    take a look at the following code copied from a View
    <% DATA: eins TYPE STRING VALUE 'ClassEins',
             zwei TYPE STRING VALUE 'ClassZwei'. %>
    <span id="Test1" class="<%=eins%> ClassZwei">test it</span>
    <span id="Test2" class="ClassEins <%=zwei%>">test it</span>
    it works fine if compression is set to NONE, but if compression is set to 1 (remove spaces) or 2 (remove spaces, CR, LF) the html output looks like this:
    <span id="Test1" class="ClassEinsClassZwei">test it</span>
    <span id="Test2" class="ClassEins ClassZwei">test it</span>
    Where is the single space? What’s wrong? Why is the first space removed, but the second isn’t?

    Thilo,
    At this stage we are not planning a kernel patch, unless your business case is really pressing. (In which case update OSS message so that rethink why nein is the right answer.) We have actually spend a number of hours to find where this is stripped (by accident), and see that the price to fix this, is very high for us. The truth is that this is a minor problem that only happens when you active the additional compression, where our first suggestion would be to just skip the compression for this page. (All of this been said, we will keep it on the toDo list, and see if can get the resources at same stage to dive into kernel development again.)
    (Just for interest, not even myself could remember where some of this code is executed. Your problem provided a nice trip down memory lane!)
    As for the back tics, they are string literals, and are space sensitive in ABAP. An example:
      CONCATENATE 'a ' 'b ' 'c ' INTO s. --> s = "abc".
      CONCATENATE `a ` `b ` `c ` INTO s. --> s = "a b c ".
    The nice thing about this is that it is now possible to write in ABAP strings that contain <b>both</b> HTML and JavaScript all in one:
      s = `<body onload="myFunc('JSparm');">`.
    We use " and ' for the HTML and JavaScript, and the ` to build the ABAP string. Makes the Java colleagues just jealous of our writing style:)
    brian

  • Safari is unable to save in HTML (source page option) offline webarchives

    Hello!
    Some years ago I made a very difficult and prolonged research: I found over 1500 web pages of medical researches and I stored it on the hard disk, using safari.
    I didn't know that its default format file is .webarchive.
    Now I have these 1500 .webarchive files and I need to use it on other PCs (also Windows and Linux systems), and they take 800 MB on my pendrive! (webarchive are bigger than imageless html files).
    I need to convert them in HTML format.
    Only 3 methods exist in the world:
    1) from terminal: textutil -convert html FILENAME.webarchive. I drag and drop 10 files a time in the webarchive window after the command string, but it converts about 5-6 files on 10: for the other it gives an error. Some files are impossible to convert using this method.
    2) WebArchive folderizer: I could drag and drop all the webarchive files on its small window: it will convert each webarchive file in a folder with the same name of the file. Then I could select all the folders, use FINDER's search function letting it find just HTML files and then move them in a folder and delete all the subfolders.
    But the HTML files extracted do not keep the original filename! This is important for me, because I need that each file must have the name of the medical research. I'll have to find (reading a list made in neooffice) the files and read them: over 1500 files, and it will need lots of time make an internal file text search method each time!
    3) Webarcher: it converts the files in .war format, not html. It is compatible with Windows, but it keeps the images, like a webarchive, and the space requied is high too.
    The method that I could use is this:
    Open the file with Safari in OSX, and re-save it in the "source page" (HTML) format... but.... SURPRISE!!!
    If I open a web-page with Safari, and I choose "save as...", it let me choose the format (html or webarchive).
    If I open a hard disk stored page with Safari, and I choose "save as...", the small menu in which I should choice the format... disappears!!!
    This happened years ago... now the OS X is newer... the Safari is newer... but the problem is the same!
    How could I solve it?
    Is this a bug?
    Thank you!

    Since Safari is able to save as HTML file a page if it is opened online (from web), making "Save as...", and it is unable to make so if the webarchive file is on the hard disk...I tried to upload on a web server some .webarchive files.
    Then I went online in the web page with the list of all the uploaded .webarchive files... (ex.: http://....filename1.webarchive, etc...)...
    My goal was to open ONLINE (not on hard disk) the files and then make "save as...",... but... SURPRISE!!! Safari is UNABLE to open a webarchive file from the web, it asks me where to save the file... it can only save it, it writes that it is an "application"...
    I think this happens because .webarchive is not a real web page but a "package"... but my displeasure is this:
    Once opened an hard disk's webarchive file, its content is loaded in ram and it appears like a normal web page (html + images + etc...)... so, in this moment, Safari should be able to save it "as...." HTML file too.... discarding images and other objects....
    Any advice?
    Thank you!!!

Maybe you are looking for

  • Custom OM infotype issue in Quality Server

    Hi, I created a custom infotype in PPCJ. Its working fine in development server. We transport the request to Quality server and created a record in PO13 t-code for the custom infotype. There i am getting a success message that 'Record is created'. If

  • Procurement confirmation wizard?

    hi all,           i have an item which is in stock 50. and i have an sales order of 100. so when we run the procurement confirmation wizard then the qty of PO must get reduced to 50 instead of 100. because we have in stock 50. when i run the wizard t

  • HT1414 my i pad says connect to i tunes and will not do anything at all.downloaded latest i tunes to lap top but it does not recognise the i pad.help

    my i pad is not working it just says connect to i tunes.tryed connecting it to i tunes via lap top but the i pad is not recognised

  • Black and white capture on canopus 300

    Hello everybody, I'm new to this forum (and Macs and FCP) and I think this is a basic qustion, but I searched everywhere and couldn't get a solution. Well, my problem is that I capture analog images using canopus advc-300 and it works very well with

  • @MOVAVG,MDSHIFT and PRIOR

    Hi, I am new to Essbase and looking forward for your help in order to develop the below scenarios. First one I need an essbase function that calculates the average of the last three months. so if i am in Apr the value would be the average of JAN,FEB