Generate HTML code via JSP

hi!
I want to 'run' a JSP and then retrieve the generated HTML code.all without any browser/tomcat...
is there a way to run JSP's in the virtual machine..?
greetz
chris

we have some templates (generated with dreamweaver), there we want to fill in the dynamic content by java (JSP tags...)
but in the end we don't have to show the html code on in the browser, we need a fix HTML file which we can print (the dynamic content filled in..)!
any ideas
chris

Similar Messages

  • How to generate html-code using csv input with JSP or JAVA???

    Hello,
    I want to read out a .csv-file and generate html-code dynmically with JSP in an EP6 Application. The problem is, that the csv-file can’t be located or openend.
    BTW if every knows a good tutorial or weblog for this, please post the link.
    It’s located in a par-archive under:
    />dist>files
    I tried various methods, in the doContent mehtod or with JSP. Everytime same result.
    Here part of the code I tried in the doContent():
    public class CSV extends AbstractPortalComponent
        public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
            String strWRoot = request.getWebResourcePath();
            String contentCSV="", line="";
            String linesep = System.getProperty("line.separator");
            File fileLoadCSV = new File(strWRoot+"/files/ma_infosysteme.csv");
            boolean exCSV = fileLoadCSV.exists();
            boolean reCSV = fileLoadCSV.canRead();
            int a=0;
            if(exCSV&&reCSV){
                response.write("ok");
                try {
                  BufferedReader inputCSV = new BufferedReader(new FileReader(fileLoadCSV));
                  while((line=inputCSV.readLine())!=null){
                    contentCSV=contentCSVlinelinesep;
                    a++;
                  inputCSV.close(); 
                catch(IOException ioex){
                    System.out.println("Fehler");  
            else {
                response.write("not ok");
            response.write("<br>Wroot: "+strWRoot);
            response.write("<br>File: "+fileLoadCSV);
            response.write("<br>exists: "+exCSV);
            response.write("<br>read: "+reCSV);
            response.write("<br>Input: "+contentCSV);
    The Output is:
    not ok
    Wroot: /irj/portalapps/DHTML
    File: \irj\portalapps\DHTML\files\ma_infosysteme.csv
    exists: false
    read: false
    Input:
    So thanks to everyone who can give me a good hint.
    Bye.

    Without really looking too much into this it looks like the problem is with the way in which you are trying to open the file. I believe that when creating a File object you need to use a physical path. By using the getWebResourcePath() method you are retrieving the URL to this file and not the physical path name. There is another method (can't remember the exact name) called getPublicResourcePath() (or something similar) which will return the physical path to this file, i.e. c:\usr\sap\.....etc. If you try it this way it may well work
    I hope this helps
    D

  • How to display xslt generated html code?

    Hi,
    I transformed xml code into html code inside my action
    class and put generated code into StringWriter, I
    don't
    know how I can display it on my jsp page?
    I tried to turn generated html code into a big string,
    then use bean:write to display it on jsp page, it just
    does not work.
    Has anyone done this kind of thing?
    thanks

    hi
    Just put that String in JSP expression <%= String name %>
    u will see it on browser
    thanks
    hithesh

  • Problem when importing HTML code to JSP

    When I copy HTML code to JSP strange thing happens - "It's" became "It?s". But that's not all. I changed "It?s" to "It's", but when I run the JSP output on the screen is still "It?s".
    Why does this happens?
    What to do?

    Pls state the server, browser and complete code snippet

  • ADF generated HTML code performance issue

    ADF generated code has lot of unnecessary html tags (when you check in Firebug). browser takes time to load the page . It means performance low.
    As a Front end engineer . My aim is to give end user good browsing feeling , he doesn't like to weighting till page loads.
    So from end user perspective page should load faster.
    Normal Html pages and other applications i have full control over html code.
    But in ADF , i don't have full control over all html tags ,which is generated by server dynamically.
    So, can anyone suggest how i can improve my page loading performance ?

    Anil,
    so in real - world terms, what you are saying is that a Ferrari 360 which has a weight of 1,350 kg is slower than a FIAT Panda, which only weights 840 kg. There is a catch to this theory of yours:
    1. ADF Faces is based on JavaServer Faces, which is a component based framework for writing web based applications. Renderer classes are used to build the user front end. It is not the intention of JSF to allow application developers - but component developers - to tweak the generated component output. If you want something lean, use the default JSF HTML component set, which comes extremely light (but also with less functionality - like a Fiat Panda)
    2. Performance is not alone defined by the HTML downloaded to a client - especially given that static HTML can be cached in browsers and ADF supports page templating for this. There are other factors that play in to this like network bandwidth, latency, query time, business logic execution time, image sizes, CSS and JavaScript
    3. The real load in ADF Faces, as in other AJAX frameworks, is JavaScript. Most of the ADF Faces functionality is created dynamically on the client side using JavaScript objects
    4. ADF Faces has more complex components than HTML. If you compare a HTML table with the table rendered in ADF, you see a difference in the look and behavior
    Btw, here's the tuning guide for ADF: http://download.oracle.com/docs/cd/E21764_01/core.1111/e10108/adf.htm#CIHHGADG . You also may want to test and consider partial page navigation, which speeds up page to page navigation big times.
    Frank

  • Displaying html code in JSP page

    Hi.
    How do I display HTML code in an jsp page, so that the actual code is printet on the screen
    fx:
    <html>
    <head>
    </head>
    <body>
    </body>
    </html>

    I can't get my reply to show properly, but the answer is;
    Change < into &lt ; and > into &gt ;
    but with the semi-colons stuck next to the &lt and &gt if you get my drift

  • Can i write Html code inside JSP method???

    hi i am newbie to jsp and servlets. i am working on a project where i have to use same html code for two conditions in jsp. my question is can i write that html code inside any method in jsp?? and then can i call that method within that if and else scope. can anyone help me with this??

    I don't think that does what you think it does.
    <%!
    void renderStateSelect(String default) { %>Creates a method with that signature and an open brace...
    <select name="state"> puts:
    out.println("<select name=\"state\">");
    into the _jspService method
    <%!
    // logic to loop thru states
    %>Puts the loop logic after the brace opening up the method renderStateSelect
    </select>puts
    out.println("</select>");
    in the _jspService method
    <%!
    %>Closes the renderStateSelect method.
    So if I do this:
    <html>
    <body>
    <%!
    void renderStateSelect(String def) { %>
    <select name="state">
    <%!
    // logic to loop thru states
    %>
    </select>
    <%!
    %>
    Hello<br/>
    <% renderStateSelect("none"); %>
    Everybody
    </body>
    </html>The html output is:
    <html>
    <body>
    <select name="state">
    </select>
    Hello<br/>
    Everybody
    </body>
    </html> The 'renderStateSelect method does not render the state select. The _jspService method does, in place where the HTML is written in the JSP file.  As another look, the translated servlet looks like this:
    package org.apache.jsp;
    public final class IsThisOk_jsp extends org.apache.jasper.runtime.HttpJspBase
        implements org.apache.jasper.runtime.JspSourceDependent {
    void renderStateSelect(String def) {
    // logic to loop thru states
      public void _jspService(HttpServletRequest request, HttpServletResponse response)
            throws java.io.IOException, ServletException {
        try {
          out.write("<html>\r\n<body>\r\n");
          out.write("<select name=\"state\">\r\n");
          out.write("</select>\r\n");
          out.write(" \r\nHello<br/>\r\n");
    renderStateSelect("none");
          out.write("\r\nEverybody\r\n</body>\r\n</html>\r\n ");
    }See. Any plain HTML code you put outside of the <%! %> tags is converted to out.printlns inside the _jspService method (in place where they occured in the JSP, not where the method you want to do the rendering is called...)
    So unless I completely misunderstood your intent here, this apprach does not work.

  • Generating HTML Files via RECEIVER File Adapter

    Hi All,
    I have the Following Scenario: 
    R/3 ( ABAP Proxy ) -
    >XI------>HTML Files ( File Adapter ).  
    Basically I would like to generate, HTML files out the RECEIVER File Adapter.   How can this be achieved?
    I  have invested some time in thinking about a adapter module, which can do this? Any Blogs would be Helpful here.
    Is there any alternative way? 
    Any Blogs or help Links would be appreciable.
    Thanks in advance,
    Best Regards,
    Abhishek Vinayaka

    Hi
    Look these thread for Create HTML file format
    if the reciever adapter is file i want in messages to be  in HTML format
    Re: idoc-xi-file scenario.  how to display file in html format

  • Display images stored in BLOB in html pages via JSP

    Hello,
    My images are stored in BLOB column of other base than portal.
    in JSP i have to display them in html pages.
    anybody have already did the same thing ?

    teggvb6,
    I believe you should be able to get it to work by doing the grants to the user specified in the DAD (i.e. the user that is logging into Oracle) rather than PUBLIC (someone else may correct me on this?).
    If you're concerned that the procedure could be called by others then I guess you could do some sanity checking within the procedure, for example checking v('APP_USER') or maybe v('SESSION') or perhaps do something clear with the REFERER http header? I haven't thought this through yet but I'm pretty sure you should be able to tie it down a bit more.

  • Generating QT html code for blog

    I'd like to generate html code for quicktime audio files to embed on my blog posts. I use blogger. Can I do this? Is quicktime the best/easiest way to go about this? I have the free version of QT, not pro. Thanks

    <object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
    codebase=
    http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0
    width="200" height="16">
    <param name="qtsrc" value="sample.mp3" />
    <param name="autoplay" value="true" />
    <embed qtsrc="sample.mp3" autoplay="true" width="200"
    height="16"
    pluginspage="http://www.apple.com/quicktime/download/">
    </embed>
    </object>

  • Conditional HTML in a JSP page?

    I've been scouring the help and web for about 2 hours and haven't found a way to do this yet.
    What I'm trying to do is to conditionally generate attributes to a html tag via JSP, but everything I've tried (even stuff that's valid JSP) won't pass the JDeveloper HTML checks and it won't compile the JSP page.
    Specifically, I'm trying to add a bgcolor attribute to a <tr> tag if conditions are met in data in the row, but everything I've tried to get the added data in the tag results in some error.
    I've tried something like this in the HTML:
    <tr <%= color %> >
    and this from the java side:
    if (rowCont > 20) {
    out.prinln("<tr bgcolor=\"#c0c0c0\">);
    else {
    out.prinln("<tr>");
    Both methods result in lots and lots of HTML errors and JDeveloper won't even compile the page. The hmtl way resutls in "name expected" errors, and the java way results in a bunch of "end tag doesn't match start tag" errors.
    Any clues on ways to do this?
    Thanks

    Can you send me a larger snippet of code from your JSP? I do pretty much the exact same thing in all of our JSP's in our app. If you have a uix:form tag, you'll need to wrap all html inside uix:rawText tags.
    String colText = "class=\"OraTableCellText\" style=\"border-left:1px solid #CCCCCC;border-bottom:1px solid #CCCCCC\"";
    <td <%=colText%> >Text here </td>
    <td <%=colText%> >More Text </td>
    -Teri
    [email protected]

  • Where is the HTML-Code for the Dashboard-Links defined? How to edit it?

    Hello everyone,
    I'd like to know where HTML-Code for the Dashboard-Links (My Dashboard, insert random Dashboardname here, ...) is defined.
    Inspecting HTML-Code via the browser, i'll got the following HTML-Tag:
    an <a'' href="...url"... class="CurrentPortal" name="DashboardBannerLink" title="...">Dashboard-name</a''>
    What i know is, that i can modify portalbanner.css and edit the style of those links.
    But thats not what i want, though. I want to modify the html-code itself, for example change the layout of the table etc, to meet our company's corporate design requirements.
    Thats why i tried to find the terms PortalLink and CurrentPortal within the Message-Database (/msgdb).
    Unfortunately, i got no results.
    As a consequence, I believe HTML for those Links is generated by saw.dll internally and therefore can not be edited.
    Now i need someone to prove me wrong ;)
    Thanks in advance,
    Chris
    Edited by: Chris2010 on 16.08.2010 11:11
    -had to edit the html tag, as the code was turned into a clickable link when i posted the thread

    I still didn't find a solution until now, although i checked almost every xml file, that i was able to find.
    At the moment I am sure, that it would be necessary to edit sawm-Parameter "bannerHtml" to meet my requirements. Now, i dont know whether its possible to edit it or not, since those saw-parameters do not seem to be documented on the web.
    That's the part, i found in dashboardtemplates.xml (Line: 362)
    <WebMessage name="kuiDashboardBanner" translate="no"><!-- Param bannerHtml --><!-- Param dashboardsURL -->
    <HTML>
    <table class="PortalBanner" width="100%" border="0" cellspacing="0">
    <tr>
    <td class="PortalLogo">
    "<\a href="@{dashboardsURL}">
    <img class="PortalLogoImage" border="0" src="fmap:Portal/PortalLogo.gif"/></a>
    "</td>
    <td class="PortalTop" style="vertical-align:top">
    <sawm:param name="bannerHtml"/></td>
    </tr></table>
    <sawm:messageRef name="kuiDashboardMainBar"><sawm:setParam name="product">dashboard</sawm:setParam></sawm:messageRef>
    </HTML></WebMessage>
    -----

  • WebGUI: Embedded HTML Code

    Hello all,
    is it possible to embed own HTML code in the generated HTML code using Webgui (based on integrated ITS on WebAS 640)?
    Thanks a lot.
    Regards,
    Kurt.

    Hello,
    thanks for your response; I'm using webgui; via this service I call a transaction in backend via ~transaction; HTML is generated automatically.
    Now, the requrement is to enhance some HTML code to the generated page.
    Is there any possibility to include additional HTML code in the generation process?
    Thanks & best Regards,
    Kurt.

  • PDF and column HTML code

    My report table include column with HTML format such as
    <a target="_blank" href="tableA.url">tableA.url</a>
    It works fine in dashbaord: I see the URL and when click on it, I got the URL in new window.
    When I export to PDF, the resulting PDF display the HTML code and not just the URL.
    Any ideas?

    user8257465 wrote:
    Hi,
    I tried to achieve this before without success. My conclussion was that the pdf converssion engine that OBIEE uses is not able to generate HTML code inside the pdf.
    Me too I will like to know if someone achieved this.
    Thanks,Unfortunately, your assessment is correct: when printing to pdf, the HTML codes are exposed rather than maintaining the functionality of the coding.

  • DreamWeaver HTML code is good for WordPress?

    Hello everyone! It's the first time I write in this Forum, but I've got a problem and I hope someone of you could help me...
    I've found some problems when I pasted my Dreamweaver generated HTML code in a WordPress page.
    I usually write in my WP Blog with no problem, but today I wanted to create some special <div>, so first of all I generated the page in DreamWeaver. Then I copied and pasted the code into the WP CMS (HTML view, of course). But the text was not formatted like in DW... I tried to modify the code in the WP CMS, but I couldn't do what expected.
    Anyone can help me?

    Thank you for your answers, martcol and bemdesign.
    I'll try to better explain my problems. First of all, sorry for my bad english: I hope you will understand anyway. Unfortunately I cancelled my previous HTML code. Here's what is on-line at the moment:
    <div class="postText">
                            <p><strong>Oggetto dell&#8217;analisi dimostrativa</strong><br />
    Tutto il materiale prodotto nel web in Francia e in lingua francese, nel  periodo 10 settembre-10 ottobre 2010. In particolare, sono stati  analizzati blog e forum, siti di news on-line, contenitori di foto e  video, social network come Facebook, Twitter e FriendFeed, Google e i  principali motori di ricerca.<strong> </strong></p>
    <p><strong>Obiettivi</strong><br />
    - Misurare il volume di discussioni nel web sul Salone dell&#8217;Automobile di Parigi 2010<br />
    - Individuare le case automobilistiche maggiormente citate<br />
    - Individuare i più citati, tra i nuovi modelli e concept presentati al Salone</p>
    <p><strong>Strumento utilizzato</strong><br />
    <a href="http://www.intesys.it/Buzz-Analysis/">WebMetrika</a>, il   il servizio di <strong>Blog &amp; Buzz Analysis</strong> di Intesys, che   offre alle aziende informazioni per valutare la  propria Web Brand Reputation, l&#8217;efficacia delle iniziative di marketing  attuate, l&#8217;opinione dei consumatori su prodotti e servizi.</p>
    <hr width="100%" color="#666666"></p>
    <p>Si sta svolgendo in questi giorni a Parigi il <strong>Mondial de l&#8217;Automobile </strong>2010: il più importante salone dell&#8217;automobile francese, che si svolge al Paris Expo Porte Versailles. Appuntamento blasonato a cadenza biennale, vanta più di un secolo di storia: la prima edizione risale al 1898.</p>
    et cetera et cetera
    I wanted to insert the first part of the page in a <div>: from "Oggetto dell&#8217;analisi dimostrativa..." to "...opinione dei consumatori su prodotti e servizi". In my head this <div> had to seem like a grey box with a red border: easy to make with DW! I did so, but when I copied it into WP, the text didn't appear as I've formatted it... What have changed? The <br> and the font dimension too...
    I couldnt think that creating a simple box would be so tough!

Maybe you are looking for

  • IPod Touch Connection Errors After 3.1.3 Update.

    Hi all, There has been numerous threads in which users of the iphone/ipod touch has the "connect to USB/iTunes" image after updates to firmware 3.1.3. This is the thread to compile the possible solutions. To be part of this, you must satisfy the foll

  • Unable to increase display size in Yahoo Games Java applet; zoom doesn't work.

    My father is vision impaired. He play texas hold em in Yahoo Games. Once the game java applet launches, he needs to make the card display larger. I can't find any way to do this. he's using a PC with Windows 7. == This happened == Every time Firefox

  • Profit center 1000/N999 does not exist for 10.05.2009

    Hi Guys I am try to post a goods issue. But this error keeps coming up.- Profit center 1000/N999 does not exist. Can anyone help.

  • Cleaning of data in system

    Hi Apo expert, In our organization we have detached one unit. Same was working as a location (having different products), now for cleaning purpose we need to delete all the data related with that. How to go-ahead to do this !

  • Data Pump data compression

    We are seriously looking to begin using data pump and discovered via a metalink bulletin that data pump does not support named pipes or os compression utilities (Doc ID: Note:276521.1). Does anyone know a work around for this or have experience using