How to display a website page in a JSP textarea ?

Hi all...
I am developing an application where i need to display a web page in a text area, the same
way it gets displayed in a web browser (like IE, mozilla). After that i will read the page and will extract text from it for further processing.
My JSP contains a text field where i can type the URL address (say http://www.yahoo.com)
What i want is, when i will click a submit button, the web page at the given URL should be retrieved and should get displayed in the textarea that is present on the same page. (It should be displayed in the same way as it
gets displayed on the browser.)
Is that possible ? Can it be done using some other ways ?
It is a small application that i am developing using struts 1.1.
Can some one help in this regard ?
Thanks in advance..
Regards
Prasad

Thanks BalusC..
I have used iframe now and it is working for the URL specified.
But even then i have couple of doubts..
1. How should i use the iframe if i want to navigate on the further web pages within the same frame ?
(e.g. if with URL say http://www.yahoo.com, the home page is displayed in the frame, now if i click any link
on the page the next navigation should occur within given frame only.)
2. Can i read the page from the frame and write the text into some file say text file ?
Hope you understand my problem...
Thanks a lot..
Prasad

Similar Messages

  • ADF how to display a processing page when executing large queries

    ADF how to display a processing page when executing large queries
    The ADF application that I have written currently has the following structure:
    DataPage (search.jsp) that contains a form that the user enters their search criteria --> forward action (doSearch) --> DataAction (validate) that validates the inputted values --> forward action (success) --> DataAction (performSearch) that has a refresh method dragged on it, and an action that manually sets the itterator for the collection to -1 --> forward action (success) --> DataPage (results.jsp) that displays the results of the then (hopefully) populated collection.
    I am not using a database, I am using a java collection to hold the data and the refresh method executes a query against an Autonomy Server that retrieves results in XML format.
    The problem that I am experiencing is that sometimes a user may submit a query that is very large and this creates problems because the browser times out whilst waiting for results to be displayed, and as a result a JBO-29000 null pointer error is displayed.
    I have previously got round this using Java Servlets where by when a processing servlet is called, it automatically redirects the browser to a processing page with an animation on it so that the user knows something is being processed. The processing page then recalls the servlet every 3seconds to see if the processing has been completed and if it has the forward to the appropriate results page.
    Unfortunately I can not stop users entering large queries as the system requires users to be able to search in excess of 5 million documents on a regular basis.
    I'd appreciate any help/suggestions that you may have regarding this matter as soon as possible so I can make the necessary amendments to the application prior to its pilot in a few weeks time.

    Hi Steve,
    After a few attempts - yes I have a hit a few snags.
    I'll send you a copy of the example application that I am working on but this is what I have done so far.
    I've taken a standard application that populates a simple java collection (not database driven) with the following structure:
    DataPage --> DataAction (refresh Collection) -->DataPage
    I have then added this code to the (refreshCollectionAction) DataAction
    protected void invokeCustomMethod(DataActionContext ctx)
    super.invokeCustomMethod(ctx);
    HttpSession session = ctx.getHttpServletRequest().getSession();
    Thread nominalSearch = (Thread)session.getAttribute("nominalSearch") ;
    if (nominalSearch == null)
    synchronized(this)
    //create new instance of the thread
    nominalSearch = new ns(ctx);
    } //end of sychronized wrapper
    session.setAttribute("nominalSearch", nominalSearch);
    session.setAttribute("action", "nominalSearch");
    nominalSearch.start();
    System.err.println("started thread calling loading page");
    ctx.setActionForward("loading.jsp");
    else
    if (nominalSearch.isAlive())
    System.err.println("trying to call loading page");
    ctx.setActionForward("loading.jsp");
    else
    System.err.println("trying to call results page");
    ctx.setActionForward("success");
    Created another class called ns.java:
    package view;
    import oracle.adf.controller.struts.actions.DataActionContext;
    import oracle.adf.model.binding.DCIteratorBinding;
    import oracle.adf.model.generic.DCRowSetIteratorImpl;
    public class ns extends Thread
    private DataActionContext ctx;
    public ns(DataActionContext ctx)
    this.ctx = ctx;
    public void run()
    System.err.println("START");
    DCIteratorBinding b = ctx.getBindingContainer().findIteratorBinding("currentNominalCollectionIterator");
    ((DCRowSetIteratorImpl)b.getRowSetIterator()).rebuildIteratorUpto(-1);
    //b.executeQuery();
    System.err.println("END");
    and added a loading.jsp page that calls a new dataAction called processing every second. The processing dataAction has the following code within it:
    package view;
    import javax.servlet.http.HttpSession;
    import oracle.adf.controller.struts.actions.DataForwardAction;
    import oracle.adf.controller.struts.actions.DataActionContext;
    public class ProcessingAction extends DataForwardAction
    protected void invokeCustomMethod(DataActionContext actionContext)
    // TODO: Override this oracle.adf.controller.struts.actions.DataAction method
    super.invokeCustomMethod(actionContext);
    HttpSession session = actionContext.getHttpServletRequest().getSession();
    String action = (String)session.getAttribute("action");
    if (action.equalsIgnoreCase("nominalSearch"))
    actionContext.setActionForward("refreshCollection.do");
    I'd appreciate any help or guidance that you may have on this as I really need to implement a generic loading page that can be called by a number of actions within my application as soon as possible.
    Thanks in advance for your help
    David.

  • How to display a double page of a magazine with ibooks

    how to display a double page of a magazine with ibooks ?
    Thanks

    oiram osurac wrote:
    how to display a double page of a magazine with ibooks ?
    What is the title of the magazine you are talking about?

  • How to display a web page in kannada language

    Hi
    we are designing a web (html)page
    how to display that page in kannada language
    we downloaded "brhknd.ttf" font file.
    if this file is available in SYSTEMS-Control Panel-Font folder it is working .if it is not their in System's directory the web page is not displaying kannada language.
    All the client's machines wil not have this file.Plz help
    The '.ttf' file is available in the Application's folder which is uploaded on the server.
    can't the client's machine take that font file from server and display in kannada language?

    iam not sure whether this question related to java or
    not.Hi,
    You are correct. It's not related to java at all. Try to ask this in an html of web development forum (but I would be suprised if you could implement it)
    Kaj

  • How to display a IE page in a view ,not popup  ?

    Hi! All
    Question 1st:
    I have create a html page by webdynpro,
    I want display this page in a view ,
    but when run this code,
    the IE page popup ,
    can you help me set the IE page in current view ?
    public void wdDoInit()
       //@@begin wdDoInit()
       String text = "<html><head></head><body>this is my test</body><html>";
       try
           IWDCachedWebResource resource = WDWebResource.getWebResource
             text.getBytes("UTF-8"), WDWebResourceType.UNKNOWN
            resource.setResourceName("test.html");
            IWDWindow window =
    wdComponentAPI.getWindowManage().createNonModalExternalWindow(
            resource.getUrl(WDFileDownloadBehaviour.OPEN_INPLACE.ordinal()), 
            resource.getResourceName());
            window.show();
        catch(Exception ex)
            wdComponentAPI.getMessageManager().reportException( new WDNonFatalException(ex), false );
    Question 2nd:
      I have create a value context attribute under context.
      it's  name is "mywindow"
      it's  type is "com.sap.tc.webdynpro.services.session.api.IWDWindow"
      Do you know how to display  "mywindow" in a view ?
      I try to put mywindow in a InputField or a IFrame,
      but all failed !
    Thanks!

    Hi,
    This is the code to open up a window
        IWDWindow win = wdComponentAPI.getWindowManager().createModalWindow(wdThis.wdGetAPI().getComponentInfo().findInWindows(<window_name>));
        wdContext.currentContextElement().set<window_context>(win);
        win.setWindowPosition(WDWindowPos.CENTER);
        win.setWindowSize(250,150);
        win.setTitle("New Window");
        win.show();
    This will open up as a pop-up. If you want to open a html page on the same window then put an iframe in your view and set its source property correspondingly.
    Regards,
    Murtuza

  • How to display XML file(as markup) in jsp page..?

    Hi All,
    * I have to display the XML file(as markup) in jsp page (Tree Format)....
    * My XML file is an java.io.file object , and how to view this XML file on my JSP page...........
    Thanks in Advance,
    JavaImran

    You mean you want to see the XML source?
    You need to replace the characters '<' and '&' with corresponding entities '&lt;' and '&amp;'. You can use replaceAll, but do the ampersands first.
    Then I suggest you probably want to put them in a <PRE> block.

  • How to display static HTML pages in Oracle Forms 6i

    I want to display static HTML page in oracle Forms ? Can any body help please ? Its very urgent. Many thanks in advance.

    Suresh,
    there exist a Java Bean in teh Forms 6i demos that shows a static HTMl example. Note that the HTML that could be shown is somewhat basic, but it will give you an impression how it can work. The demos are at otn.oracle.com/products/forms --> samples --> 6i demos
    Frank

  • How to display the HTML pages in RRC/RQM dashboard using OpenSocial gadget

    Hi,
    I have a requirement as below:
    1. I have couple of HTML pages which are hosted in the sharepoint site and I would like to display the HTML pages
    2. I would like to have an OpenSocial gadget in the RRC/RQM dashboard that will display the HTML pages  which are hosted in my sharepoint site.
    Could you please suggest the best approach to create an OpenSocial gadget in the IBM's RRC/RQM dashboard whcih will display html contents of another URL ?
    Thanks.
    Knowledge is power.

    Hi Manoj,
    As I understand, you would like to display SharePoint page in another platform.
    Since the you are involving third party platform, you might still need to contact their support engineer about how to render other pages.
    From SharePoint side, by default, SharePoint won't let end user to display site page to other platform, you could add "<WebPartPages:AllowFraming runat="server"/>" in master page or single page layout. So that SharePoint ASP.Net
    page could be displayed on other platform.
    Here I'm talking about ASP.Net page, since HTML page in SharePoint cannot be displayed in browser as I tested, it will be downloaded directly. So I'd suggest you use ASP.Net page as workaround.
    https://social.msdn.microsoft.com/Forums/office/en-US/c8755a6b-f33a-43ed-97d9-8f03c336aa1d/how-to-display-sharepoint-url-in-iframe-in-aspnet-page?forum=sharepointdevelopment
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • How to display recently viewed pages?

    Im looking for advice/tutorial on how to display a vertical
    list (<ul>) inside a div which will display say the last few
    pages (via their title) which a user has viewed on my site. Just a
    simple vertical text based list rather like the list shown on the
    "Back" button in IE. Are we talking croutons?
    If a user leaves the site then goes back I want the list to
    be cleared again.
    Ok I know people may say, just use the back button but I
    thought it could be a handy feature on the page itself.

    Hi freidaf1,
    You should take a look at the Tile Tabs add-on:
    https://addons.mozilla.org/en-US/firefox/addon/tile-tabs/
    I believe it will do exactly what you are looking for. You could always open multiple windows, but I think this is a more elegant solution.
    Hopefully this helps!

  • How to display data containing CDATA tags in JSP/HTML?

    Hi,
    I'm getting some data from a webservice and displaying it in JSP. But some data from the service (like description of an item) contains CDATA tags.
    For ex: This is the data from the webservice.
    <BenefitsIssues><![CDATA[This strategy buys after a very rapid or extreme sell off with the hope that the gap will eventually be filled. <br>Typically, traders following these types of strategies expect some very large losses as downtrends continue.<br>Traders should take only very small positions when trading this strategy and never dedicate more than a small amount of risk capital in aggregate to this strategy.]]></BenefitsIssues>
    where <BenefitsIssues> is the XML tag. My code displays everything within this tag in JSP.
    Code is JSP looks like this.
    <tr><td><%=strategyDescriptor.getBenefitsIssues()%></td></tr>
    Eventually the HTML output of this JSP looks like..
    <tr><td>![CDATA[This strategy buys after a very rapid or extreme sell off with the hope that the gap will eventually be filled. <br>Typically, traders following these types of strategies expect some very large losses as downtrends continue.<br>Traders should take only very small positions when trading this strategy and never dedicate more than a small amount of risk capital in aggregate to this strategy.]]</td></tr>
    Problem is that the page fails to display the first line, "This strategy buys after a very rapid...." and starts displaying only from "Typically, traders following these....", i.e after the occurrence of first <br> tag. Page also displays "]]" at the end.
    How I can get rid of this problem? One way is to remove "![CDATA[" and "]]" from the data received from webservice. I would like to know if any other better solutions is there. Is there any predefined function to remove "![CDATA[" ?
    Thanks in advance for the help.
    -Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    write tha bean class with the return type like. vector,arraylist .
    add the result set values to vector.
    for example
    Vector s = new Vector();
    while(rs.next)
    s.add(rs.getString());
    at last return that s.
    return s;
    // IN Jsp page;
    <ur dropdown come here>
    <%
    Vector Test = new Vector();
    Test = call function contains databasevalues();
    for(int i=0;i<Test.size();i++)
    %>
    <option><%=Test.get(i)%></option>
    <%}%>
    %>
    Message was edited by:
    kamal_shan

  • How to forward an applet page to servlet/jsp?

    I have an applet in imageMap.jsp file. This applet displays a map. When user enters the page of imageMap.jsp, they will see the map . If user clicks a point of the map, the latitude and longitude of that point should be sent to Search.java servlet and search results should replace the current page.
    My Search.java servlet works well.
    I think I should add mouse event in the applet. I can use MouseEvent.getX() and MouseEvent.getY() in the applet to get latitude and longitude. But I do not know how to go from this applet to servlet. How can I forward applet page to servlet?

    The <jsp:plugin> action is used in pages to generate client specific HTML tags involving download and execution of the applet that is specified in the tag.

  • How to display a stack trace in a jsp error mage

    What is the best way to display a stack trace in a JSP error page?
    I use "${pageContext.exception.message}" for the exception message. Is there a comparable JSTL expression for the stack?

    Cool! it totally works.
    Thanks for pointing me to this post.

  • How to call an HTML page from a JSP

    Hi,
    I am getting problem in calling an html page from a jsp
    The Sample code is
    int rowsAffected = stm.executeQuery("Select * From Table");
    if (rowsAffected == 1)
    {   %>
    <jsp:forward page="xyz.html" />
    <%

    See the other forum where you asked the same question http://forums.java.sun.com/thread.jsp?forum=45&thread=158981
    Please refrain from cross posting.

  • How to display external website info without frames

    I want to display info from another website on my site
    (mortgage reference info). How can I do this without using a frame
    to display it in? Is that possible? Thanks....

    If the data is published as an RSS feed or available as a
    widget, you could
    use a JavaScript code to embed it into your page.
    RSS:
    Feed Roll - JavaScript generator for including news feeds in
    websites:
    http://www.feedroll.com/rssviewer/
    Google Ajax feedfetcher - requires you to have a Google API
    key#
    http://www.dynamicdrive.com/dynamicindex18/gajaxrssdisplayer.htm
    Mortgage Calculator Widget:
    http://www.widgetbox.com/widget/mortgage-calculator-jessieb-1
    Assorted Google Widgets:
    http://www.google.com/ig/directory?synd=open
    If none of these will work for you then you might want to use
    an iframe
    (NOTE: inline frames are not the same as framesets).
    http://www.htmlcodetutorial.com/frames/_IFRAME.html
    Nancy O.
    Alt-Web Design & Publishing
    www.alt-web.com

  • How to display the first page alone first and two pages (back and front) then ?

    Hi
    I use acrobat 9 (beginner).
    I have a document which should be displayed "as a book", ie two pages on the screen at the same time, the back of the first sheet and the front of the second one.
    The problem I have is to manage to display the cover sheet as a single page (alone) and then to have the dual page layout as described above.
    How could I do that ?
    Thanks for your help
    Regards
    Fanch

    Hi Bernd
    Thanks a lot.

Maybe you are looking for

  • Feature request: Importing/backup/archive of tracks with metadata

    Hi everyone, I've found that one of the things iTunes does better than any other music player is handling and organising song information. Have you ever seen a PC user's jukebox? Thos things are a real mess, with cryptic track names ("mike mills - ai

  • ILife Reinstall?

    Hey everyone - I recently bought a MBP early 2011 model. It came with iLife, Facetime, and a few other apps pre installed. Now, I need to upgrade my hard drive. This means I have to reinstall Lion, aka lose my iLife apps. Is there any way I can reins

  • Images now locked, says Bridge; won't open photo

    I have a fairly new w7 64 bit HP which has been doing fine with Bridge & CS4 until recently. I can load raw photos from SD to a folder on an external HD but when I try to open a photo in Bridge, the computer tells the the photo is Locked. Use Windows

  • Can my Airport Extreme recieve a signal from another AE?

    I'm buying a new iMac that will have an Airport installed in it. I want my old flat panel iMac 800Mhz G4 to now be wireless. Can I just connect the AE via ethernet and Bam be connected with my old iMac. I asked a question earlier about a USB connecte

  • Non Iphone users cannot recieve my text messages

    I just got the iphone 5c for christmas, and at first i was able to recieve text mesages from non iphone users without any problem but jsut the other night i quit recieving them what should i do?