Html "img" tag impossible to delete

Hi!
I process .html files, and I want to delete all the tags. I do it with .replaceAll("\\<(.)*?\\>", " ")
It is rather successful, and all of the tags are deleted except for img tags. What could be a reason?
Thanks!

For these problems, MULTILINE mode, which matches \nx with $^, is irrelevant.
You should consider using DOTALL mode for matching a regexp '.' with '\n'.
And you should consider which you are going to choose between greedy mode and
reluctant mode.
import java.util.regex.*;
public class TagRgx{
  public static void main(String[] args){
    Pattern patt1 = Pattern.compile("<[^>]*>");
    Pattern patt2 = Pattern.compile("<.*>");
    Pattern patt3 = Pattern.compile("<.*>", Pattern.DOTALL);
    Pattern patt4 = Pattern.compile("<.*?>");
    Pattern patt5 = Pattern.compile("<.*?>", Pattern.DOTALL);
    String html
= "This is <b>a test</b>. <img src=foo.jpg\nwidth=1 height=1>. End test.";
    System.out.println("1: " + patt1.matcher(html).replaceAll(""));
    System.out.println("2: " + patt2.matcher(html).replaceAll(""));
    System.out.println("3: " + patt3.matcher(html).replaceAll(""));
    System.out.println("4: " + patt4.matcher(html).replaceAll(""));
    System.out.println("5: " + patt5.matcher(html).replaceAll(""));
    System.out.println();
    String h2
= "Begin<!-- This comment doesn't terminate here > but rather here -->End";
    System.out.println("1: " + patt1.matcher(h2).replaceAll(""));
    System.out.println("2: " + patt2.matcher(h2).replaceAll(""));
    System.out.println("4: " + patt4.matcher(h2).replaceAll(""));
    System.out.println();
    String h3 = "Begin<meta name=\"Random\" text=\"Look at the >\">End";
    System.out.println("1: " + patt1.matcher(h3).replaceAll(""));
    System.out.println("2: " + patt2.matcher(h3).replaceAll(""));
    System.out.println("4: " + patt4.matcher(h3).replaceAll(""));
    System.out.println();
}

Similar Messages

  • Content Server pcs:html:img tag

    I am attempting to create custom news article presentation & data entry templates. The data entry template includes a text field where the user would specify the filename of an image that will be included in the presentation of the news article. I am having trouble with syntax for the filename property in the presentation image. I found an example the looks like this
    <pcs:html:img expr:src="itemByPath('images/logo.gif').location" attr:border="0" attr:align="absmiddle" style="UNARY" ></pcs:html:img>
    This works great, however I need to use the filename property something like this
    <pcs:html:img expr:src="itemByPath('images/<pcs:value expr="imageName"></pcs:value>').location" attr:border="0" attr:align="absmiddle" style="UNARY" ></pcs:html:img>
    Any suggestion on how to do this is greatly appreciated!

    Hi!
    I get the same error. I think it is a class loading problem. I noticed that both pdkjava.jar and pdkstruts.jar contains the class oracle.webdb.provider.v2.struts.StrutsUtils, but only pdkstruts.jar implements the method isPortalRequest(). The classloader has obviously loaded the other version of the class already.
    Both jar files is in the WEB-INF\lib directory of my war file. Has anyone else found a solution to this problem?

  • HTML img tag and src attribute as a byte[]

    Hi everybody
    I have a question is it possible to send a byte[] to the src attribute in a <img> HTML tag. What i would like to gain is a way of reading an img file from the jar in a custom tag which is no problem. Problems start when i want to send a byte[] which I have read from the InputStream to the StringBuffer which contains the HTML code.
    byte[] dataByte = null;
    String charEncoding = "UTF-8";
    InputStream in = imageURL.openStream(); //InputStream to the img file inside a jar
    StringBuffer buffer = new StringBuffer();
    StringBuffer sb = new StringBuffer();
    String imgData = "";
    int data;
    while((data = in.read()) != -1)
    buffer.append(new Integer(data).toString(), charEncoding);                              
    imgData = buffer.toString();
    dataByte = imgData.getBytes();The problem starts in this line, i think i need some encoding to do this.
    sb.append("<img src=\""+dataByte.toString()+"\">");thx in advance

