Write HTML to Proper Page - Always writes to page - where servlet called

I call a servlet from a second window(thirdWin) that was created/opened by the first window(window) in HTML. The servlet writes out HTML to the browser using the following code(note HTML$ is a java class that contains methods of HTML code lines):
PrintWriter out=response.getWriter();
HTML$.pageBegin();
HTML$.tableHeader("Murph");
The problem is that the servlet writes/ outputs the HTML code to the third window(thirdWin). I want to call the servlet from the third window and write/output the new HTML to the first window. There must be a way of accomplishing this. One, by setting the browser window directory to the original window(first window) before the servlet is called so that the new HTML gets written to that page, or two, by setting the brower window to the proper window in the servlet before writing the HTML out to the window.
The following is the code in the servlet that opens the thirdWin. It is a javascript function whose body is a Servlet that has been written it out to the browser page. Do not get confused with me calling it the thirdWin it is acually a second window opened by the opener, I have just called it thirdWin.
out.println("thirdWin = open('', 'UserName', 'height=300, width=500 scrollbars=yes');");
     out.println("thirdWin.document.write(\"<TITLE>Enter UserName</TITLE>\");");
out.println("thirdWin.document.write(\"<BODY BGCOLOR=white>\");");
out.println("thirdWin.document.write(\"<FORM name='showEdit' method='post' action='showEditProfile'>\");");
out.println("thirdWin.document.write(\"<table><tr><td width=120>User Name :</td><td width=300><input type='text' class='listRow' name='user_name'></td></tr></table>\");");
out.println("thirdWin.document.write(\"<table><tr><td width=120>Password :</td><td width=300><input type='text' class='listRow' name='user_name'></td></tr></table>\");");
out.println("thirdWin.document.write(\"<table><tr><td width=120>Search :</td><td width=300><input type='submit' name='showEdit' value='Show Profile'/></td></tr></table>\");");
/**out.println("thirdWin.document.write(\"<table><input id =\"subfds\" type=\"button\" name=\"Submit5\" value=\"Enter Information\" onclick=\"\"/></table>\");");**/
out.println("thirdWin.document.write(\"</FORM>\");");
out.println("thirdWin.document.write(\"</BODY>\");");
out.println("thirdWin.document.write(\"</HTML>\");");
     out.println("thirdWin.document.close()");

Since you want your function to write directly onto the page,
the only way would be to pass the "out" variable to your function
So your function would be
==============
public void pageFooter(JspWriter out, boolean bolEndBanner)
jspout.println( "<table width=\"100%\" align=\"center\" cellpadding=0 cellspacing=0 bgcolor=\"#FFFFFF\">" );
jspout.println( "<tr>" );
jspout.println( "</tr>" );
jspout.println( "</table>" );
// D�but de la Fin de page Normale
jspout.println( "</body>" );
jspout.println( "</head>" );
jspout.println( "</html>" );
==============

