How to display a html file without tags?

Hello,
I am new for Java programming. Now i have to display a html file without all the tags. My code is the fllowing:
u = new URL("http://www.ncbi.nlm.nih.gov/entrez/viewer.fcgi?db=protein&val=55584070");
BufferedReader in = new BufferedReader(new InputStreamReader(u.openStream()));
while ((s = in.readLine()) != null) {
System.out.println(s);
in.close();
Unforturnately, the output is the soucecode of the html file and I just want the content.
Please help me.
Thanks a lot in advance,
Danica

Here's a simple example
http://forum.java.sun.com/thread.jspa?threadID=293830
I haven't tested it, but I bet camickr did.

Similar Messages

  • How can i sue html:file property=""/ tag?

    Hi gyz,
    I am using struts framework, in ajsp I want to upload file for that I am using <html:file property=""/> tag, but in jsp it is giving error like unavailable attribute.
    Anybody help me how can i use this tag.
    Advanced Thanks,
    Mahendra

    Hi,
    Now it is not giving any error in jsp and in jsp page it is displaying one text box and a browse button.
    But the problem is the file which I try to upload is I am not getting in action class the code i used is
    In JSP
    I write code like
    <html:file property="xmlFile"/>
    In action form I created field like
    private FormFile xmlFile; and created setters & getters for this field
    In action class I written code like
    FormFile xfile=form.getXmlFile();
    String contentType = xFile.getContentType();
    String fileName = xFile.getFileName();
    System.out.println("contentType: " + contentType);
    System.out.println("File Name: " + fileName);
    now I want to try upload any file it is giving error

  • How to display the HTML File Titles instead of File Names

    Hello All,
    I want to display the HTML file titles instead of File names in the Search Results. I've tried to give this command in the 'Visible Properties' in the 'SearchResourceRenderer' as:-
    Visible Properties: rnd:displayTitle
    However this is not working for me. If anyone has an idea of what to pass here or any other alternative to display the Titles.
    Regards
    Vaib

    Summary of steps:
    1) Standard Layout Set used: SearchResultLayoutSet
    2) Create a new layout set using ADVANCED COPY
    3) Change properties as you require
    4) Next modify the search OTH file to reflect this newly created Layout Set (under KM > root > etc > oth > search.oth edit xml file property rndLaoutSet from SearchResultLayoutSet to MyCustomSearchResultLayoutSet)
    5) Check in the document to complete the editing process if Edit Locally is used!
    6) Lastly, activate the OTH file by –
    •     Setting Debugging settings via Debugging Settings
    •     Performing a normal search
    •     Clicking Rendering information and then following link OTH Overview click on Reload
    7) Reload above reloads the OTH file and performing search again will yield the desired result
    8) To turn off the Rendering Information link remove the user id from Debugging Settings.
    Cheers
    Ankit

  • How to display local HTML file in web-view?

    Hello everyone,
    we have no problem with showing of remote HTML content from server in box on page in web view. But how we can show such a content when included in HTMLResources? In guide is just "Display a local HTML file in an in-app browser", which works wihout problem, but we don't want to show this HTML content in in-app viewer, it should be part of page.
    Thanks
    Martin

    Now i'm confused. In guide is this:
    To use local HTML files, click the folder icon and specify the local HTML file. The HTML file (such as index.html) should appear in a folder that includes any images or scripts used in the HTML file.
    But no info where such a local HTML file should reside. If this file is in HTMLResources, it is ignored.

  • How to display an HTML file in text Area?

    I am trying to display an HTML formated file in  text area component using Action 3.0. The following script does not generates compiler errors, each function seems to be executed yet the file is not displayed. When trying the same code with myCV.txt and myCV_TA.text = (loader1.data) the text file is displayed OK. Flash MX and actionscript 2.0 had handled that differently but with success???
    ( myCV_TA is the text area component)
    Thanks
    var loader1:URLLoader =new URLLoader();
    loader1.addEventListener(Event.COMPLETE,displayText);
    textload("myCV.html");
    function textload(file:String)
    loader1.load(new URLRequest(file));
    trace("in textload");
    function displayText(e:Event)
    myCV_TA.htmlText = (loader1.data);
    trace("in displaytext");

    hmm.. never tried to use an .html file like that in flash, what's inside that file? text with images tables and so on? the htmltext property supports only a few HTML tags, maybe it's not working because an unsupported tag has been detected.

  • How To Display an HTML File

    Hi. Can I display the following .HTM from a button on my form?
    /usr/IBM/WebSphere/AppServerCommunityEdition/repository/default/TTMSWeb/1222365662123/TTMSWeb-1222365662123.war/adds_reporters.htm
    Is there a built-in for this?

    The file is on an app server. It's physically located here:
    /usr/IBM/WebSphere/AppServerCommunityEdition/repository/default/TTMSWeb/1222365662123/TTMSWeb-1222365662123.war/adds_reporters.htm
    But it is accessed using this link:
    http://9.35.32.205:8080/TTMS/scanner_returns_report.htm
    Can you give me an example of how and where to create the virtual directory mapping? Is this done in the Web Form config files?
    Once a virtual directory mapping is created how would the call to the .htm file look using the web.show_document built-in?
    Sorry I'm have trouble picturing just how this might look coded in my form. Thanks in advance.

  • How do I save a pdf as an html file without losing formatting?

    How do I save a pdf as an html file without losing formatting?  My coworker is able to do this on her Adobe 9 by saving to html css 4.0 - I have Adobe 11 and have not been able to save as an html at all without loosing formatting.

    Are the PDF files that you are attempting to Save As HTML tagged?

  • Iview display HTML file without KM

    Hello All,
    I want to display my HTML files in the Portal but we dont need to have KM, is there any other way we can achieve this.
    Vaib

    Hi Vaib,
    if your HTML should be put into the deployed PAR (which I would expect), include it from there via API, see http://help.sap.com/saphelp_nw04/helpdata/en/2e/61b942dc2eb611e10000000a155106/frameset.htm and http://portal.dk.issworld.com:50000/irj/portalapps/javadocs/runtime/com/sapportals/portal/prt/resource/iresource.html (STATIC_PAGE).
    Hope it helps
    Detlev

  • Want to open a new browser window and display the html file in locale disk.

    Hi,
    I want to open a new browser window and display the html file in local drive. The below html applet work in local system successfully. But i deploy the same in web server (Tomcat) and try the same in client machine it does not work. Please help.
    Note:
    The class below fileopen.FileOpen.class i make it as a jar and put it in jre\ext folder at the client machine.
    ------------------------------------FileOpen.html(Tomcat)-----------------------------------------------------
    <html>
    <body >
    <applet code="OpenFile.class" archive="loadfile.jar" width="100" height="100">
    <param name="path" value="file://c:/open.html" />
    </applet>
    </body>
    </html>
    -------------OpenFile.java in server(Tomcat)--------------------------------------------
    public class OpenFile extends Applet implements ActionListener{
    String path = "";
    fileopen.FileOpen open = null;
    Button b = null;
    public void init(){
    path = getParameter("path");
    b = new Button("Open");
    b.addActionListener(this);
    add(b);
    public void actionPerformed(ActionEvent ae){
    try
    open = new fileopen.FileOpen(this,path);
    catch (Exception e){
    e.printStackTrace();
    -------------------------------------------FileOpen.java /Client JRE/ext----------------------------------------------------
    package fileopen;
    public class FileOpen
    AppletContext context = null;
    URL url = null;
    public FileOpen(Applet applet,String path)
    try
    if(null != applet){
    context = applet.getAppletContext();
    if (null != path)
    url = new URL(path);
    context.showDocument(url, "_blank");
    }catch(Exception ex)
    ex.printStackTrace();
    Please help to solve this issue very urgent.
    Thanks in advance.
    By,
    Saravanan.K.

    zzsara wrote:
    I want to open a new browser window and display the html file in local drive. ...Did you ever pause to consider how ridiculous that is?
    The best audience for applets is people off the internet. 'People off the internet' might be using a computer that has no (what was it?) 'open.html' in the root of the C: drive. In fact (shock horror) they may not even be running Windows, and would therefore probably have no 'C:' drive at all.
    If you do not intend to distribute this to people off the web, an application makes a lot more sense, but even then, you cannot rely on the document being there unless you 'put it there' (during installation, for instance).
    As the other poster intimated, applets can load documents off the local disk as long as they are trusted. Here is an example*, but note that it is not so rash as to presume any particular path or file, and instead leaves it to the user to choose the document to display.
    * The short code can be seen at SDNShare on the [Defensive Loading of Trusted Applets|http://sdnshare.sun.com/view.jsp?id=2315] post.
    On the other hand, a sandboxed applet can load any document coming from its own server via URL, or get showDocument(URL) to work. In that case, the JRE must recognize that the URL is from its own server, so the best way to form URLs for applet use is via the URL constructor
    new URL(getDocumentBase(), "path/to/open.html");That is how I form the URL in this [ sandboxed example of formatting source|http://pscode.org/fmt/sbx.html?url=/jh%2FHelpSetter.java&col=2&fnt=2&tab=2&ln=0]. Of course, in this case the applet loads the document, then parses the text to draw the formatted version, but the point is that an URL produced this way will work with showDocument(URL).
    I am pretty sure showDocument() in an applet off the internet will work with an URL pointing to a foreign (not its own) server, but it will not be able to load documents off the end user's local disks.
    I suggest a couple of things.
    - Try to express this problem in terms of what feature it is that you want to offer the end user. Your question jumps directly to a bad strategy for achieving ..who knows what? An example of a feature is "Shows the applet 'help' files on pressing F1".
    - A good way to indicate interest in a solution is to offer [Duke stars|http://wikis.sun.com/display/SunForums/Duke+Stars+Program+Overview] to match that interest.
    Edit 1:
    ..and please figure out how to use the CODE tags.
    Edited by: AndrewThompson64 on Sep 12, 2008 11:14 PM

  • How to add a html file into JEditorPane

    Hi
    I am doing an aplication on swing.But I don't know how to add a html file to the JeditorPane keeping the html file on the source code. i.e my html file is in my source code.Then how to add this html file to Jeditor pane.
    Thanks
    Srikant

    QuickTime requires player and plugins that most people don't have.  You'll reach a much wider audience if you use HTML5 <video> with mp4, webm and ogg files.
    <!doctype html>
    <html>
    <head>
    <meta charset="utf-8">
    <title>HTML5 with Video</title>
    <!--help for older IE browsers-->
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    </head>
    <style>
    video {
        max-width:100%;
        display:block;
        margin:0 auto;
    </style>
    <body>
    <h2>Use 3 File Types to support all browsers &amp; mobile devices:  MP4, WEBM and OGV.</h2>
    <h3>Online Video Converter
    http://video.online-convert.com/</h3>
    <!--begin video-->
    <video controls poster="Your_poster_image.jpg">
    <!--these are 6 sec sample videos for testing purposes. Replace sample-videos with your own files-->
    <source src="http://techslides.com/demos/sample-videos/small.webm" type="video/webm">
    <source src="http://techslides.com/demos/sample-videos/small.ogv" type="video/ogg">
    <source src="http://techslides.com/demos/sample-videos/small.mp4" type="video/mp4">
    If you're seeing this, you're using an
    outdated browser that doesn't support
    the video tag. </video>
    <!--end video-->
    </body>
    </html>
    Nancy O.

  • How to open a html file from hard disk

    Hello everyone,
    i want to display a html file by using java applet.
    This is my current coding:
    package mkbe.pg;
    import java.net.*;
    import java.applet.*;
    public class HtmlReader extends Applet 
    URL userUrl;
    public void start()
    try{
    userUrl = new URL(getDocumentBase(),"FILE:///c://2007/index.htm");
    }catch(MalformedURLException error){
    System.out.println("Error");
    getAppletContext().showDocument(userUrl,"_blank");
    }the program have no error and warning and the applet did run by appletviewer but the html file did'nt open.
    Is it there's mistake in my coding?
    If there is please tell me how to repair it.
    Thanks

    For an applet to read from a client's harddrive it will need permission.
    This can be done by putting the applet in a jar file and signing it,
    or by using the poiclytool to change the java.policy file to give FilePermission.

  • How to display an html located in server to client browser?

    Hi,
    i want to display an html file located at the server to a client browser. how can i do it? and i want the user to select the particular file thru an open dialog box. will it be possible?
    regds,
    Abhi...

    in general about files :
    http://forum.java.sun.com/thread.jsp?forum=45&thread=522723&start=0&range=15#2502318
    simple for html: soemdecription

  • Embed  html file without using IFrame UI

    Is there any way to embed html file without using IFrame UI?

    Hi
    To embed a static HTML content inside your view, Iframe is the easiest form or else, you can provide links through Linktourl UI or through a static text or a button, invoke a action and display the HTML content inside the frame or call it in a seperate (external) window.
    Otherwise, we have only less options!
    if you have anything specific, do let us know
    thanks
    sathya

  • How to display a pdf file in jsp

    hi,
    How to display a pdf file in jsp iam having a class which will return fileinputstream of the file object. the pdf file is in server.
    regards
    Arul

    A JSP is a combo of HTML and Java, so you can't really "display" a PDF file in a JSP.
    You can provider a href link to the PDF file in your JSP.
    You can use some utility package to read the contents of the PDF, pull certain things out of it, and display that in your JSP as html
    In a servlet you can set the content type to application/pdf and write the binary data of the PDF back to the browser. Once the browser finishes reading in the data it should open the PDF.

  • How to Parse an HTML File?

    Hi all
    I want to parse an HTML file?
    How is it possible?
    After taking an input which is an HTML file, i need to parse it, and i need to print/modify values based on some tags?
    Please help me, how to parse an HTML file?

    You start by reading the first character and then continiung until you reach the last character.
    For a more serious answer try elaborating on your question. Its really really vague.

Maybe you are looking for

  • Inspection lot

    Hi Experts, I have created manually inspection lot.When I was trying to result recording,system show following error. Characteristic results cannot be recorded for inspection lot 050000000250 Diagnosis You cannot record any characteristic results for

  • How to create placeholder garphics with unique filenames shown as text?

    I need to create quite a few placeholder graphics, which are all the same size and background colour, and which show the filename of the graphic as text in the graphic. Later each will be replaced. I have the filename list but am not sure how I would

  • Raw files opens in PE

    Hello When I click file-open and open a raw file (cr2) in PE 8, it does not open i camera raw editor, but in PE. I have the last version of camera raw 6.1.0.250, and I also have the latest raw codec from Canon. This happends with both camera Im using

  • Problems saving changes in image size

    I have some digital files that I need to resize for printing. Most need to be sized to print full-frame on 8.5 by 11 inch sheets of paper, while the others need to be full-frame on 5 by 7 paper. I'm using a trial version of PS Elements. I call up the

  • 'Tags' in Organizer

    I'm running Organizer. When I've selected and assigned a group of pictures to a category, should a 'tab' sybol remain on the picture in 'Media' so we know that the photo's been catalogued?