    I know that u can do something like that :
    <html>
    <body>
    </body>
    <IMG
    SRC="data:image/gif;base64,R0lGODdhMAAwAPAAAAAAAP///ywAAAAAMAAwAAAC8IyPqcvt3wCcDkiLc7C0qwyGHhSWpjQu5yqmCYsapyuvUUlvONmOZtfzgFzByTB10QgxOR0TqBQejhRNzOfkVJ+5YiUqrXF5Y5lKh/DeuNcP5yLWGsEbtLiOSpa/TPg7JpJHxyendzWTBfX0cxOnKPjgBzi4diinWGdkF8kjdfnycQZXZeYGejmJlZeGl9i2icVqaNVailT6F5iJ90m6mvuTS4OK05M0vDk0Q4XUtwvKOzrcd3iq9uisF81M1OIcR7lEewwcLp7tuNNkM3uNna3F2JQFo97Vriy/Xl4/f1cf5VWzXyym7PHhhx4dbgYKAAA7"
    ALT="Larry">
    </html>I want to do exactly the same thing but via custom tags. The problem is as u say i have some data in the src attribute but the web browser doesn't interpret it right. sory for the long html source.

  • How to display JPEG in JSP w/o IMG tag?

    I have a working application where a jpeg image is ecoded on the server via a JavaBean. The bean is then forwarded to a JSP, which gets the unique jpeg filename from the bean and displays it with an html <IMG> tag. All's fine and well, but I'd like to get away from having lots of image files laying around on the server and just display the image encoded in the current request. I tried creating a custom tag to encode and display the jpeg using the com.sun.image.codec.jpeg.* package in this manner:
    ServletResponse res = pageContext.getResponse();
    OutputStream os = res.getOutputStream();
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(os);
    encoder.encode(imageRef); //-- imageRef is instance of BufferedImage
    and in the JSP:
    html, other tags, etc.
    <graph:image imageRef='<%= imageBean.getImage() %>'/>
    The image displays, but nothing else in the JSP (ie. html, other custom tags). In all other tags I've written, JSPWriter is used for output, but I need an OutputStream for the createJPEGEncoder() method.
    Can anyone tell me if what I want to do is possible? I'm chasing my tail at the moment.
    TIA Mark

    Would this work for you:
    Create the IMG tag in the JSP with the SRC as a servlet.
    Also, add any parameters you may need to tell the servlet what image to send back.
    Something like this:out.print("<IMG SRC=\"/servlet/ImageProducerServlet?WhichImage=");
    out.print("MySpecialImage");
    ...The ImageProducerServlet can be setup to send back the JPEG image file.

  • Bug: JDev 9052 Build (1618) html:img ... /

    The XSS <style selector=...> is not honored in conjunction with the <html:img> tag.
    1. Create an xss style:
    <style selector=".handIconGroup">
    <property name="cursor">hand</property>
    <includeStyle name="DarkAccentBackground"/>
    </style>
    2. Create a UIX page and add the following widgets:
    a. <html:img style="handIconGroup" ... />
    b. <textInput sytle=handIconGroup" ... />
    4. Run the page, and hover over both widgets.
    I expected the cursor to turn into a "hand" when hovered over both widgets. The <html:img ... /> tag dose not respect the handIconGroup style.

    Typo:
    <textInput sytle="handIconGroup" ... />
    should read
    <textInput styleClass="handIconGroup" ... />

  • How to pass src value into img tag in ADF

    Hi,
    My Dev : 11.1.2.3.0
    How to pass row values into <img> tag.,I used the below code but it's taking empty.,
    I tried both ways like #{row.CdFilePath}   and   ${row.CdFilePath}
    <af:iterator var="row"
                      value="#{bindings.xxx.collectionModel}"
                     id="i2">
         <img src='/ShowImage?src=#{row.CdFilePath}' border='0' style="width:100px; height:100px; margin:5px;"/>
    </af:iterator>
    Please tell me any other option is there..
    Thanks

    This works if you use a normal table so I guess it should work here too.
    Are you sure the el #{row.CdFilePath} return something?
    Why don't you use the adf image tag <af:image source="/ShowImage?src=#{row.CdFilePath}".../> instead of the html img tag?
    Should the src property not be enclosed with " instead of your '?
    Timo

  • How to set value for html:img

    i am using <html:img tag to render image and i need to set some value to that image when selected and that value need to be checked in java code.
    How i can set the value for that image.
    Thanks,

