JApplet Reloading Problem

Hi,
I am developing a Swing applet, which actually runs quite a heavy application. It uses at least two jar files too.
the functionality requires that i open the page containing in a new browser window. I do that using window.open() successfully.
Once the applet is loaded and working, i close the child window. (the client might always do that...) And then i click again on the link for opening the applet in a new browser window (the original place for firing the applet), what i expect is that the applet should reload itself.
But that's not what is happening. It doesn't do anything written inside any of the methods, i.e. all of the init, start etc. are skipped.
And effectively, i have to have a fresh instance of browser (parent) to be able to launch the applet again.
Could anybody throw some light on this thing. What i want is that the applet should be loaded again whenever i click on that link for loading it.
any sort of help would do.
thanks and regards
raghav..

An applet will only be reloaded if the browser's cached copy is older than the one that resides on your server. In your case the applet is the same only the data it's displaying is different, what you should do is make sure that whatever component you used to display the data is repainted by calling the repaint method.
;o)
V.V.

Similar Messages

  • Servlet Reloading Problem!

    JSP + Bean is OK!
    But, Servlet + Bean occur a reloading problem.(Reloading does not happen)
    For example,
    1) TestClass.java (Bean)
    public class TestClass {
    private String txt;
    public TestClass() {
    txt = "Test!!"; ---(1)
    public String getTxt() {
    return txt;
    2) Test.java (Servlet)
    public class Test extends HttpServlet {
    public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
    TestClass testClass = new TestClass();
    PrintWriter out = res.getWriter();
    out.println(testClass.getTxt());
    In above examples, though I change txt String(number (1)) Bean reloading does not occur. So old txt String shows.
    In Tomcat, such problem does not happen.
    Is this a problem of OC4J?
    Thanks.
    null

    Well, only servlets are supposed to be reloaded, not their dependent classes.
    If you are using Tomcat 4.x, then there might be an explanation. It seems that Tomcat 4.x will simply reload the entire web app context if it detects that a servlet (not a JSP!) has changed. Just define a servlet context listener to see that.
    Regards,
    Vadym

  • Applet Reloading problem

    Hi,
    I am involved in a project in which we are using many images to scroll in a applet.The url of the images are retiriving from the data base and given to the applet using jsp.The problem is when the page is reloaded it takes much time to show the applet again even i am using the archive tag.Can any one tell me how to get rid of this reloading problem.
    Regards,
    Prakash

    Hi,
    Thanks for the reply.Actually i am not reloading the page.when i go to some other page and comes back it takes a long time ro load the page.Is there any way to overcome this problem.
    Regards,
    Prakash

  • Problem: codebase, jar and image reloading problem please help!

    Hi Java Gurus,
    I have written an applet that extends JApplet for viewing webcam. In order to reduce the download time I put my classes into a doorcam.jar file. The following is my <applet> tag in my html file.
    <applet code="CameraApplet.class"
    archive="doorcam.jar"
         codebase = "webcam/classes"
         width="375" height="475">
    <param name="imagePath" value="http://judge/webcam/images">
    <param name="webCamImage" value="door.jpg">
    <param name="COMPort" value="COM2">
    <param name="frameRate" value="10"> <!-- could not exceed more than 10-->
    <param name="host" value="judge">
    </applet>
    The fist problem is that my class file does not get loaded from the jar file if i provide the "codebase" attribute as above. Instead the browser load every single class file from the webserver. This has some problem too. Coz the browser sometimes just thorough NullPointerException or ClassNotFoundException. After much of debugging I found out that the problem is the IE browser which seldom fails to load classes or image file from the server. If i referesh the browser the applet and all its classes loaded successfully and runs smoothly. This behaviour never occurs when running with "appletviewer".
    I wanted all my classes to be loaded from my jar file. After much of trial and error I found out that if i remove "codebase" attribute the browser loads the classes from my jar file and applet loads very fast. This is where the second problem comes in. The browser does not reload my webcam image file so that the webcam become alive with live images, like before.
    If I run on "appletviewer" everything works fine my web cam is displayed properly. But in IE browser the image does not get reloaded when I refresh my image to give live to my webcam display. The refresh method is given below.
    private void refresh(final URL url) {
    Image webCamImage =getImage(url);
    webCamImage.flush(); // flush out the previous image
    webCamImage = getImage(url); // get a new image
    webCamImageIcon.setImage(webCamImage); webCamImageIcon.paintIcon(webCamLabel, webCamLabel.getGraphics(), 15, 15);
    When I add the "codebase" attribute back, the image gets reloaded for every refresh() and everything works fine. But the classes are also loaded from the server. And occasionally also suffers Class loading and image loading problem. As I presented earlier, when I do refreshing in the browser everything gets loaded and the applet function correctly with web cam displaying very well.
    The problem is so strange that I could not find any way to solve it.
    It would be a great help to me if somebody provide me some work around to the problem.
    I tested on Windows 2000, Windows XP, IE 5.5, IE 6 with J2SDK 1.4.0.
    Thank you all very much in advance.
    best regards,
    Judge

    Thank you so much for the suggestions. I did tried the way u suggested. The problem still the same.
    I think its the problem between IE browser and Java Plug-in.
    I which SUN would find these incompatibilities and solve these problems.
    I even tried using java SDK and plug-in 1.4.1 it even worst. It can't even load an applet. And it does not show any loading messages nor any error messages. It just show a cross sign on the upper left coner.
    I would be so glad, if Sun would try to eliminate the inconsistancies such as caching, loading, initializing etc between browser and its Java plug-In. For example, applets behave well in appletviewer and behave unpredictably in browser environment.
    I have seen so many people in the forums with all sorts of problems because of this.
    Right now I m desperately looking for work around to my problem.
    If somebody would provide me with the solution to my problem it would be a great help to me.
    thank you all so much.
    best regards,
    Judge

  • Japplet reloaded each time......

    hi,
    i have a small problem.i have a japplet running.now i open a web page in the same browser window by calling showdocument().when i come back to the applet it is reloaded from the beggining and init method is also called but actually only start must be called.can anybody help me out...
    thanx in advance.
    anurag.

    you can use static variables in order to keep the statement of your applet

  • Is Apple ever going to address this force reload problem in Safari?

    Seriously, Safari 5.1 is, for all intents and purposes, completely disabled now.  I leave a lot of windows and tabs up at any given time, and when I return to a window after having been someplace else (usually coding in a plain text environment), the window reloads.  If I try to stop it, I get the dreaded message, "Webpages are not responding, so loading cannot be stopped.  Do you want to force reload this page and all pages in other tabs and windows?"  Obviously I do NOT always want to to that!  As of yesterday afternoon, Safari doesn't run at all, because it has never stopped reloading pages.  It's been doing this for over twelve hours.  I'm reading messages all over the support community that indicate MANY people are having this problem.  When is someone at Apple going to address this??

    I am still having this problem occasionally, but one thing I did that helped immensely was to:
    1.) Disk Utility > First Aid > Repair Disk Permissions, and
    2.) Empty Cache in Safari (maybe even for extreme issues just "reset Safari."  It's actually no big deal.)
    I was told to do this; I am by no means an expert, so kudos to my buddy for this solution--hope it helps!

  • Dynpro application in Portal (iView reload problem)

    Hello,
    I have an iView, which is based on a Dynpro app.
    This iView is placed on a Portal page.
    My problem is that if I run the application (as
    a Portal user), and navigate within this application
    through a sequence of Dynpro views, and then
    switch to some other portal Page (e.g. by clicing
    on some workset tab), and then go back to the
    page (workset tab) with my Dynpro application,
    the Dynpro iView is reloaded. This causes the
    Dynpro application to restart (the user sees
    the initial Dynpro application view, instead
    of the one he navigated to previously).
    Is it possible to avoid the dynpro iView being
    reloaded when going back to the iView's workset?
    In other words, I would like the dynpro iView
    to maintain its state for the whole Portal
    session.
    Many thanks for any help.
    Greetings,
    Tomek.

    hi
      We have already implemented the Work Protect Mode. But that will just force you to save up the data in the iview. But to maintain the same data in the iview when you come back like the scenario Tomasz is having, work protect mode will not be helpful.
    anyway to know more about that api refer this link
    http://help.sap.com/saphelp_nw04/helpdata/en/17/76d93f130f9115e10000000a155106/frameset.htm
    If you still require clarifications let me know and i can help you out.
    regards
    ravi

  • JApplet debugging problem

    Hi there all:
    I'm having a problem with debugging a JApplet. I created a new workspace, project and applet and didn't make any changes to anything. When I try to debug the applet, I get these messages:
    System Error: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup )
    System Error: java.lang.Object java.lang.Class.newInstance0()
    System Error: java.lang.Object java.lang.Class.newInstance()
    System Error: java.applet.Applet sun.applet.AppletPanel.createApplet(sun.applet.AppletClassLoader)
    System Error: void sun.applet.AppletPanel.runLoader()
    System Error: void sun.applet.AppletPa
    System Error: nel.run()
    System Error: void java.lang.Thread.run()
    If I change the object from a JApplet class to an Applet class, I can debug just fine.
    Anyone know what's going on here?
    Thanks
    Jeff

    Me again. Was doing some searching on the net about this one since I've gotten no response.
    Found this at Inprise (Borland) about a debugging problem with JBuilder3 (I assume that the base of jdev is still JBuilder).
    http://community.borland.com/article/0,1410,19739,00.html
    To quote from their document--------
    Question:
    I can't seem to debug Applets with JBuilder3 Standard. If I attempt to debug my Applet
    I recieve the following error:
    java.security.AccessControlException: access denied (java.lang.RuntimePermission
    modifyThreadGroup )
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:195)
    at java.security.AccessController.checkPermission(AccessController.java:403)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
    Why?
    Answer:
    In a nutshell this is an installation problem with JBuilder3 Standard edition.
    The install for JBuilder3 Standard did not provide the file 'DebugApplet.policy'.
    To resolve this problem download the file from the following URL:
    http://www.borland.com/devsupport/jbuilder/downloads/DebugApplet.policy
    After you have downloaded the file, copy the file to your JBuilder3\bin directory.
    This will fix the problem.
    You can also cut and paste the following:
    (NOTE: create the file DebugApplet.policy in your JBuilder3\bin directory)
    //DebugApplet.policy
    // These policy permissions are needed for the AppletViewer used by sun.tools.debug.
    grant {
    permission java.lang.RuntimePermission "accessClassInPackage.*";
    permission java.lang.RuntimePermission "modifyThread";
    permission java.lang.RuntimePermission "modifyThreadGroup";
    permission java.net.SocketPermission "*", "accept, connect, listen, resolve";
    permission java.util.PropertyPermission "appletviewer.version", "read";
    permission java.io.FilePermission "<>", "read";
    permission java.security.AllPermission;
    Could this be a problem in JDev3 too?
    Jeff
    null

  • NavigationMethod=byEPCM - reload Problem

    Hello all,
    it's my first time I try to customize a navigation so I just looked up code in other navigations and tried to adjust it to the design requirements.
    It worked fine so far. The problem is, that the copied version used navigationMethod="byURL" for the links and the EPCFlevel was set to 0.
    This resulted in 2 problems:
    1) The navigation method byURL leads to a complete refresh of the whole page. When some web dynpro applications are involved, this causes a collaboration popup containing a message, that the user is already logged in.
    I tried to switch to navigationMethod=byEPCM and EPCFlevel=1 and there is no refresh anymore (except content area). Problem now is, that my navigation doesn't refresh as well. So navigation doesn't show the actual navigation path.
    How could I use navigationMethod=byEPCM and also ensure that only my content area and navigation will refresh?
    Does it anyhow work with the EPCM.raiseEvent method? If so, how to use this method?
    2) What other parameters - except EPCFlevel - are relevant to have exactly the same "functionality" as the standard SAP navigation? I'd like to avoid that there are any other side-effects when changing the navigation.
    Hopefully anyone could help me.
    Thanks a lot in advance.
    Joachim

    If it is due to the browser's cache of the applet, the only way that most (all?) current browsers will reload the applet is to close ALL of the browser's windows and restart the browser. (You used to be able to CTRL-F5 but this no longer works, afaik.)

  • Page reload problem

    Hello,
    I am experiencing problems with a JSP page that contains 1 text field and 2 list boxes.
    The page has a form with no action, 3 buttons at the bottom (save, delete and back), they are '<input type="button"...' witch throw some JS code to forward to the next page.
    The thing is that when I press <enter> when I'm in the text field, the page reloads... BUT, if I put a second text field, this does not occur... (and don't tell me to leave the second field ;-)), and that's exactly what I'd like, but only with one field.
    I even tried without the buttons and the JS code, but it's still the same thing... What can I do???
    Please help me...
    Best regards
    NAS

    Hi!
    I stripped the code down to its simplest state, this is what I have left...
    <html>
    <head>
    <title>unifr.ch</title>
    <META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=iso-8859-1">
    <link href="script/standard.css" rel="stylesheet" type="text/css">
    <%@ page import="alumni_web.*" %>
    </head>
    <body bgcolor="#ffffff" background="images/general/bg_m2.gif">
    <table border="0" cellpadding="0" cellspacing="0" id="content_3_col">
    <tr>
    <td align="left" valign="top">
              <form name="edi_saes" method="post">
                   <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td>
                   <INPUT type="text" name="textfield">
    </td>
    </tr>
    </table>
    </form>
    </td>
    </tr>
    </table>
    </body>
    </html>
    There it is all... And if I type in something in the field and press enter, it reloads the page... If I add a second field, this does not occur...
    Thanks for your time

  • JApplet initialization problem

    I am experiencing a problem with a JApplet that has me perplexed... I wrote the JApplet to act as a front end to a servlet. I am using the Jakarta Tomcat server to execute both the servlet and to serve the web page which contains the applet. The html page containing the applet has been configure to load the latest JRE plugin into a users browser, if need be, and that works OK. When I run the applet from a browser on my own system, I don't have any problems, but when I tried to load the applet over the internet, at a friends house, I get the following walkback... Seems to be complaining about a "no proxy"... Can anyone tell me what this means? The applet does use Swing components, but my understanding is that is OK so long as the latest JRE plugin is installed. My server is up an down a lot, as I develop this application, but you are free to give the applet a try and let me know what you see... The URL is http://www.marcchamberlin.com/control.htm and don't be surprised that it is slow to respond, that is done on purpose so give it a minute... Any help would be much appreciated... ;-)
    Opening http://www.marcchamberlin.com/javax/swing/JApplet.class no proxy
    load: class DisplayStarChart.class not found.
    java.lang.ClassNotFoundException: DisplayStarChart
    at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:385)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:462)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:395)
    at sun.applet.AppletPanel.run(Compiled Code)
    at java.lang.Thread.run(Thread.java:474)
    P.S. What are Duke Dollars???? Seems to be a lack of documentation about them ;-)

    Seems to work OK for me. I got the applet, no problem, and the star-chart was a grey area with the text "star chart goes here". Eventually, the real star-chart appeared (and mighty cool iot looked, too ;-). Here's the output from my Java console:
    Servlet URL = http://www.marcchamberlin.com/servlet/StarChartServlet
    Servlet URL = http://www.marcchamberlin.com/servlet/StarChartServlet
    Attempting to connect to Star Chart Servlet
    Attempting to connect to Star Chart Servlet
    Connection to servlet has succeeded!
    Servlet URL = http://www.marcchamberlin.com/servlet/StarChartServlet?user=userIdent&move=RA%3A+19h30m00.00sDEC%3A+%2B0%B00%270.0%22FOV%3A%2B20%B000%2700%22&date=2001-6-1T10%3A54%3A11
    Attempting to connect to Star Chart Servlet
    Connection to servlet has succeeded!
    Maybe the "no proxy" thing on your friend's system is because he/she is behind some kind of "difficult"' firewall, or the ISP has some strange proxy setup or something?? (I'm using a router as a firewall, and have no proxy set up). Anyway, I get the impression that it's the hardware, not your software, that is the problem. Maybe try it from somewhere else (the local library?!?)

  • JApplet focussing problem

    I have a JApplet in which i have a JTabbedPane. My problem is that in Internet Explorer the focus does not stay on the applet and i have to click on the applet to activate it first and then i can use it. Can anyone tell me how to set the focus on the applet when it loads.

    does using requestFocusInWindow have some pre conditions. It did not workNo.
    post a sample program that we can compile and run
    just the gui stuff, that way we can see how you're adding what to where
    Message was edited by:
    Michael_Dunn
    I said no, but yes, the component has to be displayable/ visible etc
    as per the api docs
    the timer should overcome that, but if the timer didn't work,
    then posting your code would quicken a solution

  • Applet - page reload problem

    Greetings 4all,
    I'm developing, a bit complicated applet with few threads, listeners, and not difficult but expanded GUI. You can see it under www.demo.twelvee.com.pl.
    The problem is that this applet doesn't behave correctly after page reload in the browser. I mean that there are no graphics with parameters drawn in the middle of the main internal frame. I don't know why. When I'm visiting page first time everything works fine. This bug occurs only after reloading the page. Threads are still working, also all listeners are catching events. After few small tests I've recognized that method paintComponent() in each JPanel isn't called. I suppose it might be connected with browser's cache.
    Have You got any ideas? Because I have none, any suggestions are welcome :)
    You can access source here: http://www.iem.pw.edu.pl/~opalam/12/source/

    If it is due to the browser's cache of the applet, the only way that most (all?) current browsers will reload the applet is to close ALL of the browser's windows and restart the browser. (You used to be able to CTRL-F5 but this no longer works, afaik.)

  • AE CS5 relink/reload problem

    I am trying to open a project originally created in CS3 but I've upgraded to CS5. I am running AE on a 64bit HP PC with Win7 and the media and project are on an external Firewire drive.  When I try to open the project it gets to about 90% and the wheel just...keeps...spinning.  I moved the project to my desktop and unmounted the FW drive and the project opens, but of cource all media is offline.  If I re-mount the drive and try to relink or reload the wheel just spins.  I then moved everything (project file and media) off the FW drive and onto a video array but the results are the same --no good.  I can import the files again independantly of the originals, but that would be very tedious to do for all my files in the project.  Has anyone experienced this problem?

    So, when all of the media and the project are on the array, when you try to re-link one of the files, the others don't automatically re-link, is that correct? Are you maintaining the same folder structure on the array?

  • Jsp reload problem (post method)

    Hi~
    I have two jsp.(test.jsp b.jsp)
    ============test.jsp===============
    <html>
    <head><title>test</title></head>
    <body>
    <form name=myform method=post action=b.jsp>
    <input type="submit" value=login>
    </form>
    </body>
    </html>     
    =============b.jsp=================
    <html>
    test ok
    </html>
    1. I pushed login button.
    2. displayed "test ok" to Explore Browser.
    3. then I click reload button.
    4. alert popup (<- problem)
    I want to click reload button. and without alert popup..
    Help me..

    Hi
    In your first jsp inside the form tag make the method to be get and not post. that should work!