Similar Messages

  • Output HTML to proper page

    I call a servlet from a second window(thirdWin) that was created/opened by the first window(window) in HTML. The servlet writes out HTML to the browser using the following code(note HTML$ is a java class that contains methods of HTML code lines):
    PrintWriter out=response.getWriter();
            HTML$.pageBegin();
            HTML$.tableHeader("Murph");The problem is that the servlet writes/ outputs the HTML code to the third window(thirdWin). I want to call the servlet from the third window and write/output the new HTML to the first window. There must be a way of accomplishing this. One, by setting the browser window directory to the original window(first window) before the servlet is called so that the new HTML gets written to that page, or two, by setting the brower window to the proper window in the servlet before writing the HTML out to the window.
    The following is the code in the servlet that opens the thirdWin. It is a javascript function whose body is a Servlet that has been written it out to the browser page. Do not get confused with me calling it the thirdWin it is acually a second window opened by the opener, I have just called it thirdWin.
    out.println("thirdWin = open('', 'UserName', 'height=300, width=500 scrollbars=yes');");
          out.println("thirdWin.document.write(\"<TITLE>Enter UserName</TITLE>\");");
             out.println("thirdWin.document.write(\"<BODY BGCOLOR=white>\");");
             out.println("thirdWin.document.write(\"<FORM name='showEdit' method='post' action='showEditProfile'>\");");
             out.println("thirdWin.document.write(\"<table><tr><td width=120>User Name :</td><td width=300><input type='text' class='listRow' name='user_name'></td></tr></table>\");");
             out.println("thirdWin.document.write(\"<table><tr><td width=120>Password :</td><td width=300><input type='text' class='listRow' name='user_name'></td></tr></table>\");");
             out.println("thirdWin.document.write(\"<table><tr><td width=120>Search :</td><td width=300><input type='submit' name='showEdit' value='Show Profile'/></td></tr></table>\");");
            /**out.println("thirdWin.document.write(\"<table><input id =\"subfds\" type=\"button\" name=\"Submit5\" value=\"Enter Information\" onclick=\"\"/></table>\");");**/
             out.println("thirdWin.document.write(\"</FORM>\");");
             out.println("thirdWin.document.write(\"</BODY>\");");
             out.println("thirdWin.document.write(\"</HTML>\");");
          out.println("thirdWin.document.close()");

    I have a database, it holds information of a user, my applet interacts with the database to retrieve/write etc. What i want to do is when some1 clicks a button to open a new Internet Explorer page and then output a record from the database. Just like System.out.println(forname + surname + date + score);
    I dont know how to open a new IE and then output the info to it.
    I dont have any code for this part as I havent written it and I dont think there is any value in posting code to retrieve from database. We can just treat them as strings? String forname, surname etc.

  • Write HTML code in webdynpro

    Hi All,
      Can anyone tell me how two to write HTML code in
      webdynpro application
    to make myself clearer. this is what i want.
    IWDTextView txt = (IWDTextView) view.createElement(IWDTextView.class, "txt" );
    txt.setText("<hr>" + "Today Order");
    But the above code is displaying literal string <hr> by the mean of &lt;HR&gt;
    regards
    Arun

    Hi Nibu,
      What I actually want to do is that- I have designed
    a view having order details one below other on same screen.
      What I want is to print the order detail page wise.
    i.e Ist Orderdetail on first page , 2nd Order detail on 2nd page and so on.....that is I want a page break.
    I got a code to provide a page break which is in javascript -
    <script>
    //<!--
    document.write("hi");
    document.write("<p style=\"color: blue; page-break-before: always\" >");
    document.write("hiafter");
    //-->
    </script>
    How 2 use this code in my webdynpro application.....or
    is there any other mean to do so.
    regards
    Arun

  • How can I write HTML code in this forums

    Sorry but I didn't know where to post this thread.....
    How can I write HTML code in this forums?

    Hello,
    Every piece of code in your post should be wrapped with the forum tags [ code] and [ /code], without the blanks.
    In case of the &lt;a> tag, that is not enough. In this case, you have several options. The most elegant one is to use the entity name for the less-then sign - & lt; - without any spaces. Other options is to add a space between the less-then and the ‘a’ character (and make a note of it) or change the less-then character with a left bracket one.
    When posting code, you should always use the forum preview option, just to make sure the forum software “understood” your code correctly.
    Hope this helps,
    Arie.

  • Where i shall write html code in jdeveloper

    Hello,
    please tell me where i can write html code in jdeveloper.
    Thanks

    Hi catalina,
    Html tags should not be used directly inside ADF faces pages which may lead to some undesirable results instead you can use ADF Faces tags itself using which you can do what ever you wanted to do with html tags.
    If you still need to use html tags, you can use ADF Faces html tags.
    Tag doc: http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/jsf/doc/tagdoc/html/index.html
    Sireesha

  • How to write html code in narrative

    Hi,
    How to write html code in narrative to get following format
    desc value1 Value2 totalvalue
    a 10 20 30
    b 20 30 50
    Totalvalue 30 50 80
    Total % 0.3 0.5 0.8
    Can any one help guide on writing HTMl code for above table format in narrative type of display data at report level
    Thank you
    Manu

    Hi Balu,
    If you are using the Web Application server (WEBAs), Then you can create applications using BSP( Bussiness server pages). Which is some what luike JSP.
    Or
    In SE80 , Try to create internet service files uisng BHTML. In the dropdown select internet service. And then try to create the HTML templates
    Thanks,
    Sarayoodharan.K

  • Tips for Using Pages to Write a Short Book?

    Hello- I really don't wanna go back to Word.
    My needs are pretty simple. A short book in 5.5 x 8.5 format (standard, right?).
    Any tips to using (setting up) pages to write a book? Any ideas where to get good templates for this?
    Thanks.

    ePub requires HTML
    Thoughts on that plan?
    For paper-based exchange, Peter's point is that preparing the printing surface encounters problems in Apple's support for ISO 15930 PDF/X-3. Peter also wants support for spot colours which Apple development has resisted for as long as I can remember, and with good reason .
    For paper-less exchange, Apple's implementation of PDF has the problem that it does not support search for glyph substitution, that is, it neither supports search for Apple Advanced Typography (AAT) nor does it support search for Microsoft OpenType Layout (OTL).
    For paper-less exchange, furthermore, whether one is working in a document markup model (SGML implementations such as HTML, ePUB) or a document mastering model (PDL implementations such as PDF, XPS) the audience interacts with the authors input of character information in order to identify and download the digital document, and then image the digital document on a digital graphic device (display, printer). This means that the input of character information must be configured for assumptions compatible between author and audience. It is possible to do a long list of things in the Apple Character Palette that will cause the audience complications in searching for the digital document whether offline on a local computer or online in a distributed network of computers.
    Best,
    Henrik

  • As a writer I'm using Pages to write my documents but the title shows up on every page.   How do I set-up my page so that it shows up on only the first page?

    As a writer I'm using Pages to write my documents but the title shows up on every page.   How do I set-up my page so that it shows up on only the first page?

    Don't put it in the Header.
    Peter

  • How to write HTML code in Web Template for selection screen

    Hello All,
    Is it possible to write a html code in the web template html tag so that the output of the html is displayed in the selection screen, i.e before the execution of query.
    I know that we can write html, which will be displayed once the query has been executed, but can it be done for selection screen.
    if so, how.
    My exact requirement is : to display a 2-3 lines of text in the selection criteria screen - sort of, various options available to user for entering values in the selection screen.  I was thinking of putting this text using HTML code in the selection screen.
    Regards,
    Nagendra.

    Hi Erick,
    No, unfortunately nobody replied to this thread. So i assumed it is not possible to modify the selection screen thru html code.
    Btw, as my requirement was to provide user with multiple answers on the selection screen. I did the validations on customer exit and popped an errror dialog when applicable.
    Regards,
    Nagendra.

  • Using cfhttp to read a page and write its contents to a file.

    Hi,
    I am trying to get a feed of my ebay store listings to load
    into froogle. Unfortunately, ebay provides the feed as a website
    not a file and froogle (via GoogleBase) needs the file to be
    submitted as an XML file.
    Is there a way to use something like cfhttp to load up the
    page where the feed is located, scan the page and write it's
    contents into an XML file that I can then load up to GoogleBase???
    thanks for the help.

    ignore me now.... I answered my own question a short while
    ago.
    for anyone who cares....
    I used CFHTTP to get the page and then used a cffile to write
    the #cfhttp.filecontent# into the new file!

  • Write HTML Files from java application

    Hello,
    i have to write HTML files from a java application.
    I am asking if anybody can give me a hint about a good simple solution (library) which can do some of the job for me.
    i know FOP for example is good to create pdf or html from xml, but i dont want to go via xml.
    the sites i need are really very simple presents emails.
    body and maybe a link for next and pervious.
    however, thank you in advance.
    a little hint will also help :)
    Sako.

    That, too, is my question.
    Be the "server" local or remote, wouldn't JSPs still
    be the easier solution? No. it will not. because you need a server. Server for a stand alone application is not esier. according to who said JSPs are easy?
    Its very very difficult.
    >
    When answering, please clarify. I'm a bit of a newbie
    here. :)To get sence about how hard is JSP, check Struts. this is very good open source Framework to simplify the JSPs. but it still complecated enough.
    or Tapestry my lovely open srouce Framework.
    its easier than Struts. but sill complecated because of the documentation.
    All in all, using JSP is the purpose of Java in the internet. but not for me. My application will not be available in the internet, i.e. no server, i.e. no need for JSP.
    i hope that helps a little.

  • How to display HTML pages always in first rank in search result?

    I have a sharepoint 2010 site where search is configured, but when it is displaying the search result some time it is  showing the pdf files  in the first order and the html pages in the second order, I need to display html pages always
    in the first order.How can I accomplish it?

    Alex's link is by far the best one but this is an alternative if you wanted to read a bit more widely
    http://sharepointkaos.wordpress.com/2011/01/13/custom-ranking-model/
    Steven Andrews
    SharePoint Business Analyst: LiveNation Entertainment
    Blog: baron72.wordpress.com
    Twitter: Follow @backpackerd00d
    My Wiki Articles:
    CodePlex Corner Series
    Please remember to mark your question as "answered" if this solves (or helps) your problem.

  • I used pages to write a resume and the company wants it in pdf format.  How do I do that?

    I USED PAGES TO WRITE A RESUME AND THE COMPANY WANTS IT IN pdf FORMAT. hOW DO I DO THAT?

    file > export > pdf

  • Problem with TextEdit to write html

    Hello, I use TextEdit to write html.
    I have activated the option  "ignore rich text commands in HTML files" and the html documents open as web source, but when I edit the code and save the document the extension html change to .txt
    I work with TextEdit 1.7 (Mac OS Lion), but with TextEdit 1.6 (Mac OS Snow Leopard) the extension doesn't change.

    Thanks Hiroto,
    Your solution works!
    So here is the final code:
    set msgContent to "Lorem ipsum etc."
    set mountString to "afp://user:[email protected]/data/" -- example afp server access
    mount volume mountString -- mounts correctly
    set filePath to "/Volumes/data/Downloads/" & "LogFile.txt"
    set f to open for access POSIX file filePath with write permission
    write msgContent to f
    close access f
    Cheers,
    gilles

  • What application can I write html in?

    Hey, I was a windows user, and I used notepad to write HTML. What program on the mac is capiable of doing that?
    Sorry, I couldn't find a previous thread on it.

    http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/6404000/wo/1i4Jt 1A4K2P12lDcQyizUDwg2eg/1.0.19.1.0.8.25.7.11.5.3
    there's an application for HTML