    use javascript and hidden input to do this:
    <html:img src="your_img.gif"     ononclick="document.getElementById('your_hidden_input_id').value='your_value' ">
    <input type="hidden" name="your_hidden_input_name" id = "your_hidden_input_id" value="" />Hope that Helps

  • HTML embeded in Flash and img tag

    I'm currently developing an application in flash, which
    consist of a hand-drawn screen, in which HTML page appears. To
    achieve this I used a TextField with html option. Unfortunately,
    TextFiles show only some simple tags – is there any other way
    to show more complicated ones in Flash CS3 (and AS3)? I have also a
    problem with the <img> tag. Picture loaded via <img>
    doesn’t print from TextField. My printing code attached -
    webpage_txt is control to print. Do you konw why it doesn't print?
    Thanks in advance for help.

    Currently, no, there are only simple HTML tags available.
    Though, FlashPlayer10 promises to have much greater support for
    text, including inline tables, etc.. You may just have to make do
    with what you have for now, and wait for the new player.
    As for your picture woes, I unfortunately am unable to help
    you there, with very little printJob experience myself.

  • How can I get a parameter back into a servlet invoked from an IMG tag ?

    I'm using a servlet to create several graphical plots per JSP i.e. per HTML page. Each graph is supposed to be different, according to a parameter which I want to pass back from my JSP. I'm getting several plots but they're all the same!
    I've tried setting an attribute in the session object before each IMG SRC= , but all I get is each plot the same! In fact, my debugging efforts show that the servlet is only called once despite 3 calls, each with a different session parameter value. I'm not sure the session parameter values are getting used properly.
    I just can't find a way of getting a parameter back into my servlet which is invoked from the IMG tag (i.e. SRC= "servlet name").
    Can anyone tell me the best way to pass a parameter back into a servlet which is invoked from an IMG tag? Can the request object be used? I can't, at the moment, see how it could be used?
    I'll certainly be very grateful if anyone can help with this - could even be useful for others as well!

    You said that, "by moving a copy of Mobile Docs back to the Library, from which I had moved it, my documents reapperared in Cloud." That says that you actually moved it. Obviously, I can't tell exactly what you did, but it sounds like you may have thought you were just putting it in the sidebar, but you actually put it somewhere else. The sidebar is not a location to put things, just a way to create a quick shortcut to access a file or folder, so you can't put things "back" from there.

  • Getting img tags to work in sub page using jstl core import tag

    Am trying to bring disparate system page reports together under one web app. This means using the jstl core import tag (I dont want to redirect as I want to hide the urls, this web app provides better security than those it calls).
    Use of the import tag works to a degree but any resources (ie. img tags) don't load.
    Have created a much simplified example that demonstrates..
    So heres the jsp...
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
    <h3>Delivery Performance Report</h3>
    <c:url value="http://localhost/mycontext/subpage.html" var="myUrl"/>
    <c:import url="${myUrl}" />and a simple sub page (note plain html, no jsp, this mimics my project as the other systems are hidden source, non jsp)
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <HTML>
    <HEAD>
    <TITLE>sub page</TITLE>
    </HEAD>
    <BODY>
         This is the sub page<br>
         <img src="images/banner_image.jpg" />
    </BODY>
    </HTML>While I dont get any errors what I do get is ..
    Delivery Performance Report
    This is the sub page
    ...but image fails to load.
    If I redirect instead of import it works, but as I said I need to hide the url from the user as security is an issue.
    Any help appreciated, really pulling my hair out with this final stage of something that will make a real difference to us!
    regards,
    G.

