Tomcat duplicating web pages

Even though this is a tomcat question, I decided to post here because I frequent this forum more than any other. So here goes....
I created a taglib. The tablib outputs all of the HTML on the page (even the DOCTYPE and HTML..../HTML. It's a complex taglib that does lots of things so the developer doesn't have to.
When run in Websphere, the web apps perform as expected and the taglib works great.
We recently decided to try Tomcat. The first thing we noticed was that the pages of the web app were being repeated or duplicated (everything). It's as if Tomcat was simply running the servelet multiple times. Here's the odd thing. The first time the page is drawn, it looks fine. Then you hit the refresh button, again fine. Hit it again, and the web page is duplicated. Hitting refesh again and the web page is duplicated yet again (and again and again for each refresh) and even stranger is that the items on the page that the tags draw (such as links, etc., are all duplicated as well - making each addition duplicate page larger and larger) How strange is this? I'd offer up a picture to show an example, but I don't have any place to store it on the web. (Where is GFiles or GStorage or GBox?)
I've tried pragma co-cache, tried page buffer=false, and everything else I can think of relating to caching or buffering. Nothing works.
All of the example JSPs including the taglib examples work just fine, so it must be something wrong I did in my taglib.
Any ideas?

Arrg - sorry, wrong topic - meant to post in Java Server "PAGES" not "FACES". Re-posted there. Do not reply to this thread.

Similar Messages

  • Tomcat duplicating pages

    Even though this is a tomcat question, I decided to post here because I frequent this forum more than any other. So here goes....
    I created a taglib. The tablib outputs all of the HTML on the page (even the DOCTYPE and HTML..../HTML. It's a complex taglib that does lots of things so the developer doesn't have to.
    When run in Websphere, the web apps perform as expected and the taglib works great.
    We recently decided to try Tomcat. The first thing we noticed was that the pages of the web app were being repeated or duplicated (everything). It's as if Tomcat was simply running the servelet multiple times. Here's the odd thing. The first time the page is drawn, it looks fine. Then you hit the refresh button, again fine. Hit it again, and the web page is duplicated. Hitting refesh again and the web page is duplicated yet again (and again and again for each refresh) and even stranger is that the items on the page that the tags draw (such as links, etc., are all duplicated as well - making each addition duplicate page larger and larger) How strange is this? I'd offer up a picture to show an example, but I don't have any place to store it on the web. (Where is GFiles or GStorage or GBox?)
    I've tried pragma co-cache, tried page buffer=false, and everything else I can think of relating to caching or buffering. Nothing works.
    All of the example JSPs including the taglib examples work just fine, so it must be something wrong I did in my taglib.
    Any ideas?

    Update:
    Turns out tomcat caches tags whereas websphere doesn't (at least ours doesn't).
    Some tags of mine were using instance incorrectly. Once fixed, the repeating pages and other content within a page stopped.

  • I did a COPY of some text from a web page, and then did a PASTE into notepad.exe (Windows). The text from each line was duplicated -- on the line! Instead of "Fred", it became "Fred Fred".

    I just recently installed Firefox for the first time. It seems nice and quick. The version is reported as: "10.0.1".
    I wanted to save some text from a web page, so navigated to that page, selected the text, and pressed the Control-C combination to COPY the selected text to the buffer. For example, the text I selected looked something like this:
    Harry
    Ron
    Hermione
    Hagrid
    Albus
    NOTE: Each line of text has a small icon to the left of the text.
    It is not reasonable to COPY and PASTE each line individually, as there can be hundreds of lines of data. I recall, however, that
    doing a COPY and PASTE on this data into Microsoft's Excel will produce cells which have the icons included in the cell, but unfortunately one cannot can't get rid of them! At least I've never found a way to remove them, but that's another issue. :)
    Once I'd done the COPY operation I switched to a Notepad window and did a PASTE operation. To my surprise, the text from each line was duplicated. It looked like this:
    Harry Harry
    Ron Ron
    Hermione Hermione
    Hagrid Hagrid
    Albus Albus
    Thinking that there might be something unusual about the web page I looked at the source, but it appeared "normal" -- that is, as expected.
    Note: I have done this operation several times before, and have never seen this occur before.
    Note: In the actual data some of the lines have quoted text in them. Curiously there is weird behavior on these lines. In some cases the entire line is shown only once. (These occur at the top of the line, and the quoted text is at the beginning of the name.)
    When quoted text appears "later" in the name, in some cases the quoted text is duplicated, and in other cases the quoted text is missing altogether! I have also noticed an error with the quoted text, and so will be reporting that to the web site which generates the HTML.
    Note that each line of "text" is "anchor text", so if I click on a name the browser navigates to a page for that name.
    I believe that the problem is that the COPY operating in Firefox is not simply copying the visible text, but also the ALT=
    Below is a sample of what the source HTML looks like:
    <a class="lnk" target="_blank" href="http://details.aspx?id=Harry">
    <img width="16" height="16" alt="Harry" class="tb_icon" src="http://.../Harry.gif"/>
    <span>Harry</span></a>
    <br/>
    (Because of the true length of the lines in the source HTML, I have stripped out the actual URL of the site.)
    To make sure I wasn't imaging this difference I repeated the process within Internet Explorer. In that browser I did not get duplicated data.

    Try:
    *Extended Copy Menu (fix version): https://addons.mozilla.org/firefox/addon/extended-copy-menu-fix-vers/

  • I Duplicated one of my web pages.....

    I duplicated my Welcome page on my son's website because of what looked like a bug and when I re-published it I seemed to have lost it? Anyone know what I can do to get it back?
    Thanks,
    Scott

    Hello,
    Have you tried [[Font size and zoom - increase the size of web pages|Firefox's zoom feature]]? This will help increase the size of web pages.
    * To make things bigger, press '''Ctrl''' and '''&#43''' at the same time.
    * To make things smaller, press '''Ctrl''' and '''-''' at the same time.
    * To reset the size back to normal, press '''Ctrl''' and '''0''' at the same time.
    You can also use the [https://addons.mozilla.org/en-US/firefox/addon/2592/ NoSquint]. add-on to change the default zoom level for all websites at once. After setting your global zoom level, you can still fine-tune the zoom on individual sites.
    '''Using NoSquint:'''
    #After installing NoSquint, make sure you have the Add-on Bar displayed:
    #*Right-click the new tab button ("+") or a blank area of the tab bar to the right of it and choose Add-on Bar from the shortcut menu.
    #Click the % on the Add-on Bar to call up site preferences, then click the Global Settings button, then the Zooming tab.
    #*You can experiment with sizes larger than 125%, but it's not recommended that you go higher than 150% unless you have a large high-resolution monitor.
    If there are particular sites that still present a problem, feel free to post their URLs.
    Please let us know if this helped you!
    Thank you.

  • I have been duplicated charged in my credit card on 7/6/2012, when I called in the phone the machine send me to the web page, but i need to talk to somebody

    I have been charged twice on one of the 3 purchases I made on 7/6/2012 for the Bejeweled Blitz, (1) $4.99, (1) $9.99 , and (1) $4.99.  My credit card has been charged for (1) $9.98, (1) $9.99 and (1) $9.98, which totalizes $29.95 instead of $19.97.  When I tried to reply from your notification receipt, it does not connect me with your store, it says... Failed...   When i tried calling the number showed in my credit card 1-866-712-7753 it comes a voice mail saying that I have to use the web page.  Please credit my account as it should be and send me an e-mail confirmation.  Thnaks.

    We are not Apple employees here, just other users like you. You will have to contact iTunes in order to get this straightened out. We cannot do anything for you.
    Try here.
    http://www.apple.com/support/itunes/contact/

  • How can I display XSLT transformer errors on a web page ?

    Hi,
    I have some JSP pages that access DB, create an XML based on DB data and then transform it into HTML through an XSLT stylesheet. Developing the XSL code it's easy to make mistakes and generate errors on trasformation, but what I receive on the web page is only a "Could not compile stylesheet" TransformerConfigurationException, while the real cause of the error is displayed only on tomcat logs. This is the code for transformation:
    static public void applyXSLT(Document docXML, InputStream isXSL, PrintWriter pw) throws TransformerException, Exception {
            // instantiate the TransformerFactory.
            TransformerFactory tFactory = TransformerFactory.newInstance();
            // creates an error listener
            XslErrorListener xel = new XslErrorListener();
            // sets the error listener for the factory
            tFactory.setErrorListener(xel);
            // generate the transformer
            Transformer transformer = tFactory.newTransformer(new SAXSource(new InputSource(isXSL)));
            // transforms the XML Source and sends the output to the HTTP response
            transformer.transform(new DOMSource(docXML), new StreamResult(pw));
    }If an exception is thrown during the execution of this code, its error message is displayed on the web page.
    This is the listener class:
    public class XslErrorListener implements ErrorListener {
        public XslErrorListener() {
        public void warning(TransformerException ex) {
            // logs on error log
            System.err.println("\n\nWarning on XEL: " + ex.getMessage());
        public void error(TransformerException ex) throws TransformerException {
            // logs on error log
            System.err.println("\n\nError on XEL: " + ex.getMessage());
            // and throws it
            throw ex;
        public void fatalError(TransformerException ex) throws TransformerException {
            // logs on error log
            System.err.println("\n\nFatal Error on XEL: " + ex.getMessage());
            // and throws it
            throw ex;
    }When I have an error in the XSL stylesheet (for examples a missing closing tag), I can find on tomcat logs the real cause of the error:
    [Fatal Error] :59:10: The element type "table" must be terminated by the matching end-tag "</table>".
    Error on XEL: The element type "table" must be terminated by the matching end-tag "</table>".but on my web page is reported just the TransformerConfigurationException message that is:
    "Could not compile stylesheet".
    How can I display the real cause of the error directly on the web page?
    Thanks,
    Andrea

    This code is part of a bigger project that let developers edit XSL stylesheets through a file upload on the system and we can't impose the use of any tool for checking the xsl. So, I need to display the transformer error on the web page.I see. This code is part of an editorial/developmental tool for developers to create and edit XSL stylesheets.
    As part of the editorial process, XSL errors during editing can be considered a normal condition. In other words, it is normal to expect that the developers will generate XSL errors as they are developing stylesheets.
    In this light, handling the XSL transformation errors is a business requirement that you need to handle. Using the Java Exceptions mechanisms, e.g. try / catch are inappropriate to handle business requirements, in my opinion.
    I suggest that you look at how you handle the occurence of XSL errors differently than what you currently have. You need to:
    (1) capture the Transformation exception on the server;
    (2) extract the message from the exception and put it into a message that can be easily understood by the user;
    The current error message that you have going to the web browser is not useful.
    And you should not have the Transformation exception sent to the web browser either.
    What you are attempting to do with the exception is not appropriate.
    Handle the Transformation exception on the Business tier and use it to create a useful message that is then sent to the Presentation tier. In other words, do not send Java exceptions to web browser.
    />

  • LookAndFeel issue reloading an Applet in a Web page

    Hey all,
    I have an Applet that runs on a web page (loaded by servlets and JSP's using Tomcat 3.2.1 and Apache). I created my own LookAndFeel class and have a static function in the applet that sets the LookAndFeel to my new class. Everything works fine when the Applet is first loaded. However, when you exit the applet and then reload it, the custom LookAndFeel is gone and all I get is the default Metal. If I load the applet with appletviewer, I can reload it as much as I want and it always loads my LookAndFeel class.
    The static function is as follows
    /** Static initializer to set the LookAndFeel
    static {
    try {
    UIManager.setLookAndFeel(new MyNewLookAndFeel());
    catch (Exception e) {}
    I do not get any exceptions and like I said, everything works great when loaded with appletviewer.
    I have tried adding the SwingUtilities.updateComponentTreeUI(this); in either the start(), init(), or my own createGUI() function and it still does not work.
    Any ideas? Could this be a problem with the browser caching the applet? I am using IE 5.50.

    I have the same problem
    putting them in static doesn't keep the look and feel
    putting them in the applet constructor does'nt keep it
    putting them in init() doesn't keep it
    putting them in start() doesn't keep it
    heck, even putting them in all 4 of them together doesn't keep the look and feel, it always reverts back to metal

  • Error 403 Reported when trying to access web page through a program.

    I was writing a program for fun, to try to download a web page, pdf or anything from the web. The program works fine when given local file system path in URL and also works well when i tried to access a page from the tomcat installed on my machine but gives a error 403 when tried to access URL's outside the system. Tried to read about 403, seems that many sites does not allow to access a particular URL directly using the directory structure, you have to pass thru different hyperlinks before reaching resource.
    IS THERE ANY WAY THIS PROBLEM CAN BE SOLVED.
    import java.io.*;
    import java.net.*;
    class TestDownload
         public static void main(String[] args)
              try
                   URL url = new URL("http://www.webmasterworld.com/forum48/1966.htm");
              //     URL url = new URL("http://localhost:8080/index.html");
              //     URL url = new URL("file:\\C:\\web_2.pdf");
                   URLConnection connection = url.openConnection();
                   InputStream stream = connection.getInputStream();
                   BufferedInputStream in = new BufferedInputStream(stream);
                   FileOutputStream file = new FileOutputStream("x.html");
                   BufferedOutputStream out = new BufferedOutputStream(file);
                   int i;
                   while ((i = in.read()) != -1) {
                        out.write(i);
                   out.flush();
              catch(IOException e)
                   e.printStackTrace();
              System.out.println("Hello World!");
    }

    I was writing a program for fun, to try to download a web page, pdf or anything from the web. The program works fine when given local file system path in URL and also works well when i tried to access a page from the tomcat installed on my machine but gives a error 403 when tried to access URL's outside the system. Tried to read about 403, seems that many sites does not allow to access a particular URL directly using the directory structure, you have to pass thru different hyperlinks before reaching resource.
    IS THERE ANY WAY THIS PROBLEM CAN BE SOLVED.
    import java.io.*;
    import java.net.*;
    class TestDownload
         public static void main(String[] args)
              try
                   URL url = new URL("http://www.webmasterworld.com/forum48/1966.htm");
              //     URL url = new URL("http://localhost:8080/index.html");
              //     URL url = new URL("file:\\C:\\web_2.pdf");
                   URLConnection connection = url.openConnection();
                   InputStream stream = connection.getInputStream();
                   BufferedInputStream in = new BufferedInputStream(stream);
                   FileOutputStream file = new FileOutputStream("x.html");
                   BufferedOutputStream out = new BufferedOutputStream(file);
                   int i;
                   while ((i = in.read()) != -1) {
                        out.write(i);
                   out.flush();
              catch(IOException e)
                   e.printStackTrace();
              System.out.println("Hello World!");
    }

  • Is there a keyboard shortcut to open the presently open web page in another tab? It used to be Ctrl + N.

    Is there a keyboard shortcut to open the presently open web page in another tab? It used to be Ctrl + N. This shortcut now opens a Tab with the home page instead of duplicating the web page I'm on.

    Firefox has always opened new tabs in a blank page, so I'm guessing that the way you had it before was added by an extension.
    If you to to Tools > Add-ons > Extensions, are there any extensions disabled?
    In any case, you can still do this with a mouse shortcut. Hold down the Ctrl key as you drag a tab to an empty area on the tab bar.

  • How to include Chart in Web Page not as seperate image file?

    Hi, I am using JCharts and am trying to figure out how (or if it is even possible) to create a chart and then place it in a web page. All the examples I've seen show you how to create a JPEG of the chart and then link to this image from your web page. Is it not possible to surround the JPEG chart with other HTML so that I can keep my web page logo and menu etc on the same page as the chart?
    I can't find any examples which show how to surround your images with HTML as JCharts creates a JPG file and returns that in the Http Response e.g. "ServletEncoderHelper.encodeJPEG13(axisChart, 1.0f, response);".
    My environment is Java 1.4.2, Struts and Tomcat 4.1.30.
    Is there a way of drawing charts directly into a web page rather than displaying them on a seperate page as an image file?
    many thanks in advance,
    James.

    If you understand html, you know that to display an image, you must provide a reference to the image's location within the html code (there's no way to embed the image itself, directly in the html).
    An image's reference is just an url of where the image can be loaded from. Provide an url which goes to your dynamic chart servlet and requests the appropriate chart (i.e., you may have to pass in certain parameters in the url).

  • How to create Chart within a web page NOT as seperate page?

    Hi, I am using JCharts and am trying to figure out how (or if it is even possible) to create a chart and then place it in a web page. All the examples I've seen show you how to create a JPEG of the chart and then link to this image from your web page. Is it not possible to surround the JPEG chart with other HTML so that I can keep my web page logo and menu etc on the same page as the chart?
    I can't find any examples which show how to surround your images with HTML as JCharts creates a JPG file and returns that in the Http Response e.g. "ServletEncoderHelper.encodeJPEG13(axisChart, 1.0f, response);".
    My environment is Java 1.4.2, Struts and Tomcat 4.1.30.
    Is there a way of drawing charts directly into a web page rather than displaying them on a seperate page as an image file?
    many thanks in advance,
    James.

    Hi Hatton,
    in html, there exists an img-tag. this tag contains a parameter called src. And if you want to embedd an image in your html-page, you will put the source of the image you want to display to the src-parameter. The same with servlets or java server pages. For the browser it doesn't matter where the html comes from. it doesn't matter if it has to be generated by an servlet-container like tomcat. So you write a servlet, which will create an image and make it accessible to your servlet container and then insert an tag like
    <html>
    <body>
    <img src="http://yourdomain/servlet?param=value" width=aNumber height=aNumber>
    </body>
    </html>This can be done because servlets can be configured to response with images which can be created by java2d or something else...
    I hope, this will help you...

  • Deploy a web page in webserver

    How can I deploy my web page in web server without the need of going for a build of war file

    Well, it actually depends on the server you're using. I'll assume it's Tomcat.
    If you want to deploy plain-text or HTML or JSP content, then like Originative said, you can simply drop into the /webapps/myProject directory and access them. You'll still need a /webapps/myProject/WEB-INF/web.xml though, even it's a dummy one.

  • How do I save a copy of my web page so I can show it to my boss for corrections

    I have CS3, I have done the updates to our web site now I need to email it to my boss for his corrections and I would like it to look just like it does on the web page.
    Thanks

    greengirl99 wrote:
    I have CS3, I have done the updates to our web site now I need to email it to my boss for his corrections and I would like it to look just like it does on the web page.
    Thanks
    I'm assume the old pages are uploaded on the web and the new updated pages are in your local site root folder on your computer?
    If that is the case create a new folder in your local site root folder.
    Window>Files
    In the files widow click on the tiny small arrow up in the top right corner select file>new folder.
    You can use the shortcut on Mac by control clicking in the window itself, not sure of the short cut on a PC, probably command click. Might actually be the same as the Mac.
    That creates a new folder in your site folder. Name it 'updates'
    Next select the page that you have updated and duplicate it by selecting the tiny arrow at the top right of the files window. Choose Edit>Duplicate
    Now drag the duplicate file to the newly created folder whilst in the files window. You'll get a promt to update all the links.
    Once this has been done it is probably best to rename the duplicated files to get rid of (Copy of aboutUs.html). Rename it something like aboutUs_updated.html  and then upload the new folder to your webserver.
    Provide links to the new updated pages in an email to your boss.
    www.whatever.com/updates/aboutUs_updated.html
    IMPORTANT: Make sure you move/drag files within the file window otherwise all the links will be lost.
    Once your boss has made the amends you can correct the original aboutUs.html file.

  • Emage fil on web page but doesn't show in iWeb

    I cheat! I will set up a web page then duplicate it over and over again so I get my standard layout. On the first page I placed an image. Duplicated the pages, then removed that image from them all. At least in iWeb. However, when I publish the site the image appears on the pages. So, back to iWeb and its not there. Using Dreamweaver I go into the code and lo and behold it is all there. So I can remove it and reload it. But its still change the fact that the master file in iWeb has it stored in the belly of the beast. How do I get rid of it from iWeb?

    Delete the images, quit iWeb and do a restart.
    Restarting dumps out all the redundant files from iWeb, Keynote etc.
    One of the bugs in iWeb '09 is with it not saving some hyperlink changes. The only way I can get them to stick is to delete, quit, relaunch and add the new one.
    Another triumph for the iWeb programmers!

  • SSL usage in JAVA servlet and JSP based web page

    I have several question to adjust security setting of my web page.
    First of all, When do we need SSL in web pages, are you advise to use this technique in medium level security needed web page which means no commercial data just information based..And Second question is if I need , How do I use SSL (secure socket layer) in my web page or what do I need to implement it in my JSP pages?
    My IDE is Websphere 5.0 and server is tomcat 4.1 and database server MS sql server 2000.
    Please don't answer my question with just giving URL's, try to explain me something detailed and supported with URL's and examples. I am just a beginner in security topics (specially SSL).
    If you help me, I am really appreciated.
    Thanks in advance.
    Ergin

    I have several question to adjust security setting of my web page.
    First of all, When do we need SSL in web pages, are you advise to use this technique in medium level security needed web page which means no commercial data just information based..And Second question is if I need , How do I use SSL (secure socket layer) in my web page or what do I need to implement it in my JSP pages?
    My IDE is Websphere 5.0 and server is tomcat 4.1 and database server MS sql server 2000.
    Please don't answer my question with just giving URL's, try to explain me something detailed and supported with URL's and examples. I am just a beginner in security topics (specially SSL).
    If you help me, I am really appreciated.
    Thanks in advance.
    Ergin

Maybe you are looking for

  • Text in delete button in Edit bookmark popup wont show when avast online security plugin is enabled

    I tried this disabling all extensions and enabling them one at a time. the avast is the culprit. Google didn't help me to find this issue. Maybe I would have posted it in avast forum? Thank for help (although this is not a critical issue as long as o

  • Database-Table parent-child design

    Hi all, Which (forum) does this master-detail table design question belongs to or appropriate to post to? I have 3 basic entities> servers, databases, and apps example: servers=server1,server2,server3,etc database=PROD1,DEV1,TEST1,etc apps=GL,FA,AP,A

  • Photoshop workflow setup

    Hi, I need some help with Photoshop Scripting. What I need to do is to avoid users to create new document or open an existing one (except the one I've loaded). What I have done so far is to insert in the "Script Event Manager" some script for the "op

  • Powershell loop? newbie in powershell logic.

    Hi All. I have a challenge regarding a script. I want to chech if a file exists on a remote virtual server(this works). if the file exists i want to close down the vm(this works) and remove a legagy adapter from the virtual machine. so what i need is

  • Oracle VM Virtual Appliances

    Hi all, Oracle VM Virtual Appliances for Oracle E-Business Suite Deployment Guide, Release 12.2.4 (Doc ID 1928303.1) The docs said that: But when I login to root on my VM system, and run : [root@db etc]# cat /etc/oracle-release Oracle Linux Server re