How to output html?

<c:set var="arrow" value="<html:link href=\"#\"><html:img page=\"/images/browse/arrow.gif\" border=\"0\" /></html:link>" />
<c:out value="${arrow}">
Why is the result html, not a link?

First you need to disable the escapeXML on the c:out tag.
<c:out value="${arrow}" escapeXml = "false"/>
The JSP engine doesn't evaluate tags in attributes. They are just passed in as strings. So the struts html taglib wouldn't get invoked.
To invoke it, use the alternative format of the set tag, setting the value as the body of the tag.
<c:set var="arrow">
  <html:link href=\"#\">
    <html:img page=\"/images/browse/arrow.gif\" border=\"0\" />
  </html:link>" />
</c:set>
<c:out value="${arrow}" escapeXml = "false"/>Cheers,
evnafets

Similar Messages

  • How to output HTML when called from a browser

    We are trying to replace a small web app with a bpel app so it has to return HTML. I keep getting XML of the HTML as output from this simple app. It doesn't interpret the html. The bpel uses a simple assign that puts an HTML string into the "body" message then passes it to the "reply".
    I have found out how to call this from the browser by changing "orabpel" in the url to "httpbinding" and then adding the "operation" onto the endpoint.
    from: http://server:7777/orabpel/default/ws1/1.0
      to: http://server:7777/httpbinding/default/ws1/processIs it possible to output html back to the browser and have the bpel look like a web page? Setting the mimetype of the output message type to "text/html" seems to have no effect at all.
    Here is my wsdl:
    <?xml version="1.0"?>
    <definitions name="HTTPGetService"
                 targetNamespace="http://services.otn.com"
                 xmlns:tns="http://services.otn.com"
                 xmlns:plnk="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
                 xmlns="http://schemas.xmlsoap.org/wsdl/"
                 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                 xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
                 xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/">
        <message name="HTTPGetServiceRequestMessage">
            <part name="Region" type="xsd:string"/>
            <part name="EffectiveDate" type="xsd:string"/>
            <part name="EndDate" type="xsd:string"/>
            <part name="acc1" type="xsd:string"/>
            <part name="acc2" type="xsd:string"/>
        </message>
        <message name="HTTPGetServiceResponseMessage">
            <part name="body" type="xsd:string"/>
        </message>
        <!-- portType implemented by the HTTPGetService BPEL process -->
        <portType name="HTTPGetService">
            <operation name="process">
                <input message="tns:HTTPGetServiceRequestMessage"/>
                <output message="tns:HTTPGetServiceResponseMessage"/>
            </operation>
        </portType>
        <binding name="HTTPGet" type="tns:HTTPGetService">
            <http:binding verb="GET"/>
            <operation name="process">
                <http:operation location="/process"/>
                <input>
                    <http:urlEncoded/>
                </input>
                <output>
                    <http:urlEncoded/>
                    <mime:content type="text/html" part="body"/>
                </output>
            </operation>
        </binding>

    Hi,
    Open up admin console. Expand "Servers" node to view servers in domain.
    Right click on a server (or select Logging/ General tab) and select "view
    server log".
    Regards,
    Jon

  • How to output HTML from com.sun.HTTPExchange

    My trival web server outputs output plain text. How do I output HTML?
    Thanks,
    Siegfried
    package xml.webservicesDemo;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.net.InetSocketAddress;
    import com.sun.net.httpserver.HttpContext;
    import com.sun.net.httpserver.HttpExchange;
    import com.sun.net.httpserver.HttpHandler;
    import com.sun.net.httpserver.HttpServer;
    public class WebApp implements HttpHandler {
         public static void main(String[] args) {
              try {
                   HttpServer server = HttpServer.create(new InetSocketAddress(8123),0);
                   HttpContext ctx = server.createContext("/apps/myapp/myNewApp",new WebApp());
                   server.setExecutor(null);
                   server.start();
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
         public void handle(HttpExchange t) throws IOException {
              InputStream is = t.getRequestBody();
              byte[] bBody = new byte[1000];
              int count = is.read(bBody);
              String sBody = bBody.toString();
              String response = "hello siegfried";
              t.sendResponseHeaders(200, response.length());
              OutputStream os = t.getResponseBody();
              os.write(response.getBytes());
              os.close();          
    }

    For that kind of work, I wouldn't recommend this class ( sorry, my other reply is to your first question ).
    This is a SIMPLE http server. You would have to emulate an application server ( like Tomcat ) yourself if you want full-blown servlet / jsp functionality. You could define a simple jsp-ish domain specific language and parse it yourself, though.
    That might be an interesting exercise, but not one that would appeal to me.

  • How to output HTML code in methods without out.print

    Hi,
    I am trying to create a larger web-site with jsp. At first I tried to structure the page using include files. Since there is a limit for the length of if/else blocks, I now switched to using methods instead.
    The Problem I have is that there a larger HTML blocks I dont want to print with out.print because that would make the source unreadable.
    Unfortunately the <%= tag doesnt work in methods.
    Here a code sample:
    <%!
    public void processOrder()
    for(int i=1; i<10; i++)
    out.print("<table>");
    out.print("<tr>");
    out.print("<td>Your Order:<td>");
    %>
    Isnt there a way to use a tag like <%= ?
    Or are there other constructs then methods which can handle <%= ?
    With PHP it would be no problem. So I wonder why there should be no way to do it with jsp.

    I generally put dynamic output in a separate class file; you can then either instantiate the class in a scriptlet and call the appropriate method (which can either return a string or do all of your out.prints) or use a jsp:useBean tag.
    Given the following class:
    public class myHTML {
       public myHTML(){}
       public String renderTable(){
          String s = "";
          s += "<TABLE>\n";
          s += "<TR><TD>some content</TD></TR>\n";
          s += "</TABLE>\n";
          return s;
    }You can then do either of the following in your JSP page:
    1.<%
       myHTML mh = new myHTML;
       out.print(mh.renderTable());
    %>2.<jsp:useBean id="somename" class="somepkg.myHTML" scope="request">
    <%=somename.renderTable()%>
    </jsp:useBean>Either will work, and all of the redundant out.print or String concat lines are moved out of the JSP.

  • How to Generate HTML Report Output in Excel

    Dear Experts,
    How to convert HTML report output in Excel.
    I have reports which output is coming in HTML format & the same I want to use in Excel.
    So tell me how I can covert the same in Excel.
    Thanks
    Sudhir

    hello,
    in your case, you might want to make the following :
    a) use DESFORMAT=HTML
    b) use MIMETYPE=application/vnd.msexcell (or whatever mimetype your excel application is bound to)
    i am nor sure if excel will understeand our HTMLCSS (which is actually HTML4.0 using layers for best possible rendering of the paper page in the browser).
    regards,
    the oracle reports team

  • How to Output Rich Text Format.

    Hi everyone, i use a rich text editor called tiny mce in my web application. After i click the submit button the value inside the text area would be saved in my database including the HTML tags e.g. <i>Sample Report edited via Tiny MCE Rich Text Editor<i>. I need to output the text in a webuijsf static text component but the moment i see the output the tags are still there and the text is not in italics format. Does anyone know how to output it in static text with the design in it?

    It is not updated for more than 1 years and it is dropped by Sun and users were recommended to migrate to ICEfaces.
    [http://woodstock.dev.java.net]
    The Woodstock release 4.2 is the last official version of Woodstock that Sun will release. Sun will continue to support its customers that have built on top of Woodstock 4.2. The Project Woodstock code is still available, and community members can still create new features or enhancements. For future development or migration of existing Woodstock projects, Sun is officially endorsing ICEfaces as the replacement technology for Woodstock. Also see [http://www.nabble.com/Woodstock-Migration-Path-to-ICEfaces-td21057513.html], although I would recommend RichFaces above that. It is only that it doesn't have a drag'n'drop palette for Netbeans, so it is not reachable for blind visual developers.

  • How to output query results directly to a file

    Hello,
    I'm new to this and i need to know how to output the results of a query directly to a file instead of it displaying on the screen and then outputting to a file in SQL Developer Version 2.1.0.63.
    Thanks in advance for any help!
    Edited by: user13036938 on Jun 16, 2010 7:24 AM
    Edited by: user13036938 on Jun 16, 2010 7:25 AM

    for a really basic spool:
    SPOOL [FILEPATH];
    SELECT [SOMETHING] FROM [SOMETABLE] WHERE [SOMECONDITION];
    SPOOL OFF;see also:
    http://www.oracle.com/technology/products/database/sql_developer/files/sql_worksheet_commands.html
    for a list of other useful SQLPlus commands supported by SQL Developer
    Edited by: Irian on 16-giu-2010 17.08

  • How to output a query results into a text file

    How to output a query results into a text file instead of outputing it to the screen..
    is there a way for us to write a SQL query which specifies to output the query results to a text file.
    Pls let me know how to do it
    Thanking u in advance
    regards
    Muraly

    Muraly,
    If you are using SQL*Plus 8.1.6 or later, you can also spool output to a file in HTML format, eg
    SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON
    SPOOL c:\temp\report.html
    SELECT DEPARTMENT_NAME, CITY
    FROM EMP_DETAILS_VIEW
    WHERE SALARY>12000;
    SPOOL OFF
    SET MARKUP HTML ENTMAP OFF
    In iSQL*Plus 9.0.1 (the browser-based interface to SQL*Plus) onwards, you can also send the HTML output to a new web browser window, or an html file -- much easier than the command line method.
    Alison

  • How to use html tags inside java

    I have to retrieve data from db and return the data to my index.jsp page.
    Its working fine.
    But I have o display in a pable format using html. How to embed html tags? I tried this way. Its not working. Any suggestions?
       String htmlOpen = "<html>";
        String htmlEnd = "</html>";
        String titleOpen ="<title>";
        String titleEnd ="</title>";
        String bodyOpen = "<body>";
        String bodyEnd = "</body>";
        for (int i = 1; i <= cols;i++){
            output = output + rsmd.getColumnName(i);
         while (rst.next()) {
            for (int i = 1; i <= cols;i++){
                      output = output +rst.getString(i);
      result = htmlOpen + titleOpen + titleEnd + bodyOpen + output+ bodyEnd + htmlEnd;
        stmt.close();
        conn.close();
         return htmlOpen;
      }

    See those charcters in your JSP that look like "<%"? Those characters mean: "the code after this is Java - interpret it as such".
    Then when you close your Java block with "%>", it then means: "the code after this is html - output it to the request response that is being built. However, within the html code, the syntax "<%= java_variable_name %>" means "take the current value of that Java variable and insert it into the html output".
    Here's an example:
    %>
    <table cellspacing="2" cellpadding="2" border="1">
    <tr>
    <%
        String s = null;
        for (int i = 1; i <= ncol; i++)
          s = rsmd.getColumnName(i);
    %>
      <th nowrap><A HREF="<%=sortLink.toString()%>&sortby=<%=s%>"><%= s %></th>
    <%
    %>
    </tr>
    <%
        if (rs == null || numRows <= 0)
          %><tr><td colspan="10" nowrap>No data available for specified query.</td></td><%
        else
          int rowCounter = 0;
          while(rs.next() && rowCounter < PAGE_SIZE)
            rowCounter++;
    %>
      <tr><%
            for (int i = 1; i <= ncol; i++)
              s = rs.getString(i);
              if (rsmd.getColumnName(i).equalsIgnoreCase("password"))
                    %><td nowrap>********</td>
    <%
              else
                %><td nowrap><%= s %></td>
    <%
            %></tr><%
    %>
    </table>This is JSP 101, what they teach in the first hour of class...
    Here's a decent JSP tutorial:
    http://www.jsptut.com/

  • How to output sound to RCA cables?

    I give up! I can't for the life of me figure out how to output the sound from my Macbook to play on my stereo or TV which use RCA cable hook-ups.
    I got the VID ADPT MINI-DVI TO VIDEO ADAPTER-GEN but that only adapts the video, not the sound. Do I have to get some kind of optical to analog adapter?

    This would do the trick, although you can probably find something at Radio Shack for less.
    http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wa/RSLID?mco=FFB 21895&fnode=home/shopipod/ipod_accessories/cablesdocks&nplm=TN779LL/A
    I got an iPod kit with a power supply, extra dock, and a Monster Cable (yeah I think they're overhyped) mini jack to RCA connector.
    There are a bunch of ways you can do this. If you've already got long enough RCA cables, these would do the trick:
    http://www.radioshack.com/product/index.jsp?productId=2103710
    Or if you have a short distance, maybe something like this (doesn't say how long it is):
    http://www.radioshack.com/product/index.jsp?productId=2427991
    There are more attractive versions of this type of adapter. Radio Shack shows at least a dozen from different companies.

  • How GET Output to Excel with Oracle9i Report using OC4J

    how GET Output to Excel with Oracle9i Report using OC4J.
    I FINISHED THE SETPS CONCIDERING THE JSP CODE NEEDED TO GET THE EXCEL OUTPUT ON LOCAL MACHINE.
    I NEED TO PUBLISH THIS REPORT THROUGH APPLICATION SERVER.
    THE QUESTION IS:
    1- HOW TO START AN OC4J INSTANCE FROM ORACLE 9I DS FOR THIS REPORT?
    2- WHERE (PATH) TO PUBLISH THE REPORT ON THE APPLICATION SERVER?
    3- WHAT IS THE DEFAULT URL TO RUN THIS REPORT AND WHERE TO PUT IT?
    4- HOW TO MAKE MAPPING FOR DIRECOTRY PATH TO TRANSLATED AS URL FOR THIS REPORT?
    5- IF ANY ONE CAN GIVE ME THE FULL CODE TO RUN AND CALL SIMPLE JSP REPORT TO BE VIED IN INTERNET EXPLORER.
    THANK YOU

    Hi,
    I can't answer to all your questions, however I can tell you that:
    2) The directory where to put the report file is specifiend in a file named
    <serverName>.conf
    in the sourceDire property
    <property name="sourceDir" value="/directory/dove/mettere/i/report"/>
    that you can find under ORACLE_HOME/reports/conf
    3) The URL is
    http://<server IAS address>:<port number>/<jsp file path>/<repName>.jsp?server=<report server name>&userid=<user>/<pwd>@<DB conn string>[&<param>=<valore>[&...]]
    5) In IE you have only to set the previous URL in the address bar.
    Hope this helps you
    Bye
    Raffy

  • How to use HTML Tags in Smartforms

    Hi,
    Can you please help me out in knowing how to use HTML tags in Smartforms,
    suppose i want to display some text in BOLD i should use the tag </b> as shown
    </b>  Header Information <b>
    regards
    Ranveer

    Hi Ranveer ,
        check this following links,
      hope this wil helps you
    <a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/abap%20code%20samples/smartforms/smartform%20in%20abap.pdf">check this link,to know abt HTML in smartforms</a>
    rgds,
    shan

  • How to change html style titles of a JTabbedPne at run time??

    hi,
    how to change html style titles of a JTabbedPne at run time??
    setTitleAt is not working...

    You can't change the canvas at runtime. But you can put the scrollbar on a stacked canvas and then show or hide that stacked canvas on different canvases.

  • How to upload html file to email

    Hi,
    I have absolutely no html background but was able to come up with a single page layout with graphics, texts and links with the help of online tutorials using Adobe Go Live which I can open the file now in Dreamweaver.
    My goal is not to come up with a webpage in cyberspace but to create an html file with images and links to specific websites that can be emailed to people. The file must be part of the email body that people can readily view the images, texts and click the links right away and not to be as an attachment.
    Would appreciate it very much if someone can help me out.
    Thanks.
    Newbie

    The simplest way to handle this would be to Upload the  page and files to a  remote server space and send your email buddies a link to the site.   Barring that....
    How to Code HTML Emails
    http://www.sitepoint.com/article/code-html-email-newsletters/
    Use  inline CSS styles for fonts and background colors.  Use Tables to hold your  page elements.  Use absolute URLs to images hosted on your web server because attached images may not get through. Give  people who can't see your HTML page in their email client a link to the HTML  page on your web server.
    Download some HTML Email Templates from the links below  to help you get started.
    Mail Chimp
    http://www.mailchimp.com/resources/html_email_templates/
    Constant  Contact
    http://www.constantcontact.com/email-marketing/html-email-templates/index.jsp
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • How to send HTML mail with images multipart/related message

    Hi,
    Could any body tell me how to send HTML mail with images in "multipart/related" message,if any body can give the code ,it would be helpful.
    Thanks

    Hi,
    Could any body tell me how to send HTML mail with
    ith images in "multipart/related" message,if any body
    can give the code ,it would be helpful.
    ThanksHi!
    Refer to
    http://developer.java.sun.com/developer/onlineTraining/JavaMail/index.html
    I've found it very helpful.
    Look at the last part for a code showing how to send HTML mail!
    Regards

Maybe you are looking for

  • Blue screen of death during start-up

    Hey Adobe-Community, I am having troubles with After Effects CC again. Every time I want to open After-Effects i get a BSOD. The last thing I can see is the opening-loading-thing (talking about that thing just the after effects version of it, logical

  • How to speed up mac

    What is the most effective way of speeding up my macbook?

  • DTW -- UDF does not appear in Serial Number

    Hi All, I am trying to update a UDF in serial number transaction table for GR PO. I have prepared a template where I have added a column at the end with the name of the column as defined in database. when I map these fields in DTW, I dont find this U

  • Sound editing doesn't work anymore

    Just got myself a second hand computer with iMovie 11 vs. 9.0.9. I've been working with iMovie on my old mac for years and never experienced a problem with the audio. When I import audio now, I am able to hear it but when I change volume settings in

  • CS5: Where is Help?

    Just got CS5.  When I go to Help menu, all I get is Mac Help, no Photoshop Help.  Yes, I am in PS, and they are the PS menus.