    Thanks for the answer but Im afraid thicko here doesnt get it.
    The img src is relative to the sub page, and I have tried it with an absolute address (ie. http://localhost/.....) with the same result.
    If I call the sub page direct (get with browser) the image tag works. Its just if the sub page is imported with the jstl core import tag.
    I've not tried a base tag. The real project always returns pages containing absolute urls... http://ourReportServer/reports?....plenty of params so dont belive relevant, please correct me if Im wrong here though.
    thanks, G.

  • XSLT problem with img tag in Saxon

    Hi,
    Iam getting a problem with <img> tag when transforming a document using Saxon transformer. In the input XSLT I have proper closing tag for <img>, but the output of the transformation is not well formed as the closing tag for <img> does not appear. I need to feed the output to a FO object to generate a print preview, but the output is not well-formed.
    Kindly help to resolve the issue.
    Kind Regards,
    Abhinandan

    Perhaps that is because you are generating HTML as your output? As I recall, <img> tags don't have to be closed in HTML. So try generating XML instead if you need XML.

  • Using the new HTML 5 tags

    I can't  get the new HTML5 tags section, header and footer to work on my page.  When I change the divs to section it totally screws up the page rendering.I added the appropriate CSS to my style sheet.  What do I do?
    Here is the oiginal code:
    <!DOCTYPE HTML>
    <html><!-- InstanceBegin template="/Templates/Ricks Universe.dwt" codeOutsideHTMLIsLocked="false" -->
    <head>
    <!-- InstanceBeginEditable name="doctitle" --> 
    <titleRick's Universe</title>
    <!-- InstanceEndEditable -->
    <meta charset="utf-8">
    <link rel="stylesheet" href="ricks.css" type="text/css" media="screen" title="Ricks Style Sheet"/>
    <link rel="stylesheet" href="hh.css" type="text/css" media="handheld"/>
    <link rel="stylesheet" media="print" type="text/css" href="print.css" />
    <!-- InstanceBeginEditable name="head" -->
    <style type="text/css">
    td {border: 2px;
        bordercolor: #008800;
    </style>
    <!-- InstanceEndEditable -->
    <!-- InstanceParam name="home" type="boolean" value="true" -->                
    </head>
    <body>
    <div id="wrapper">
         <div id="header" title="header">
      <p class="a8">
      <a href="HOME.HTM">Old Home Page</a>  
      <a href="newmenu.htm">Rick's Dog Page</a></p>
      <iframe src="http://free.timeanddate.com/clock/i425m2zy/n179/tct/pct/ahl/avt/tt0/ta1" frameborder="0" width="378" height="19"             allowTransparency="true"></iframe>
      <!-- InstanceBeginEditable name="title" -->
      <p class="title">Rick's Universe</p>
      <!-- InstanceEndEditable -->
         </div> <!-- End header  -->
      <div id="leftcolumn" title="left column">
    <ul>
    <li><a href="MEETDOGS.HTM">Meet the dogs</a></li>
    <li><a href="ART.HTM">Art</a></li>
    <li><a href="PARKING.HTM">Automotive</a></li>
    <li><a href="BABY.HTM">Babies</a></li>
    <li><a href="BOUTIQUE.HTM">The Boutique</a></li>
    <li><a href="CATLG.HTM">Catalogs</a></li>
    <li><a href="CHARITY.HTM">Charities</a></li>
    <li><a href="COMPUTE.HTM">Computing</a></li>
    <li><a href="DAYCARE.HTM">Day Care</a></li>
    <li><a href="DEPT.HTM">Department Stores</a></li>
    <li><a href="DOGCOMP.HTM">Dogs In Competition</a></li>
    <li><a href="DRUGS.HTM">Drug Stores</a></li>
    <li><a href="EDUCATE.HTM">Education</a></li>
    <li><a href="ELECT.HTM">Electronics</a></li>
    <li><a href="EMPLOY.HTM">Employment</a></li>
    <li><a href="ENTERT.HTM">Entertainment</a></li>
    <li><a href="MONEY.HTM">Financial</a></li>
    <li><a href="FITNESS.HTM">Fitness</a></li>
    <li><a href="FLOWERS.HTM">Flowers</a></li>
    <li><a href="FOOD.HTM">Food</a></li>
    <li><a href="FUNGAME.HTM">Fun and Games</a></li>
    <li><a href="GARDEN.HTM">Gardening</a></li>
    <li><a href="GOVMENT.HTM">Government</a></li>
    <li><a href="CARDS.HTM">Greeting Cards</a></li>
    <li><a href="GROCERY.HTM">Groceries</a></li>
    <li><a href="HEALTH.HTM">Health</a></li>
    <li><a href="HOBBY.HTM">Hobbies</a></li>
    <li><a href="HARDWARE.HTM">Home Improvement</a></li>
    <li><a href="INFO.HTM">Information</a></li>
    <li><a href="INTERNET.HTM">Internet and More</a></li>
    <li><a href="JEWELRY.HTM">Jewelry</a></li>
    <li><a href="BOOKS.HTM">Literature</a></li>
    <li><a href="MAPDIR.HTM">Maps and Directions</a></li>
    <li><a href="RECORDS.HTM">Music and Video</a></li>
    <li><a href="MOVIES.HTM">Movies</a></li>
    <li><a href="NEWS.HTM">News Stand</a></li>
    <li><a href="OFFICE.HTM">Office Supplies</a></li>
    <li><a href="PEOPLENET.HTM">People</a></li>
    <li><a href="PETS.HTM">Pets</a></li>
    <li><a href="PHONE.HTM">Phones</a></li>
    <li><a href="PHOTO.HTM">Photography</a></li>
    <li><a href="POST.HTM">Post Office</a></li>
    <li><a href="PRICES.HTM">Price Comparison</a></li>
    <li><a href="REALEST.HTM">Real Estate</a></li>
    <li><a href="SECURITY.HTM">Security</a></li>
    <li><a href="SEARCHNET.HTM">Searches</a></li>
    <li><a href="SENIOR.HTM">Senior Page</a></li>
    <li><a href="SHOES.HTM">Shoe Store</a></li>
    <li><a href="SHOPPING.HTM">Shopping Clubs</a></li>
    <li><a href="SPORTING.HTM">Sports</a></li>
    <li><a href="TOYS.HTM">Toys and Games</a></li>
    <li><a href="TV.HTM">Television</a></li>
    <li><a href="TRAVEL.HTM">Travel</a></li>
    </ul>
      </div> <!-- End Left Column-->                 
      <div class="content">
      <!-- InstanceBeginEditable name="content" -->
      <!-- Position Weather -->
      <div id="weather" class="noborder">
      <script type="text/javascript" src="http://voap.weather.com/weather/oap/11590?template=TRVLV&par=3000000007&unit=0&key=twciwea therwidget"></script>
      </div>
      <div id="center"><!-- Email me code -->
      My E-Mail address is <a class="black" href=
      "MAILTO:[email protected]" onmouseover=
      "window.status='Click Here To Send me E-Mail';return true"
      onmouseout=
      "window.status=' '; return true">[email protected]</a>
      </div>
      <div id="center"><!--CNN Ticker-->
      <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase=
    "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0"
    id="breakinnews4" width="500" height="81">
        <param name="movie"
    value="http://cnn.com/QUICKNEWS/ticker/ticker.swf" />
        <param name="loop" value="false" />
        <param name="menu" value="false" />
        <param name="quality" value="high" />
        <param name="bgcolor" value="#000000" />
        <embed src="http://cnn.com/QUICKNEWS/ticker/ticker.swf" loop=
    "false" menu="false" quality="high" bgcolor="#000000" width="500"
    height="81" type="application/x-shockwave-flash" pluginspage=
    "http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"/></embed></embed>
      </object>
      </div>
      <br/>
      <!-- Mapquest  -->
      <div id="mapq"> <a href='http://www.mapquest.com' target='_blank'><img border='0' alt='medium-logo.png' src='http://www.mapquestapi.com/cdn/common/images/medium-logo.png'/></a>
      </div>
      <div id="google">
    <table cellpadding=0 cellspacing=0 border=0 >
    <tr>
      <td><img src="Pictures/doodle_plus_google_logo_on_grey.gif" alt="doodle_plus_google_logo_on_grey.gif" /> <br />
      <form method="get" action="http://www.google.com/search">
      <input type="text"   name="q" size="31"
      maxlength="255" value="" />
      <input type="submit" value="Search" />   
      </form> </td>
      <td  style="font-family: Arial, Helvetica, sans-serif; font-size: 7.5pt;">
      <center><table width="90%" cellpadding=0 cellspacing=0 border=0  style="font-family: Arial, Helvetica, sans-serif; font-size: 7.5pt;">
      <tr>
      <br/><br/><span style="font-size: 18pt;">Search this site</span> <br/>
      <td style="font-family: Arial, Helvetica, sans-serif; font-size: 7.5pt;" align=left ><a href="http://search.freefind.com/siteindex.html?si=9724475">index</a></td>
      <td style="font-family: Arial, Helvetica, sans-serif; font-size: 7.5pt;" align=center><a href="http://search.freefind.com/find.html?si=9724475&m=0&p=0">sitemap</a></td>
      <td style="font-family: Arial, Helvetica, sans-serif; font-size: 7.5pt;" align=right><a href="http://search.freefind.com/find.html?si=9724475&pid=a">advanced</a></td>
      </tr>
      </table></center>
      <form style="margin:0px; margin-top:4px;" action="http://search.freefind.com/find.html" method="get" accept-charset="utf-8" target="_self">
      <input type="hidden" name="si" value="9724475">
      <input type="hidden" name="pid" value="r">
      <input type="hidden" name="n" value="0">
      <input type="hidden" name="_charset_" value="">
      <input type="hidden" name="bcd" value="&#247;">
      <input type="text" name="query" size="15">
      <input type="submit" value="search">
      </form>
      <br/>
      <a style="text-decoration:none; color:gray;" href="http://www.freefind.com" >search engine</a><a style="text-decoration:none; color:gray;" href="http://www.freefind.com" > by
      <span style="color: #606060;">freefind</span></a>
      </td>
    </tr>
    </table>
    <!-- end of freefind search box html -->
          </div>
      <br/>    
      <div id="ring">
      <table border="1" cellpadding="2" cellspacing="2" align="center" >
        <tr >
          <td align="center" bgcolor="transparent"><a href="SARIPAGE.HTM" target="_blank"><img src="Pictures/sari/sarinewchamp.jpg" alt="Sari's Page" /></a></td>
       <td align="center" bgcolor="transparent"><a href="HARLEYPAGE.HTM" target="_blank"><img src="Pictures/harley/HarleyChampion.jpg" alt="Harley's Page" /></a></td>
        </tr>
      </table>
      </div>
            <!-- InstanceEndEditable -->
            </div><!-- end of content html -->
      </div><!-- end wrapper -->
      <div id="footer">
      This website is the property of Fredric M. Zipser<br />
            Last Updated on
      <!-- InstanceBeginEditable name="EditRegion6" -->
      01/15/2015
      <!-- InstanceEndEditable -->
      </div><!-- end footer-->
    <div id="sitelock_shield_logo" class="fixed_btm" style="bottom:0;position:fixed;_position:absolute;right:0;"><a href="https://www.sitelock.com/verify.php?site=www.rickzipser.com" onclick="window.open('https://www.sitelock.com/verify.php?site=www.rickzipser.com','SiteLock','width=600,height= 600,left=160,top=170');return false;" ><img alt="PCI Compliance and Malware Removal" title="SiteLock"  src="http://shield.sitelock.com/shield/www.rickzipser.com"/></a></div>
    </body>
    <!-- InstanceEnd --></html>
    Here is the CSS:
    body {
      font-family: Garamond,Arial,sans-serif;
      margin: 0;
      color: #000000;
      font-size: medium;
      font-family:"Verdana";
      font-style: normal;
      font-weight: normal;
      line-height: normal;
      letter-spacing: normal;
      margin:auto;
      background-color: #93A5C4;
    #wrapper {
      background-color: #0000aa;
      color: #000000;
      width: 93%;
      margin:auto;
      min-width: 800px;
      height: 950px;;
      border: 10px solid #008800;
    #leftcolumn {
      float: left;
      margin:0;
      border-right: 10px solid #008800;
      width: 21%;
      height: 89.6%;
      overflow: auto;
    #leftcolumn li {
      list-style-type:none;
        padding-bottom: 0px;
      margin-bottom: 0px;
    #leftcolumn a {
        padding-bottom: 0px;
      margin-bottom: 0px;
    #header {
      color: #007700;
      background-color: #dddddd;
      border-bottom: 2px solid #000000;
      height: 10%;
      clear: both;
      padding-left: 40px;
    .content { padding-top:60px;
      margin:;0;
        float:right;
        height:83.4%;
      background: #87CEFA;
      width:78%;  
      overflow: auto;
    #weather {
      margin:20px;
      float: right;
    #footer {
      font-size: xx-small;
      background-color: #e8ffff;
      border: solid;
      text-align: center;
      padding-top: 20px;
      padding-bottom: 20px;
      padding-left: 40px;
      height: 5%;
    #leftcolumn a {
      text-decoration: none;
      margin: 15px;
      display: block;
    #leftcolumn li {
      padding-top:0;
        padding-bottom:0;
    #center {
        padding-left: 50px;
      padding-bottom: 30px;
      text-align: center;
    div#leftcolumn>ul>li a:link {
      color: #ffffff;
      font-weight: bold;
        text-decoration: none;
      padding-bottom: 0px;
      margin-bottom: 5px;
    div#leftcolumn>ul>li a:visited {
      color: #ffffff;
        text-decoration: none;
    div#leftcolumn>ul>li a:hover { text-decoration: none;
      background-color: #006600;
      color: #ffffff;
    a:link {
      color: #000066;
      font-weight: bold;
        text-decoration: none;
      padding-bottom: 0px;
      margin-bottom: 5px;
    a:visited {
      color: #000066;
        text-decoration: none;
    a:hover {
      text-decoration: none;
      background-color: #000066;
      color: #ffffff;
    .title {
      position: relative; top: -25pt;
      text-align: center;
      color: #0000aa;
      font-size:48px;
      font-weight:bold;
      font-family:"Times New Roman",Georgia,Serif;
        padding-bottom::10px;
    p.a8 {
      float:right;
      padding-right: 10px;
    #google {
      padding-bottom: 20px;
      position: relative; left: 75px;
      display: inline;               
    #mapq {
      padding-top: 50px;
      padding-bottom: 30px;
      float:right;
    #ring {
      text-align: center;
    .AllDogs {
      text-align: center;
    .pic {
      border: thick double #008800;
      padding: 20px;
    .mdogs {
      text-align: center;
    #menutest {
      display: block;
      background-color: #000066;
    .border {
      border: 5px solid #008800;
    ul a {
         padding-right:  4%;
    div.form  {
      padding: 0px;
      color: #FFFFFF;
      text-align: center;
      position: relative; left: -70px;
        font-size: small;
      border:0;
      white-space: nowrap;
    div.d1 {
      padding-left: 10px;
      padding-bottom: 0pt;
      padding-top: 30px;;
    h5 {
      color: #000066;
      position: relative; top: 15px;
    article, aside, figure, footer, header, hgroup, menu, nav, section { display:block; }

    A link would be 100 times better.
    But The main question is are you editing the layouts through the admin editor? If so it will change html5 tags because it is only XHTML compliant. Do not use the editor for markup, only content.
    Either code it and upload it through SFTP or use the develop tab if you see it (Partner only) in the top ribbon.
    In terms of the code you posted, there are no html 5 tags like section etc in there as far as I can see.

  • Generate image with CFIMAGE - but need to use img tag to serve the content

    I create a new image with cfimage, that already works without
    any problems.
    But instead of using the action="writetobrowser" I need to be
    able to use the script inside a img tag:
    Example: <img
    src="myscript.cfm?somedata=iwanttheimagetocreate>
    I found one webpage that deals with that problem (
    http://www.webdevelopernews.com/2007/09/14/serving-up-cfimages-via-image-tags/)
    but the image served to the browser, when using the code below, is
    of a very low quality and another point is that you can't serve
    .gif's to the browser.
    <cfcontent type="image/jpg"
    variable="#ImageGetBlob(backgroundimage)#">
    Any suggestions/solutions?
    Thanks,
    Phil

    In that entry Raymond mentions:
    "The WriteToBrowser action actually generates HTML that points
    to a ‘magic’ URL to serve the image.". ie <img
    src="/CFFileServlet/_cf_image/_cfimg-12345036853711072.PNG" alt=""
    />
    Perhaps you could create a function that captures the
    generated html by using <cfsavecontent>.
    <cfsavecontent variable="imageTagHTML">
    <cfimage action="writeToBrower" ..>
    </cfsavecontent>
    Then uses a regular expression to extract and return the url
    portion only. ie
    "/CFFileServlet/_cf_image/_cfimg-12345036853711072.PNG"
    <cfset ExtractedURLHere = SomeFunction(arguments...)>
    <cfoutput><img
    src="#ExtractedURLHere#"></cfoutput>
    Though you could also use the entire html string directly
    <cfoutput>#imageTagHTML#</cfoutput>

  • Unclosed meta/img tag. Output method= xml / xhtml / xml

    Hello,
    Im trying to parse from a Document to an String, in the usually way, as follows:
        public static String parseDocument(Document document) {
            try {
                if (document== null) {
                    return null;
                TransformerFactory tFactory =
                        TransformerFactory.newInstance();
                Transformer transformer = tFactory.newTransformer();
                DOMSource source = new DOMSource(document);
                StringWriter sw = new StringWriter();
                StreamResult result = new StreamResult(sw);
                transformer.transform(source, result);
                String xmlString = sw.toString();
                return xmlString;
    //TODO: error handling
            } catch (TransformerConfigurationException ex) {
                return null;
            } catch (TransformerException ex) {
                return null;
            } catch (Exception ex) {
                return null;
    }Ive maked a test that creates a Document:
      public static Document createFromDoc(){
            try {
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                DocumentBuilder builder = factory.newDocumentBuilder();
                DOMImplementation impl = builder.getDOMImplementation();
                Document doc = impl.createDocument(null, null, null);
                Element root = doc.createElement("html");
                doc.appendChild(root);
                Element head = doc.createElement("head");
                root.appendChild(head);
                Element meta = doc.createElement("meta");
                meta.setAttribute("http-equiv", "Content-Type");
                meta.setAttribute("content", "text/xml");
                meta.setAttribute("charset", "UTF-8");
                head.appendChild(meta);
                Element title = doc.createElement("title");
                head.appendChild(title);
                Element body = doc.createElement("body");
                root.appendChild(body);
                Element div = doc.createElement("div");
                div.appendChild(doc.createTextNode("Created with docs."));
                body.appendChild(div);
                return doc;
            } catch (ParserConfigurationException ex) {
                Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
                return null;
        }Well, you can see the test method "prueba1". Y:
        public static void prueba1(){
            Document doc1 = Main.createFromDoc();
            //String doc2 = Main.createFromString();
            String doc1Str = GestorXMLDoc.parseDocument(doc1);
            return;
        }Why my method public static String parseDocument(Document document) adds this extra meta tag when it transforms a Document to an String:
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    and modifies the other meta tag as follows (I mean, unclosing it):
    <meta charset="UTF-8" content="text/xhtml" http-equiv="Content-Type">
    You can see the full String result:
    <html>
    <head>
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="UTF-8" content="text/xhtml" http-equiv="Content-Type">
    <title></title>
    </head>
    <body>
    <div>Created with docs.</div>
    </body>
    </html>I tried parsing with a fake XSLT Template with output: XML, and it doesnt works. I tried changing the meta content data with "text/xml".
    This method makes the document not compatible with XML, because it doesnt close the meta tag. I need work with this XHTML doc as a valid XML document, not as a HTML (W3C allows set meta/link/img tags unclosed) to add new nodes.
    Thank you ppl =)

    First of all, what you are trying to do is transforming, not parsing. Parsing is converting an XML document into an internal form, and you already have the XML in the internal form (org.w3c.dom.Document).
    Anyway, XSLT has special rules for transforming a document whose root element's name is "html". It looks like those rules are being applied in your case. If you don't want them to be applied (which you don't if you are producing XHTML) then you have to tell the transformer you want XML as your output and not HTML.
    If you had an XSLT document you would use <xsl:output method="xml"/>, but you don't have one in this case. So you do it like this:
    transformer.setOutputProperty(OutputKeys.METHOD, "xml");

  • Problem in html:link tag in struts

    hi every body i have a problem i have to pass two dynamic variable to next page using html:link tag how can i send it
    for example
    <a href = "editEmp.jsp?id=<%= empSno %>&&delete=no"> Edit </a>
    should be coverted into <html:link >and i want to pass 2 parameters to next page how can i do can anybody help

    i have used forward only but how to passs variable dynamically in forward for eaxmpleeee
    i am retreving records from database
    emdID name desig
    1 suresh PM edit
    2 ram PL edit
    when user clecks on link of edit of suresh then i should pass controll to edit page with his empID an parameter............
    i have done this prevoiusly by href tag like
    while (rst.next()) { %>
                        <tr>
                             <% empSno = rst.getInt ("ID");%>
                             <td align = "left"><%= empSno %></td>
                             <td align = "left"><%= rst.getString ("empno") %></td>
                             <td align = "left"><%= rst.getString ("empname") %></td>
                             <td align = "left"><%= rst.getString ("desig") %></td>
                             <td><a href = "strutsEx/ch05/editEmp.jsp?id=<%= empSno %>&&delete=no"> Edit </a>&nbsp&nbsp&nbsp&nbsp<a href = "editEmp.jsp?id=<%= empSno %>&&delete=yes"> Delete </a>
                             </td>
                        </tr>
    now i want to use html:link action in place of HREF can u help me plzzzzzzzzzz

Maybe you are looking for