How to output BufferedImage as PNG in HTML page

I have a servlet that creates a chart as a BufferedImage.
I can output it as a file using ImageIO.write(bimg,"PNG","fn.ext")
I would rather put it in a web page but I don't know how.
It seems I can either put out an html page or an image file
but not both. Does anyone know how ?

This question came up in the JFreeChart forum. You can take a look at:
http://www.object-refinery.com/phorum-3.3.2a/read.php?f=2&i=1598&t=1383
Hope this helps,
Dave Gilbert
www.object-refinery.com

Similar Messages

  • How to Write source code of a html page to a File

    Using this code i could find the source code of a html page from a web server
    import java.io.*;
    import java.net.*;
    public class SourceViewer{
    public static void main (String[] args) throws IOException{
    System.out.print("Enter url of local for viewing html source code: ");
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String url = br.readLine();
    try{
    URL u = new URL(url);
    HttpURLConnection uc = (HttpURLConnection) u.openConnection();
    int code = uc.getResponseCode();
    String response = uc.getResponseMessage();
    System.out.println("HTTP/1.x " + code + " " + response);
    for(int j = 1; ; j++){
    String header = uc.getHeaderField(j);
    String key = uc.getHeaderFieldKey(j);
    if(header == null || key == null)
    break;
    System.out.println(uc.getHeaderFieldKey(j) + ": " + header);
    InputStream in = new BufferedInputStream(uc.getInputStream());
    Reader r = new InputStreamReader(in);
    int c;
    while((c = r.read()) != -1){
    System.out.print((char)c);
    catch(MalformedURLException ex){
    System.err.println(url + " is not a valid URL.");
    catch(IOException ie){
    System.out.println("Input/Output Error: " + ie.getMessage());
    Iam not much a expert in java .. i could find some commands to write to a file but i dont know where to use those codes , some body please give me some idea ..
    thanking you ..

    You're welcome. How about awarding them duke stars?
    edit: cheers!

  • How to populate a table in the html page from the java script

    Hi all,
    I have doubt in populating a table in the html page. my application is as follows
    I have a html page in which i have a combo box and a table following the combo box.
    i have to populate the table depending on the item selected in the combo box.
    for this i am using javascript to get the value of combo box onClick
    then i have to call some function thru jsp to get the data and then i have to populate the table with thst into from java script
    how can i do this, i.e populating html table from java script
    Thanks in advance
    satya

    Hi Mihai,
    You can populate data in DO_INIT_CONTEXT method of ur impl class in your Z component.
    data:
    lv_struct_ref type ref to YOUR_STRUCTURE,
    lv_value_node type ref to cl_bsp_wd_value_node,
    lv_bo_coll type ref to if_bol_bo_col.
    Data: current type ref to if_bol_bo_property_access.
    data: dref type ref to data.
    data: lv_guid_h type crmt_object_guid.
    data: lt_attr type table of YOUR_STRUCTURE.
    data: ls_attr type YOUR_STRUCTURE.
    data: lr_entity type ref to cl_crm_bol_entity.
    create object lv_bo_coll type cl_crm_bol_bo_col.
    lt_attr is ur internal table.
    Loop at lt_attr into ls_attr.
      create data lv_struct_ref.
      create object lv_value_node
           exporting
                iv_data_ref = lv_struct_ref.
    call method lv_value_node->if_bol_bo_property_access~set_property
    exporting
    iv_attr_name = 'YOURFIELDNAME1'
    iv_value = ls_attr-firstname.
    call method lv_value_node->if_bol_bo_property_access~set_property
    exporting
    iv_attr_name = ' YOURFIELDNAME2'
    iv_value = ls_attr-lastname.
    lv_bo_coll->add( lv_value_node ).
    typed_context->YOURCONTEXTNODE->set_collection( lv_bo_coll ).
    endloop.
    Regards,
    Raghu

  • How to create a cross ref. between html page to external PDF file

    Hi all,
    I don't know if it can be done but i'd like to create cross ref. or link from an html page (using robo#7) to a pdf file - in a spesific location i.e heading/bookmark inside the pdf. Is it possible? & if so, how do I do it?
    Thanks a lot,
    Tali

    Hi Tali.
    I believe it is, although I've never tried. The syntax is the same as for bookmarks in a HTM file.  You just specify the URL for the PDF with #bookmark on the end (where bookmark = the PDF bookmark name). For example <a href=http://www.adobe.com/prodlist.pdf#bookmark>.
    Read the RoboColum(n) for a tips, tricks and musings on the Technical Communication Suite products.
    Follow the RoboColum(n) on Twitter

  • How do You set -noverify in an HTML page that calls an applet

    I have an applet which runs fine from inside JBuilder when I specify a
    -noverify switch in the debugger. (java -noverify myapplet.class)
    Without this switch, I get a verification exception.
    So I need to specify the -noverify switch from inside a webpage so that when the client runs it, he does not get the same exception.
    The question is how do you pass -noverify to JVM from an HTML page that uses <applet> tag and javascript?
    Thanks

    Odd, because I work on an applet that gets built with 1.4. We have 30,000+ clients who use it every day, and I'm sure we don't tell them about setting -noverify switches in their plug-in control panel, and we don't (cuz we can't) set it in the applet (object/embed, actually) tag.
    Of course, I suppose it could be a backwards compatibility issue going from compiling in newer version than it's run in.

  • How to place a banner in a HTML page with alpha?

    I have multiple ideas/designs which want to work into my new site.
    It utilises designing graphics in AE, exported as .swf that lay on an alpha, building them into my HTML page layout, and once there the alpha/space in the design will enable HTML background elements to show through.
    How do I set this up in AE, HTML or Flash?

    Use swfobject to embed the file within html and select your wmode property to transparent.
    http://www.adobe.com/devnet/flashplayer/articles/swfobject.html

  • How to Call a WebDynpro application through html page.

    I have created a webDynpro application.How can i call this application through a html page?
    Thanks
    Pankaj Kumar

    Hi,
       You can add a link to your HTML page and set the anchor reference to the absolute URL of your WD application.
       The absolute URL of your WD application looks like
    http://<j2ee server>:<port>/webdynpro/dispatcher/<wd component name>/<application name>
       So your HTML code will look like:
    <a href="http://<j2ee server>:<port>/webdynpro/dispatcher/<wd component name>/<application name>">Link</a>
    Regards,
    Satyajit.

  • How is this effect created of an HTML page peeling?

    I am familiar with the page Flip effect now quite popular to
    create flash-based virtual magazines but its the first time I see a
    page pull on an html page. Can anyone explain how its done please?
    http://www.anapharm.com/

    I've seen stuff like this at DartMotif.com
    http://www.dartmotif.com/samples/PeelDown.asp
    Hope that helps
    "OrlandoJetset" <[email protected]> wrote in
    message
    news:enefpi$7s2$[email protected]..
    >I am familiar with the page Flip effect now quite popular
    to create
    >flash-based
    > virtual magazines but its the first time I see a page
    pull on an html
    > page.
    > Can anyone explain how its done please?
    >
    >
    http://www.anapharm.com/
    >

  • How to display an image on the HTML page by using applet

    Dear friends,
    I am now writing an java applet, I want to display an image on the HTML page, and tried the following commands:
    {color:#ff00ff}{color:#000000}Image map; //put in the class definition
    map=getImage(getCodeBase(),"hhh.gif"); //put in the function of init()
    g.drawImage(map,0,300,this); //put in the function of paint(){color}
    {color}
    However, when I run it, the image wasn't displayed at all.
    I hope who guys ever come across this problem could help me to solve it. Thank you in advance!
    Hawaii

    Hi,
    I am no expert on Images
    but
    from personal exp.
    are you sure that map actually contains the image?
    try using
    ImageIcon ii = ImageIcon(String name);
    map = ii.getImage();I saw a tutorial on images i think on sun
    where they use ImageIcon to load the image

  • How to call KM content in independent HTML page?

    Hi,
    My requirement is to call KM contents in simple HTML page,
    Actually I want to show documents from specific location of KM into HTML page which is nowhere related to EP pages, it will be totally independent page.
    Can anyone come across the same requirements?
    Thanks,
    Vikas

    Hi,
    i think you can call KM content with in an independent HTML page by using the tags in HTML ,href="target path of your KM content" and target="_blank" OR "_new","_top" any of these you can use based on your requirement.But i think  you shud have to upload your html document under km content with in ur portal environment.As you  said your are not attaching that html page to portal  you can call your KM content by specifyng url of your km content, otherwise you can make use of quick link property of page. If you want further help you could ask me .. i hope it'll be useful for you.
    Regards,
    Sitara
    Edited by: sitara kola on Mar 7, 2008 11:47 AM

  • How do i reference a div on html page with php?

    This question is an extension to a topic I asked last week...
    I am programming a form within a div on the page..
      <div id="contact_form">
      <form name="contact" action="showEntry()">
        <fieldset>
          <p>
            <input type="text" name="name" id="name" size="30" value="" class="text-input" />      </p>
          <p>
            <input type="submit" name="submit" class="button" id="submit_btn" value="Send" />
          </p>
        </fieldset>
      </form>
    </div>
    Above that I have the php code to declare a function showEntry()
    <?php
    function ShowEntry() {
    ?>
    What I want to do is run the function to show what was entered and place a piece of code so that the div containing the form is cleared and replaced with a reply...
    The ajax example code to reference the div is below...
    function() {
          $('#message').html("<h2>You entered {fieldset.name.value}</h2>")
    What I want to do is make all this code appear on one HTML page together...
    Basically the user enters their name, presses send.
    The form disappears and the message is placed in it's place...
    Thank you in advance for any feedback..
    Terry

    Nancy O. wrote:
    Herbert2001 wrote:
    BUT honestly, you'd be much better off using some kind of php framework to take care of email stuff and routing... writing your own protected secure code is like re-inventing the wheel...
    Totally agree. 
    Just curious, which PHP frameworks are you using, Herbert? 
    Nancy O.
    Hey Nancy & Murray,
    Currently I use Laravel, though lately I've been lured more and more into Python and Pyramid/Django. I really like Python, because it is far more consistent as a language than PHP (which, honestly, is very, very messy compared to other languages - it's a legacy thing**).
    I've also used http://fatfreeframework.com/home for smaller personal things, because it's a very tight and easy to use mini framework.
    And, although it is not a 'real' framework, I have to do a lot of work in Wordpress (mainly because clients require it from me, not my own choice ;-).
    You can find Laravel here: http://laravel.com/
    Python things I am checking out currently:
    Django: https://www.djangoproject.com/
    Pyramid: http://www.pylonsproject.org/
    Again, I think that Python is a beautiful language, and if I could I would switch to that for my web work completely. But not quite yet. :-) Not saying PHP is bad, though - I've worked with it for the longest time; it's just quirky in places.
    ** see http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-design/

  • How to output stored PL/SQL into HTML Template?

    I have a PL/SQL procedure that uses htp.p to write a <script> element. The procedure writes out my Google Analytics tracking code so I don't have to update it manually in my many templates.
    How do I get this procedure to write the <script> in an HTML Template?
    I currently use the following at the bottom of my HTML Templates:
    <!-- Google Analytics code begins -->
    <script type="text/javascript" language="javascript" src="http://domain/portal/pls/portal/schema.procedure"></script>
    <!-- Google Analytics code ends -->
    But this produces an error in IE (still seems to track ok, but some users get error dialogs of an error at line 2 char 7).

    Wow! Option 2 fixed it.
    So I was calling the proc via a js call as follows:
    <!-- Google Analytics code begins -->
    <script type="text/javascript" language="javascript" src="http://domain.com/portal/pls/portal/schemaL.proc"></script>
    <!-- Google Analytics code ends -->
    and the proc output the following:
    <script type="text/javascript">
    var gaq = gaq || [];
    gaq.push(['setAccount', 'UA-999999-9']);
    gaq.push(['setCustomVar', 1,'var1','value1',1]);
    gaq.push(['setCustomVar', 1,'var2','value2_COM',1]);
    gaq.push(['trackPageview']);
    (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
    </script>
    Apparently the "<script>" tags in the proc output were the problem. If only I could see the generated HTML output of a page...

  • How do I centre javascript in a HTML page? Please help!

    Ok, I recently set up a website with advertising space. The space is split into banner engines of 10 banners each rotating every 7 seconds.
    I have fully tested the coding which I downloaded and it all seems to work as well as I need it to.
    The only problem that I have is that the javascript or at least the banner it produces are always firmly stuck to the left. They need to mbe in the centre to fit the rest of the page, but I can't seem to get them to centre.
    Here's how the page is set up and coded:
    in the page I have:<html>
    <head>
    <center>
    <p>Each test banner links back to this page. Your banner would link to whatever site/location you required.</p>
    <p>
    <script type=text/javascript src="http://www.UkVariety.co.uk/banner/div_construct2.js"></script>
    <script type=text/javascript>
    var _banners = new Array();
    function addBanner(_bannerHTML){
      _banners[_banners.length?_banners.length:0]=_bannerHTML;
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 1' src='http://www.ukvariety.co.uk/Images/banners/Ad1.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 2' src='http://www.ukvariety.co.uk/Images/banners/Ad2.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 3' src='http://www.ukvariety.co.uk/Images/banners/Ad3.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 4' src='http://www.ukvariety.co.uk/Images/banners/Ad4.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 5' src='http://www.ukvariety.co.uk/Images/banners/Ad5.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 6' src='http://www.ukvariety.co.uk/Images/banners/Ad6.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 7' src='http://www.ukvariety.co.uk/Images/banners/Ad7.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 8' src='http://www.ukvariety.co.uk/Images/banners/Ad8.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 9' src='http://www.ukvariety.co.uk/Images/banners/Ad9.gif'></a>");
    addBanner("<a href='http://www.ukvariety.co.uk/banners.html'><img border=0 alt='Advertiser 10' src='http://www.ukvariety.co.uk/Images/banners/Ad10.gif'></a>");
    var div2 = new NewDiv2(window, "banner", _banners[0],0,0,50,50,500,"ABSOLUTE");
    var count=0; /* which one to start with */
    function doIt() {
    count++;
    count%=_banners.length;
    div2.setBody(_banners[count]);
    setInterval('doIt()',7000);
    </script>
    </p>
    </head>
    <body>
    <script type=text/javascript>
    div2.output();
    </script>
    </body></center>
    </html>The javascript links to a file caled div_construct2.js
    This file contains the following coding:
    isNS = document.layers?true:false;
    isIE = navigator.appName.indexOf("Microsoft") != -1
    isNS6=document.getElementById&&!isIE?true:false;
    function NewDiv2(window, id, body, left, top, width, height, zIndex, absolute) {
        this.window = window;
        this.id     = id;
        this.body   = body;
        var d = window.document;
        d.writeln('<STYLE TYPE="text/css">#' + id + ' {');
         if (absolute) d.write('position:absolute;');
         else          d.write('position:relative;');
        if (left)   d.write('left:'  + left  + ';');
        if (top)    d.write('top:'   + top   + ';');
        if (width)  d.write('width:' + width + ';');
         if (height) d.write('height:' + height + ';');
         if (zIndex) d.write('z-index:' + zIndex + ';');
        d.writeln('}</STYLE>');
    if (isNS) {
        NewDiv2.prototype.output             = function()      { var d = this.window.document;d.writeln('<DIV ID="' + this.id + '">');d.writeln(this.body);d.writeln("</DIV>");this.layer = d[this.id];}
        NewDiv2.prototype.moveTo             = function(x,y)   { this.layer.moveTo(x,y); }
        NewDiv2.prototype.moveBy             = function(x,y)   { this.layer.moveBy(x,y); }
        NewDiv2.prototype.show               = function()      { this.layer.visibility = "show"; }
        NewDiv2.prototype.hide               = function()      { this.layer.visibility = "hide"; }
        NewDiv2.prototype.setZ               = function(z)     { this.layer.zIndex = z; }
        NewDiv2.prototype.setBgColor         = function(color) { this.layer.bgColor = color; }
        NewDiv2.prototype.setBgImage         = function(image) { this.layer.background.src = image;}
        NewDiv2.prototype.getX               = function() { return this.layer.left; }
        NewDiv2.prototype.getY               = function() { return this.layer.top; } //was right .. ??
        NewDiv2.prototype.getWidth           = function() { return this.layer.width; }
        NewDiv2.prototype.getHeight          = function() { return this.layer.height; }
        NewDiv2.prototype.getZ               = function() { return this.layer.zIndex; }
        NewDiv2.prototype.isVisible          = function() { return this.layer.visibility == "show"; }
        NewDiv2.prototype.setBody            = function() { for(var i = 0; i < arguments.length; i++) this.layer.document.writeln(arguments);this.layer.document.close();}
    NewDiv2.prototype.addEventHandler = function(eventname, handler) {this.layer.captureEvents(NewDiv2._eventmasks[eventname]); var newdivel = this;this.layer[eventname] = function(event) { return handler(newdivel, event.type, event.x, event.y, event.which, event.which,((event.modifiers & Event.SHIFT_MASK) != 0),((event.modifiers & Event.CTRL_MASK)  != 0),((event.modifiers & Event.ALT_MASK)   != 0));}}
    NewDiv2.prototype.removeEventHandler = function(eventname) {this.layer.releaseEvents(NewDiv2._eventmasks[eventname]);delete this.layer[eventname];}
    NewDiv2.prototype.centerX = function() {this.layer.moveTo(Math.round((window.pageXOffset+document.width-100)/2),this.layer.top)}
    NewDiv2._eventmasks = {onabort:Event.ABORT,onblur:Event.BLUR,onchange:Event.CHANGE,onclick:Event.CLICK,ondblclick:Event.DBLCLICK, ondragdrop:Event.DRAGDROP,onerror:Event.ERROR, onfocus:Event.FOCUS,onkeydown:Event.KEYDOWN,onkeypress:Event.KEYPRESS,onkeyup:Event.KEYUP,onload:Event.LOAD,onmousedown:Event.MOUSEDOWN,onmousemove:Event.MOUSEMOVE, onmouseout:Event.MOUSEOUT,onmouseover:Event.MOUSEOVER, onmouseup:Event.MOUSEUP,onmove:Event.MOVE,onreset:Event.RESET,onresize:Event.RESIZE,onselect:Event.SELECT,onsubmit:Event.SUBMIT,onunload:Event.UNLOAD};
    if (isIE) {
    NewDiv2.prototype.output = function() { var d = this.window.document;d.writeln('<DIV ID="' + this.id + '">');d.writeln(this.body);d.writeln("</DIV>");this.element = d.all[this.id];this.style = this.element.style;}
    NewDiv2.prototype.moveTo = function(x,y) { this.style.pixelLeft = x;this.style.pixelTop = y;}
    NewDiv2.prototype.moveBy = function(x,y) { this.style.pixelLeft += x;this.style.pixelTop += y;}
    NewDiv2.prototype.show = function() { this.style.visibility = "visible"; }
    NewDiv2.prototype.hide = function() { this.style.visibility = "hidden"; }
    NewDiv2.prototype.setZ = function(z) { this.style.zIndex = z; }
    NewDiv2.prototype.setBgColor = function(color) { this.style.backgroundColor = color; }
    NewDiv2.prototype.setBgImage = function(image) { this.style.backgroundImage = image;}
    NewDiv2.prototype.getX = function() { return this.style.pixelLeft; }
    NewDiv2.prototype.getY = function() { return this.style.pixelRight; }
    NewDiv2.prototype.getWidth = function() { return this.style.width; }
    NewDiv2.prototype.getHeight = function() { return this.style.height; }
    NewDiv2.prototype.getZ = function() { return this.style.zIndex; }
    NewDiv2.prototype.isVisible = function() { return this.style.visibility == "visible"; }
    NewDiv2.prototype.setBody = function() { var body = "";for(var i = 0; i < arguments.length; i++) {body += arguments[i] + "\n";}this.element.innerHTML = body;}
    NewDiv2.prototype.addEventHandler = function(eventname, handler) { var NewDiv = this;this.element[eventname] = function() { var e = NewDiv2.window.event;e.cancelBubble = true;return handler(NewDiv2, e.type, e.x, e.y, e.button, e.keyCode, e.shiftKey, e.ctrlKey, e.altKey); }}
    NewDiv2.prototype.removeEventHandler = function(eventname) { delete this.element[eventname];}
         NewDiv2.prototype.centerX = function() { this.style.pixelLeft=Math.round((document.body.clientWidth+document.body.scrollLeft-300)/2)}
    * The following was written by:
    * Dario Guzik
    * Spam unfriendly email address: dguzik AT bigfoot DOT com
    if (isNS6) {
    NewDiv2.prototype.output = function() { var d = this.window.document;d.writeln('<DIV ID="' + this.id + '">');d.writeln(this.body);d.writeln("</DIV>");this.element = d.getElementById(this.id);this.style = this.element.style;}
    NewDiv2.prototype.moveTo = function(x,y) { this.style.pixelLeft = x;this.style.pixelTop = y;}
    NewDiv2.prototype.moveBy = function(x,y) { this.style.pixelLeft += x;this.style.pixelTop += y;}
    NewDiv2.prototype.show = function() { this.style.visibility = "visible"; }
    NewDiv2.prototype.hide = function() { this.style.visibility = "hidden"; }
    NewDiv2.prototype.setZ = function(z) { this.style.zIndex = z; }
    NewDiv2.prototype.setBgColor = function(color) { this.style.backgroundColor = color; }
    NewDiv2.prototype.setBgImage = function(image) { this.style.backgroundImage = image;}
    NewDiv2.prototype.getX = function() { return this.style.pixelLeft; }
    NewDiv2.prototype.getY = function() { return this.style.pixelRight; }
    NewDiv2.prototype.getWidth = function() { return this.style.width; }
    NewDiv2.prototype.getHeight = function() { return this.style.height; }
    NewDiv2.prototype.getZ = function() { return this.style.zIndex; }
    NewDiv2.prototype.isVisible = function() { return this.style.visibility == "visible"; }
    NewDiv2.prototype.setBody = function() { var body = "";for(var i = 0; i < arguments.length; i++) {body += arguments[i] + "\n";}this.element.innerHTML = body;}
    NewDiv2.prototype.addEventHandler = function(eventname, handler) { var NewDiv = this;this.element[eventname] = function() { var e = NewDiv2.window.event;e.cancelBubble = true;return handler(NewDiv, e.type, e.x, e.y, e.button, e.keyCode, e.shiftKey, e.ctrlKey, e.altKey); }}
    NewDiv2.prototype.removeEventHandler = function(eventname) { delete this.element[eventname];}
    NewDiv2.prototype.centerX = function() { this.style.pixelLeft=Math.round((document.body.clientWidth+document.body.scrollLeft-300)/2)}
    If anyone could help, I would be most grateful and could even offer a free advert for a while if needs be.
    Thanks in advance
    Dave
    "I think my brain exploded"

    You might want to ask this on a JavaScript forum.
    Java and JavaScript are not related.Now his brain probably experienced not just a mere explosion, but more like an atomic one.

  • How to retrieve a message into an html page passed from a servelt?

    am new to servlet.
    i have a Login.html contains a form having username and a password field.when the form is submitted it goes to VerifyServlet for authentication.
    now if the user provide the correct username and password i authenticate him into a new servlet called UserhomeServlet which i have already done. but if the password is incorrect i wanted to take him back to the Login.html with a Error message printed on it passed from the VerifyServlet. i dont know how to do that.
    pls tell me if you have any idea.

    Hi ,
    Try the following in your VerifyServlet doPost / doGet method.
    //for simplicity i have defined name & pwd in the same file and compared values from the login.html //
    //you can implement your logic //
                     if (name.equals(login)&& pwd.equals(pass)){
              //redirect to UserhomeServlet
                          else {
                   out.println("Invalid Login");
                   RequestDispatcher rd = req.getRequestDispatcher("/html/login.html");
                   rd.include(req,res);
         }bye for now
    sat

  • How to display selected records on one HTML page?

    Hi,
    I would like to display selected part of records on one page in HTML region. For example I have a Master - Detail table set named Procedures and Tasks (each Procedure can have one or more tasks)
    I would like to be able to display all Tasks for a given Procedure in one HTML region on a page... The problem is that the number of tasks vary between procedures and can change in time. Also, the 'task description' can be very large so a simple report list of all tasks is something I cannot use... (I would like eg for the task name to be here, and the task_description to be there - unlike the report where everything is in one line...) The following are my ideas but non of them seemed to be feasable here...
    1. Use a report based on vertical columns (However I am using Theme 10 for which there are no vertical column templates. The only vertical templates I can see are the default ones but I have no idea how to customize them - where are they?)
    2. In HTML region use &ITEM_NAME. substitutions. In order to display more than one &EMN_NAME. (based on eg. EMPID) I suspect that I would need to write some kind of javascript loop. Has anyone have an idea about how would such a script look like?
    3. Display each Task in a separate screen. This is something I would want least but better than nothing - to have a customized report which would display one task at a time with some kind of pagination to it...
    Please let me know if someone has tried something simmilar or maybe there is a 4th option which will be simpler and easier...
    Many thanks,
    Pawel.
    I tried to make a very simple illustration of what I would like to achive here:
    http://htmldb.oracle.com/pls/otn/f?p=44995:3:9461299983704828937::::
    Message was edited by:
    padmocho

    Just to answer this one myself....
    In order to achive the above I used a PL/SQL Dynamic Content page and entered a html content in htp.prn('');
    Then, I created a PL/SQL LOOP which searches through the various rows...
    In the end, whenever I wanted to display html content I just used htp.prn and for variables I used htp.p(<var_name>);
    Maybe, it helps ;)

Maybe you are looking for