How to display content in HttpSerlvetResponse in a new web page?

I am a newbie in servlet&html and hope to get some information here for my question.
Suppose I have a web page having a list. after the user has chosen one of them, he will click on submit to send the request to the servlet.
In my servlet, I use the query string to get the related information and put it into a httpServletResponse. My question is, what should I do such that the content of Response will be shown in a new web page, instead of replacing the original one? Thanks!

You can't do this from the server side. The client side should initiate the new window. There are several ways, under each:
<a href="servlet" target="_blank">Open in new window</a>
<form action="servlet" target="_blank">Submit to new window</form>
<someElement onclick="window.open('servlet');">Popup a new window</someElement>

Similar Messages

  • How to make Safari browser always open a new web page in a new Safari browser window which was clicked from a PDF document URL

    Hi
    I have a web application which would enable users to see a list of PDF document on the web page and when the user select the PDF document, it will be open by a adobe PDF view
    Within the content of the PDF document, it will contact URL links to some other portal web pages which we would like these other web pages to be open in a new browser window, but our testing shows that the new web pages may not always open in a new browser window.
    Could you help to advise how I can enforce that new web pages that are clicked from the PDF document can always be open in a new Safari browser window ?
    Thanks in advance.
    Regards
    Sen Lee 

    Hello,
    In order to change the default reader for PDF files (to not open PDF files with Firefox's internal PDF reader), follow these steps:
    #Go to ''Tools'' > ''Options'' (or ''Firefox'' > ''Options'').
    #In the Options window, select the ''Applications'' tab.
    #In the ''Search'' field, type ''PDF''. You should find ''Portable Document Format (PDF)''.
    #On the right handside you should find an ''Action'' column. Use that to select your favorite PDF reader. In order to view PDF files in Firefox, choose ''Preview in Firefox''.
    Did this fix your problems? Please report back to us!
    Thank you.

  • How to display contents from a database to a jsp page

    hi im using hibernate , i want to display the conetents from a databse to jsp page which is having a form
    i want to get the data on the form fields after changing the values i want to write it back to the database
    im using struts and hibernate
    im struck with this plz help me

    j2ee_struts_hibernate wrote:
    hi im using hibernate , You probably shouldn't be using Hibernate.
    i want to display the conetents from a databse to jsp page which is having a form "contents", "database"
    i want to get the data on the form fields after changing the values i want to write it back to the databaseWhat don't you understand? (Sounds like you don't understand anything.)
    im using struts and hibernate How well do you know Struts? Hibernate? JSP? Java?
    im struck with this plz help meAsk a specific question and we'll see what we can do.
    Write a JSP with the form in it; submit to Struts; Struts interacts with the database. That's the flow.
    %

  • How to display response of http request as a web page in ABAP?

    Hi all,
    In ABAP, we can use class <b>cl_http_client</b> to send a http requst and then got the response data as a XSTRING variable. Usually, the response data is the html source of a web page. How to display this web page within dynpro?
    I found we can use class <b>cl_gui_html_viewer</b> to display the web page of a URL or data in SAP web respository. Is there any way of using it to load response data in cl_http_client and display that web page?
    Thanks a lot.

    Welcome to SDN.
    1. use http_client->response->get_cdata( ).
    to get the response data in string format instead of xstring format.
    2. use FM CONVERT_STRING_TO_TABLE to covert the string to table of type W3HTML
    3. use method
    data: l_doc_url(255) type c.
          call method html_control->load_data
                      exporting
                         type         = 'text'
                         subtype      = 'html'
                      importing
                         assigned_url = l_doc_url
                      changing
                         data_table   = html_table.
    call method html_control->show_data
                      exporting
                         url       = l_doc_url.
    to load the html content and show it in cl_gui_html_viewer
    Regards
    Raja

  • How to display a fixed number of rows in a page when using CL_GUI_ALV_GRID

    Hy experts
    How to display a fixed number of rows in a page when using CL_GUI_ALV_GRID?? lets say 500 ?? because my display table it may contain in some cases 10.000 and evidently I can t see all of them..
    I have a button in my toolbar witch triggers this event
    (display 500 records ) but I don t have the logic to do this only with methods of CL_GUI_ALV_GRID.
    can you tell me a standard method of CL_GUI_ALV_GRID witch can help me do this?? any hint will be good..
    Till now I was used to add a column to my structure witch represents a flag that is a number corresponding to every 500 records (a batch containing 500 records )
    first       500 - flag -> 1
    second  500 - flag -> 2
    etc..but I m convinced that exists a way of doing this more easy..without damaging my structure..
    thanx in advance..don t be shy..reply if you have any hints..

    Hi,
    if method SET_FILTER_CRITERIA doesn´t help, I think that you must work with 2 internal tables, a counter and a loop for filtering the records to be displayed:
    case counter.
      when 1.
         loop at int_table1 from 1 to 500.      "<-- your table with all records
           move int_table1 to int_table2
        endloop.
      when 2.
         loop at int_table1 from 501 to 1000.     
           move int_table1 to int_table2
        endloop.
    etc, etc.
    Call grid-->SET_TABLE_FOR_FIRST_DISPLAY
       exporting
         IT_OUTTAB = int_table2                "<-- instead of your currently table int_table1

  • How do I get a 'insert - hyperlink - file' to display in a new web page?

    When I insert the link to a downloadable file, that's fine.
    But I'm losing my eyeballs because iWeb uses the same webpage to open my downloadable file.
    The option to check, 'open in new web page' is not appearing.

    Welcome to the Apple Discussions. You need to first upload the file to your server and use the URL to the file at that location as the link to external page option of the Inspector/Link/Hyperlink pane. If the browser supports displaying the file type it will open in a new window.
    Click to view full size
    OT

  • How to show modal window without popup in a web page using javascript

    Hi,
    How to show modal window without popup in a web page using javascript, means when the modalwindow is opened it should not ask for popup blocker alert......
    pls help me.....

    Thanx for ur reply,
    Actually the senario is when i click on a button, another jsp page should be displayed in a modal window without popup, but the functions alert() and confirm() will not accept the url path of the another jsp page...

  • Help on retriving the content from a excel file and web page

    hi,
    i need help on identify the content on a webpage. how to do this ?
    in myproject i need to read an excel file how to read an excel file , in java?
    after reading the excel file ,i have to open a webpage based on the link available in the excel file.
    how to perform this action?
    and from the web page i need to retrive the each individual text
    how to perform these action?
    please help .... urgent
    regards,
    valli

    sales team will enter data in excel file .
    the excel file will have a list of links ,
    i need to access the excel file and open that link.
    from the link i will get some information ,such as
    company name, address, phone no, contact details.
    i need to identify each individual (address, email
    id) from the web page and store that data in the data
    base .
    how to access a excel file from java?
    i found in google jakartha-poi-jar file.
    but ther eare many jar file. which one i have to
    download?
    how to identify from a web page these different
    items?
    thanksPlease answer DrClaps's question from reply #3.

  • How can I change a minus figure on a web page to show in red? Firefox3.6.8 winXP

    How can I change a minus figure on a web page to show in red?

    I would assume that the website sends negative number with a special CSS class code or uses JavaScript to to change the style afterward.
    Did it ever work in Firefox?
    Do you see a error in the Tools > Error Console regarding this problem?
    "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove the Cookies" from sites that cause problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]

  • When I click on a hyperlink it automatically opens it up in a PDF or in Adobe Acrobat Reader. How do I change my settings back to normal so when I click on the link it opens it up in a new web page?

    When I click on a hyperlink it automatically opens it up in a PDF or Adobe Acrobat. How do I change my settings so that when I click on a link it opens it up in a new web page like it is supposed to?

    Install this Add-on: https://addons.mozilla.org/en-US/firefox/addon/open-link-in-new-tab/

  • My Safari displays text in certains spots on a web page as mixed characters

    My Safari displays text in certains spots on a web page as mixed characters. Is there a fix for this or does anyone have an idea what may be going on? I have looked at my fonts and everything seems to be working just fine. I can't quite figure out why this only happens to certain text and not others. But I can't read half of the pages on the web because of this. I can copy the mixed up text out of Safari and past it in another application and the copy is in perfect english then.
    an example of what I am talking about is below:
    (Kvg"Urgekhkeu"/Crmg"/"Crmg"Fgumvqru
    Here is what it says when I copy the same characters out of Safari and paste them below:
    (Item Specifics - Apple Desktops)
    Any help or advice will be greatly appreciated

    I work as a graphic designer so I keep a very clsoe eye on my font library. In fact I don't use font Book, I use Suitcase Fusion. But i went to font book and double checked and I don't have any duplicae fonts in there. Would you have any other ideas?
    thanks for your help!

  • How can I stop auto refreshing a new web page in XP immediately after its opened?

    In XP, once I access a new web page Firefox auto refreshes that page once the page is ~80-90% opened - how can i stop this refresh?

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    You can use "Disable all add-ons" on the ''Safe mode'' start window.
    You have to close and restart Firefox after each change via "File > Exit" (on Mac: "Firefox > Quit")

  • How to stop an "Add-ons Manager" tab that keeps appearing every time I open a new web page ?

    Does anyone know how to stop a Firefox "Add-ons Manager" tab that keeps appearing every time I open a new web page ?
    Thanks....

    ''arcadiune [[#question-1052917|said]]''
    <blockquote>
    Does anyone know how to stop a Firefox "Add-ons Manager" tab that keeps appearing every time I open a new web page ?
    Thanks....
    </blockquote>
    Solved it shortly afterwards thanks as I realised it must have happened when I refreshed Firefox, so went through the process again and found the boxes for tabs already pre-ticked so cancelled them. Would have been a lot easier though had it been left as an option to tick as I assumed it was another safeguard leaving me with no idea what had happened....
    Anyway thanks :-)

  • How to customize and fix permanently the size of web pages (zoom%) in Firefox as in Internet Explorer either: View - Zoom - Custom (percentage).

    How to customize and fix permanently the size of web pages (zoom%) in Firefox as in Internet Explorer either:
    View - Zoom - Custom (percentage).
    Thank you

    This may help you.
    https://support.mozilla.com/en-US/questions/894000

  • How to display all rows in the report in one page in Oracle APEX 3.2

    Friends -
    We are using Oracle Applications Express 3.2 on oracle database 10.2.0.5 on solaris environment.
    One of our report contains total no of rows 50000. when we ran report by default it is showing 15 and i can go search and change display no of rows to different numbers and click go.
    My question is it possible to display all 50000 rows during first time report launching without going to change rows. Is there any option that we can set how many number of rows that we can display during report design.
    Please advise
    VSH

    Hello VSH,
    >> My question is it possible to display all 50000 rows during first time report launching without going to change rows
    As vee pointed out it is possible, however the question you need to ask yourself is is it wise?
    Bear in mind that displaying 50,000 rows on a single HTML page means a lot of code that must be loaded by the client browser all at once. What it will do to your page loading time? Browser memory? Network bandwidth? Also, do you really believe that it is effective to let an end user look for a specific row among 50,000 rows?
    Regards,
    Arie.
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.
    &diams; Author of Oracle Application Express 3.2 – The Essentials and More

Maybe you are looking for