Maybe you are looking for

  • HT3854 Not applicable in Mac OS X Server v10.8 (Mountain Lion)?

    This chart seems not applicable in Mac OS X Server v10.8.4 (Mountain Lion) [Server v2.1.1]. I have 32GB of RAM but the maxproc limit is still 2500, no matter setting via launchctl (the new way), sysctl (the old way), ulimit (the soft way), or both of

  • Warranty coverage

    i bought hp pavillion notebook last october and i have an additional two years warranty, my screen broke down and the left click of my mouse isnt working. i bought it from Indore, India but now m at USA, my question is that, is the warranty still cov

  • I can't get 7.2.2 although it says it was "released"...

    ...and I see a lot of discussion about it. I'm on a PC. I actually had an Adobe tech support guy (Ashish) try to manually install it and my system refused to take it. AdobePatchInstaller.exe returns "This update is not for you". Ashish beat up my sys

  • Why do I lose the quality of my fonts in dreamweaver after slicing in photoshop ?

    why do I lose the quality of my fonts in dreamweaver after slicing in photoshop and saving it for web with the highest quality ?  Itried everything from different font to highest resolution.

  • LSMW - upload in IT0000 (Actions) - Employment Status 1

    Hi Master,               1. Why do we assign Employment Status - 1-(Inactive) while uploading data for the first time in Actions. 2. Is it Mandatory to have  Employment Status - 1-(Inactive) while uploading data for the first time in Actions. 3. Can