Very important:   tag img=????

I have a problem with the method getAttribute.
I'm scanning a web page looking for the tag IMG but doesn't work.
If I look for <A> it works;
I don't understand why, can you help me???
Here is the code:
Reader rd = getReader(args[0]);// the URL
kit.read(rd, doc, 0);
ElementIterator it = new ElementIterator(doc);
javax.swing.text.Element elem;
while ((elem = it.next()) != null)
SimpleAttributeSet s = (SimpleAttributeSet) elem.getAttributes().getAttribute(HTML.Tag.IMG);
if (s != null)
System.out.println(s.getAttribute(HTML.Attribute.SRC));
}

Sorry, try this:
Reader rd = getReader(args[0]);// the URL
kit.read(rd, doc, 0);
ElementIterator it = new ElementIterator(doc);
javax.swing.text.Element elem;
while ((elem = it.next()) != null)
   if (elem.getName().equals(HTML.Tag.IMG.toString()))
      System.out.println(elem.getAttributes().getAttribute(HTML.Attribute.SR));

Similar Messages

  • 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.

  • I have numbers on my ipad and after the latest update I can't open a spreadsheet in it, a very important spreadsheet. I have rebooted a number of times but this does not seem to have fixed it can someone advise what I can do??

    I have an ipad and have just downloaded the lastest update, now I have a very very important spreadsheet that will not open!!!! other spreadsheets open fine but for some just this one will not open. I have rebooted the ipad and tried re-syncing but to no avail, can anyone HELP?????

    I had the same problem. I created an iCloud account and backed up my iPad to iCloud. I then went to www.iCloud.com, signed-in and then I was able to download my spread sheet data. At least I have my data.

  • HT204053 Me and my daughter had been using the same apple id, she was triyng to change it now all of my iphone contact are gone, what can i do ti get it back , this is very important to me.

    Me and my daughter had been using the same apple id, she was triyng to change it, now all of my iphone contact are gone, what can i do ti get it back , this is very important to me.

    Your contacts are helpd on the server, so if you sign out from your iCloud account and sign into another one they will disappear. If you sign back into the original account they will reappear.

  • How can I view my pictures that were backed up to iTunes? I no longer have an apple product but need to view the pictures for very important reasons.

    How can I view my pictures that were backed up to iTunes? I no longer have an apple product but need to view the pictures for very important reasons.

    If you mean backed up as part of an iPhone backup in iTunes?  If so, you would have to use 3rd party software to extract them from the backup, such as iPhone Backup Extractor.

  • A very important site, does not function properly anymore, how can i go back to an earlier version of firefox

    Before i downloaded your firefox 8.0.1, I used firefox to 'save as' the ''Unrealized gain/loss page'' from a brokerage account, - for my ongoing historical financial records file (safari doesn't work for this site).
    On the Unrealized gain/loss page, there is a '+' symbol (in front of each stock owned) that one needs to 'clic' on (turns to a -) to see the various dates (and financial data) when you purchased different lots of the same stock. (say, ''IBM''; purchased IBM shares on 21-10-'11, 100 shares, @ $147, current price @ $180, gain of $33/share, total gain $3,300 / 10-14-'11 purchased 200 IBM shares, @ $191, current price @ $180, loss of $11/share, total loss $2200 / - and so on for however many individual 'lots' one has of that particular stock. ). This information is very important to me, and now i can not 'save' it.
    - So I want to know how I 'fix' this - or - how I can go back to the earlier version, that did work.

    To downgrade to Firefox 3.6 first uninstall Firefox 4, but do not select the option to "Remove my Firefox personal data". If you select that option it will delete your bookmarks, passwords and other user data.
    You can then install the latest version of Firefox 3.6 available from http://www.mozilla.com/en-US/firefox/all-older.html - it will automatically use your current bookmarks, passwords etc.
    To avoid possible problems with downgrading, I recommend going to your profile folder and deleting the following files if they exist - extensions.cache, extensions.rdf, extensions.ini, extensions.sqlite and localstore.rdf. Deleting these files will force Firefox to rebuild the list of installed extensions, checking their compatibility, and reset toolbar customizations.
    For details of how to find your profile folder see https://support.mozilla.com/kb/Profiles

  • [HELP] using multiple value parameter in c:import tag

    I need to pass a multi-value parameter to a included page. e.g.
    http://myhost/MyContext/dir1/page1.jsp?abc=value1&abc=value2/dir1/page1.jsp includes /dir2/page2.jsp, and would like to pass this multi-value parameter over, but change the name to xyz, some what like
    <c:import url="/dir2/page2.jsp?xyz=value1&xyz=value2"/>The problem is that the number of values is not fix number, so I have to write some logic to iterate thru its parameter values. But the <c:import> tag body allows only simple listed <c:param> tags, it doesn't allow other logic/condition/iteration.
    <!-- gives java.io.IOException: javax.servlet.jsp.JspException: The taglib validator rejected the page: "Illegal child tag in "c_rt:import" tag: "c:forEach" tag at runtime -->
    <c:import url="/dir2/page2.jsp">
    <c:forEach var="xyz" items="${paramValues.abc}">
    <c:param name="xyz" value="${xyz}"/>
    </c:forEach>
    </c:import>{code}
    I also tried <c:url> tag. The good news is that it supports jsp logic in body:
    {code}<c:url var="url" value="/dir2/page2.jsp">
    <c:forEach var="xyz" items="${paramValues.abc}">
    <c:param name="xyz" value="${xyz}"/>
    </c:forEach>
    </c:url>
    <c:out value="${url}"/>{code}but it prefixes the url with the current context:
    {code}/MyContext/dir2/page2.jsp?xyz=value1&xyz=value2{code}
    Now I run into a dead end. It seems the only way out is to use <% %> scriptlet to do my own url composite, which is pretty similar to <c:url> but avoid the context part.
    Any suggestion?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    out.println("<html>");
    out.println("<head>");
    out.println("<script language=\"JavaScript\">");
    out.println("function altSubmit() {");
    out.println("document.MyForm.action = \"Second.html\";");
    out.println("document.MyForm.submit();");
    out.println("}");
    out.println("</script>");
    out.println("</head>");
    out.println("<body>");
    My personal suggestion is to use follow the MVC (Model View Control) pattern where in you can write all your "html" part in a JSP.
    Model -> Bean
    View -> JSP
    Control -> Servlet

  • I have several very important school related documents on my iPad in the Pages app. Ever since i updated to iOS5, i can no longer open any documents in Pages that I made before I updated. Please help

    I have several very important school related documents on my iPad in the Pages app. Ever since i updated to iOS5, i can no longer open any documents in Pages that I made before I updated. Please help

    Without the iPad connected, open up iTunes on your computer.  Go to iTunes/Preferences/Devices and delete the backups that you're absolutely certain do not have the documents.  Refer to figure below.
    iTunes, select the iPad and then select the Summary tab.  Follow directions for Restore and be sure to say "NO" to creating a backup.  (You don't want to create a new backup that does not have the docs.)  You will then be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad.  This time, say "yes."
    Repeat all of the above as required until you get the docs.

  • SoundFonts - small problem. Please help me because this is very important to

    Hello everyone. I have just upgraded from a SoundBlaster Audigy, to a SoundBlaster X-Fi Music edition.
    I have a collection of soundfonts which I used to use on my Audigy. They worked fine. Now that I'm using the X-Fi, they all work well, apart from one, and the one that doesn't work is my most used, most important soundfont.
    Description of problem:
    When I run my midi file, it starts playing the music using the new soundfont, but after about 0 seconds or so, the sound stops - even though the music is still playing. I then can occasionally hear a note or two, but its no longer playing properly. All my other soundfonts work perfectly, so I really dont understand why this one would cause troubles. They are all .SF2 files.
    Other Information:
    ) I am using "SoundFont Bank Manager" to load the soundfonts. They all work great apart from the main one I want to use. It worked fine on my Audigy. The Cache part says 7.3mb Used/ 229.8mb Free.
    2) I am on Windows XP Professional - Service pack 2.
    3) The rest of my computer is very powerful. Its a core2duo, 2gig of RAM, 320gig seagate barracuda hard dri've etc. Regularly defragged.
    4) I have the latest soundcard drivers (And direct X, video drivers, bios drivers, etc.).
    5) I have no other problems with the computer.
    6) My Midi program is Guitar Pro, which plays special midi files. It is set up properly, and it plays everything perfectly - using all my soundfonts, except the one I most want to use..
    Please help me get this working. It is very important to me, and I need to get it working as soon as possible. I'll keep searching this thread incase I need to give any more information.
    Thanks in advance.Message Edited by acrobat on 02-09-200705:0 AM

    Why do you have two threads dealing with the exact same issue. That makes it confusing and hard to follow your issue to help you.
    Who is your carrier, I asked in the other thread?
    Have you tried YOUR sim card in another device, what happens?
    1. If any post helps you please click the below the post(s) that helped you.
    2. Please resolve your thread by marking the post "Solution?" which solved it for you!
    3. Install free BlackBerry Protect today for backups of contacts and data.
    4. Guide to Unlocking your BlackBerry & Unlock Codes
    Join our BBM Channels (Beta)
    BlackBerry Support Forums Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • My documents on my iCloud storage got automatically deleted, is there any possible way to recover them? They're nearly 1GB and very important to me.

    On January 26th, I downloaded iCloud for Windows and logged in using my account which was the same with the one on my Mac. 2 days later, at 3:27 PM January 28th, my 1 GB of documents on my iCloud storage got deleted automatically. I'm saying this because at that time I was sleeping and both my Mac and my Windows PC are turned off, and I'm home alone, besides there was no suspicious login reported to me by Apple.
    So is there any possible way to recover these documents? I'm a teacher and they're very important to me. My Time Machine wasn't enabled so using it is useless.
    Thank you so much for any help.

    Please please help me, if you know how.

  • A very important question about the HostSample-Help needed!

    Hi,
    I'm trying to build a plugin for EM 12c ( 12.1.0.2 ) which suppose to monitor jmx mbeans .
    I encountered during the README file which was packed with the EDK .
    1. In the section where I try to use Flash builder ( ver 4.6 - that's the only release I found .. ) I folowed the instructions if how to run the example ( HostSample/HostSystem ) . When I run the example ( I installed the sdk's of Flash and everything that was written there - no problem )
    in the web browser i got the login page , and put the parameters ( username, password ) as it said in the README - the same username/password as i log in to the EM console .Than I got an error saying " ... RPC fault string ..... Logging to management server ... URL:https.. host ( my host name ) : port ( my port number ) /em..."
    Does anyone has a clue about this ? What am i doing wrong or miss something ?
    It is very important and urgent to me . please help .

    To add a bit more detail. Before you run the application from FlashBuilder, open the same browser you will use to run/debug the application in FlashBuilder and install certificate.
    Firefox:
    . when the "This Connection is Untrusted" warning appears
    . expand the "I Understand the Risks" item
    . click the "Add Exception..." button
    . on the "Add Security Exception" dialog, ensure "Permanently store this exception" is checked
    . click "Confirm Security Exception" button
    IE:
    . when the "Certificate Error: Navigation Blocked" page appears, click "Continue to this website (not recommended)"
    . click on the "Certificate Error" icon in the browser address bar
    . in the "Untrusted Certificates" popup, click "View Certificates"
    . click on the "Certification Path" tab of the "Certificate" dialog
    . select the root certificate (certificate at the root of the tree)
    . click "View Certificate..." button
    . click "Install Certificate..." on the "Certificate" dialog that appears
    . click "Next" on the "Certificate Import Wizard"
    . select "Place all certificates in the following store" button and click "Browse..."
    . select "Trusted Root Certification Authorities" on the "Select Certificate Stores" dialog and click "OK"
    . click "Next" button, and then "Finish" button
    . click "Yes" on "Security Warning" dialog that appears
    The other alternative is to enable http access using "emctl secure unlock". This is not recommended for a production site.
    .

  • My iphone was stood on there there may be a fine crack in the mother board, i have very important voice recordings on the phone but although i can see them working there is no audio at all i cant link up to itunes  and i need to listen to the recordings

    Hi everyone, hope you can help.  My iphone was stood on and broken and i hadnt backed it up to itunes, i have had it repaired, it looks brand new but it has no audio at all, i have very important voice recordings that i need off the phone i can see them running but cant hear them, ive tried earphones but still nothing, the phone only works for a short period of time when plugged into the mains and has no internet connection now, is there any way ref software etc that i can get these messages off my phone, im desperate
    Thanks, Mellanni x

    If it will not connect to your computer, and it will not connect to the Internet, either via WiFi or cellular data, then there is no practical way to extract the information. There are no magic words that will fix the broken hardware.
    You could try a 3rd party data recovery service, but doing so will forfeit your right to a discounted out of warranty replacement. Only you can decide it it's worth that.

  • I deleted my note by accident i do have notes on icloud. so i had half the note saved but the other half was very important and hard to right. i restored my ipod on i cloud back up but it still doesnt show i put so much time in that anyway to get it back?

    i deleted my note by accident i do have notes on icloud. so i had half the note saved but the other half was very important and hard to right. i restored my ipod on i cloud back up but it still doesnt show i put so much time in that anyway to get it back?

    How did you delete the Note? If you did a "select all" and "cut", open the Note and shake your iPhone to undo the cut action.

  • I have lost all my notes saved on my iphone after syncing it. and my default mailbox is gmail. notes were very important. and now i dont know how to get them back. can anyone help me out please? thanks in advance.

    i have lost all my notes saved on my iphone after syncing it. and my default mailbox is gmail. notes were very important. and now i dont know how to get them back. can anyone help me out please? thanks in advance.

    Try this ..
    On your Mac open System Preferences > iCloud
    Deselect the box next to:  Notes
    Then reselect it.
    Give iCloud a few minutes to re sync the data.
    Other than that, try Time Machine >  http://pondini.org/TM/15m.html

  • Issue with JSTL ( c:import ) tags in Weblogic 9.2

    Hi,
    I'm trying to migrate a struts (1.2.9) application from Weblogic 8.1 to Weblogic 9.2. This application has JSPs with JSTL (1.0) tags.
    I have a JSP page that has multiple (around 7) c:import statements. When I launch my application, only the content from the last c:import statement is being displayed and rest of the c:import tags statements is simply ignored by Weblogic.
    I don't find any errors in the logs. When I comment out last c:import statement in this JSP then the content from the above c:import statement is being displayed. Only one (last one) c:import statement's content is being displayed in that whole page.
    This app worked just fine Weblogic 8.1.
    Any resolutions, hints, insights or workarounds on this issue is appreciated.
    Thanks in advance,
    Mani
    Edited by: mayyalas on Aug 10, 2009 6:13 PM

    Hello,
    You should not need to edit the wlp-light-web-lib.war weblogic.xml file. There are many places where other classes in wlp-light-web-lib are dynamically loading classes (using Class.forName()) from "higher-level" shared library modules (such as wlp-framework-full-web-lib), so I am certain that it works in general. There may just be an issue with how your shared library is set up, or how your webapp deployment descriptors are set up.
    So you mention that you have a shared library module containing your implementation of the AnalyticEventHandler; is this a .war file? And in the webapp you are trying to deploy this in, does your weblogic.xml explicitly include your shared library? If so, is your shared library being included before or after the standard WLP shared libraries?
    If you would like, posting your webapp's weblogic.xml may help to find the problem.
    Kevin

Maybe you are looking for

  • Problem in javax.xml.stream package

    i am getting some trouble while using the import statement for following package:- import javax.xml.stream.*; I have j2sdk1.4.2 installed in my system. I am using NetBeans 3.6 IDE. Should i copy some jars in order to resolve this issue. You can send

  • I need to filter my report based in group totals

    Hello I'm creating a report for the invoices tables, I need to have the sum of all invoices of the clients by month (only the past three months based in the date of the report). The sum of the invoices is also based in the Item Code. I retrive the vo

  • JSP tags and onLoad

              I have a JSP custom tag that places a value in the HTTPRequest attribute section.           A chunck of code within a JavaScript function called from a <BODY onLoad> statement           in the JSP is to pick up this value. However, the onLo

  • [Solved] where is the gtk-config menu in kde?

    Hi, i am a kde user and i have ever used kde-gtk-config to configure gtk application on kde desktop. Yesterday i have seen that the voice of gtk configuration in the settings menu of kde is disappeared. What happened to this package? Last edited by b

  • Why do I get weird glitching pink lines in my export?

    When I Export from Premiere Pro CC, I almost always get these weird pink lines glitching in the video file accompanied by skipping video... Usually it happens just at the very beginning of the exported clip, but sometimes it's happened the whole way