Maybe you are looking for

  • After software update, will not boot up past blue screen

    I just did a software update and after restarting, the computer will not go past the blue screen with the spinning wheel at the bottom. Please help! I've tried everything under troubleshooting in the manual. Any other ideas?

  • New Retina MacBook Pro does not find WiFi after booting

    My Retina MacBook Pro keeps looking for WiFis after it has booted, but does not find any. I have to explicitly turn WiFi off and on again after booting to get it working. When I put the MacBook to sleep and wake it, the problem does not occur. Any hi

  • DirectX problems - Onboard video problems? K9VGM-V

    I am having problems with loading the new Nero suite (7.xx) version.  It keeps coming back with a DirectX error.  The guys at Ahead are telling the same thing.  My question is:  Can I use DirectX 9.0c using the onboard video?  I don't know what bios

  • Power Mac Dual G5 (March '04) freezes after disk reformat & Tiger Reinstall

    Looking for some help ... read many of the G5 related threads but not sure what to do next. Within the last month or two the machine started just shutting itself down (at first I thought the kids were doing it!) - it would also just freeze up. But it

  • Recommendation for ESR and SR configurations

    Hi, I need some recommendation on configuration of the ESR and Service Registry in a landscape. Now that ESR and SR can reside either on CE or PI and since both PI7.1 and CE7.1 are capable of having ESR and SR configured. What is recomemded approach?