Applets and HTML 5 Offline Cache
Hi,
We're doing some tests with offline application caching in HTML 5 (using Firefox 3.5 for testing).
We can get our basic app to work offline, but the Applets refuse to load from the offline cache.
You can see the demo here: http://3d-lab.aarkid.com/playground/html5/
Just enter a message and it will appear in the two applets and in the HTML below (there are two because we initially thought it was a problem due to the middleware we were using, so there's a basic Applet there too). You will need to wait for the Applets to load before the controls appear.
Now, when offline (completely offline, no Internet connection at all) the Applets are trying to load the class from their online location rather than using the cached version. (console output below)
Is there any way to tell the Java Plug-in that it's offline or where to load the classes from?
Thanks.
Console:
Java Plug-in 1.6.0_17
Using JRE version 1.6.0_17-b04 Java HotSpot(TM) Client VM
User home directory = C:\Users\Brian
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
load: class HTML5TestApplet.class not found.
java.lang.ClassNotFoundException: HTML5TestApplet.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: 3d-lab.aarkid.com
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 7 more
Exception: java.lang.ClassNotFoundException: HTML5TestApplet.class
AndrewThompson64 wrote:
Out of curiosity. What is it you can do with JS that cannot be done with an applet and an active server (e.g. something that can run PHP, JSP, ASP..)?We require the app to run completely offline (or rather, the client does) (i.e.) no Internet connection. We have tried giving them an install with a portable apache and PHP, which has worked in the past but not for this client. So we were attempting to use HTML 5 for storing data offline, but the lack of support for offline caching in the Java Plug-in is the only thing holding us back, I guess we'll just have to wait for Sun to catch up :)
Similar Messages
-
Signed applet and HTML parameters
I've created a signed applet and everything works fine, except for the fact that i can't add parameters to the applet.
Without the parameters in the HTML the applet inits and starts and can be used without problems. But when I add paramaters, the applet reports a "class not found exception".
I used HTML-converter to convert the applet tag to object/embed tags.
Has anyone had the same problem or knows what I'm doing wrong? I'd really appreciate some help.
Thanks in advance,
Erik
My HTML source:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = "600" HEIGHT = "400" codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
<PARAM NAME = CODE VALUE = "TNA" >
<PARAM NAME = ARCHIVE VALUE = "TNA.jar" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3.0">
<PARAM NAME="scriptable" VALUE="false">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.3.0" CODE = "TNA" ARCHIVE = "tna.jar" WIDTH = "600" HEIGHT = "400" scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED></COMMENT>
</NOEMBED></EMBED>
</OBJECT>
<!--
<APPLET CODE = "TNA" ARCHIVE = "tna.jar" WIDTH = "600" HEIGHT = "400">
</APPLET>
-->Try this:
OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = "600" HEIGHT = "400" codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0">
<PARAM NAME = "java_code" VALUE = "TNA.class" >
<PARAM NAME = "java_archive" VALUE = "TNA.jar" >
<PARAM NAME = "java_type" VALUE="application/x-java-applet;version=1.3.1">
<PARAM NAME="scriptable" VALUE="false">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.3.0" CODE = "TNA" ARCHIVE = "tna.jar" WIDTH = "600" HEIGHT = "400" scriptable=false pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html"><NOEMBED></COMMENT>
</NOEMBED></EMBED>
</OBJECT>
<!--
<APPLET CODE = "TNA" ARCHIVE = "tna.jar" WIDTH = "600" HEIGHT = "400">
</APPLET> -
I made a quick little applet for a school project. I wanted to put it into a HTML page. Heres my code for HTML:
<P><OBJECT codetype="application/java"
classid="java:PresentationGame.class"
width="600" height="600">
Sample Game
</OBJECT>
It shows up great on firefox but, I need a ball to move when I press the arrow keys but it doesn't. The thing is, if I keep the arrow key pressed for a couple of seconds, go to another tab and come back to the tab with the applet, I can see change in position! Almost forgot to mention, this thing worked awesome in eclipse!
Here's my code for the applet:
import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
public class PresentationGame extends Applet implements Runnable, KeyListener {
int x_pos = 25;
int y_pos = 450;
int x = x_pos;
int y = y_pos;
int x2= x_pos+10;
int y2= y_pos+25;
int radius = 50;
boolean moveRight = false;
boolean moveLeft = false;
boolean shoot = false;
int i =0;
public void init()
setBackground (Color.black);
setFocusable(true);
addKeyListener( this );
setSize(500,500);
public void start ()
Thread th = new Thread (this);
th.start ();
public void stop()
public void destroy()
public void run ()
Thread.currentThread().setPriority(Thread.MIN_PRIORITY);
if(moveRight==true & x_pos<465)
x_pos ++;
repaint();
try
// Stoppen des Threads für in Klammern angegebene Millisekunden
Thread.sleep (5);
catch (InterruptedException ex)
// do nothing
// Zurücksetzen der ThreadPriority auf Maximalwert
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
if(moveLeft==true & x_pos>35) {
x_pos --;
repaint();
try
// Stoppen des Threads für in Klammern angegebene Millisekunden
Thread.sleep (5);
catch (InterruptedException ex)
// do nothing
// Zurücksetzen der ThreadPriority auf Maximalwert
Thread.currentThread().setPriority(Thread.MAX_PRIORITY);
public void paint (Graphics g)
g.setColor (Color.red);
g.fillOval (x_pos, y_pos, 50,50);
System.out.println("Paint method accessed");
System.out.println("x_pos="+x_pos+"y_pos="+y_pos);
if(shoot==true) {
while(i<50000 & y>0) {
g.fillOval(x_pos,y--,10,10);
i++;
repaint();
y=y_pos;
i=0;
shoot=false;
return;
@Override
public void keyPressed(KeyEvent e) {
if(e.getKeyCode()==e.VK_RIGHT) {
x_pos=x_pos+10;
System.out.println("It works seemingly...");
repaint();
if(e.getKeyCode()==e.VK_LEFT) {
x_pos=x_pos-10;
repaint();
if(e.getKeyChar()==' ') {
shoot=true;
repaint();
@Override
public void keyReleased(KeyEvent e) {
// TODO Auto-generated method stub
@Override
public void keyTyped(KeyEvent e) {
// TODO Auto-generated method stub
}Any help would be app appreciated! I really need to get this done in the next hour before I leave for school.Not sure why this happens, but moveLeft and moveRight stay always false, therefore conditions such as
if(moveRight==true & x_pos<465)will always be false.
Edited by: baftos on Mar 27, 2009 7:25 AM -
Cal.Year/ Month - Applet - MM.YYYY and HTML- MMM.YYYY
Hi All.
I have created Webi Report on top of Bex Query.
While running the webi report Cal.Year/ Month Prompts list of vales showing format as MM.YYYY (01.2014) in Applet version.
and running the same report with HTML version, Cal.Year/ Month Prompts list of vales showing different format as MMM.YYYY (Jan.2014).
I have checked at bex Q level Cal.Year/ Month variable have List of values MM.YYYY (01.2014) format.
Cal.Year/ Month - @
Bex Q : MM YYYY
Applet - MM.YYYY
HTML- MMM.YYYY
Need to understand same report Cal.Year/ Month Prompts list of vales showing different format (Applet - MM.YYYY. HTML- MMM.YYYY).
is there any way to fix the issue display same format in the both version.Hi Sateesh,
Thanks for reply.
Are you using Unv /BICS ? BICS
Did you checked both applet and HTML version with the same user ? Yes, Same user
HTML and Applet version report pointed to same BO and BW system ? Yes, Both BO and BW systems are same. (development systems)
In BEx , variable values shows both text and key and when value selected it only show key in the entry field box .- Yes, bex variable and characteristic defined display as KEY.
I have created Cal.Year/ Month Prompts at webi level….while refresh the report. Cal.Year/ Month Prompts list of vales showing different format (Applet -MM.YYYY (01.2014). HTML- MMM.YYYY (Jan.2014)). -
Does anyone know why a very simple applet works correctly with applet viewer, but does not seem to do anything with Internet Explorer 5.0 or FrontPage 2000? Here a simple applet and html that I am using.
//Applet Template
import javax.swing.*; //has .JApplet
import java.awt.Graphics;
public class BrowserTest1 extends JApplet {
public void paint(Graphics g)
g.drawString("This is a test applet", 10,10);
// html file shown below
<HTML>
<HEAD>
<TITLE>
APPLET TEST PAGE
</TITLE>
</HEAD>
<BODY>
<APPLET code="BrowserTest1.class" width=500 height="250">
</APPLET>
Applet should appear above
</BODY>
</HTML>I think questions like yours have been answered to many times. In case you haven't noticed, there is a search button...
As a "quick" hint, you are using a Swing applet. For that kind of applets, there are special speps to follow... -
Help. How do you TAB from HTML component to applet (and back) ?
How can one tab between applets in a browser, and from an applet to an HTML component?
For example, I have the following in my page in decending order:
an HTML text field,
an applet containing two components,
and another HTML text field.
When focus is on the first HTML text field pressing TAB should shift focus to the first component of the applet, the next TAB press shifts focus to the second component of the applet, and the next TAB press shifts focus to the other HTML text field. Then another TAB press cycles back to the first TEXT field.
I can handle the tabbing within the applet using the FocusManager, but how can I get the applet to receive focus on a TAB from the browser, and once the applet has focus, how can I give focus back to the browser when a TAB occurs from my last applet sub-component?
At the moment a user has to click on the applet before he can tab in it, and then click outside it to tab in the html again.
Any help appreciated, as I cant find any reference to how to do this apart from other people asking the same but getting no replies.
Thanks,
MennoI see what you are saying. Either use javascript with LiveConnect or go all applets.
What we are actually doing at the moment is trying to componentise using small applets passing data via InfoBus. So I guess we could use only applets as you suggest. Either with getAppletContext, or we could have a data item on the InfoBus which contains the name of the required in-focus applet, and all applets listen to see if it is their name, and if so request focus.
I'm suprised applets are not tab-able between by default. I would have thought this was a common requirement.
I'll look into LiveConnect as well, and let you know how we get on.
Cheers,
Menno -
Tabbing from applet to applet, HTML component to applet, and back
How can one tab between applets in a browser, and from an applet to an HTML component?
For example, I have the following in my page in decending order:
an HTML text field,
an applet containing two components,
and another HTML text field.
When focus is on the first HTML text field pressing TAB should shift focus to the first component of the applet, the next TAB press shifts focus to the second component of the applet, and the next TAB press shifts focus to the other HTML text field. Then another TAB press cycles back to the first TEXT field.
I can handle the tabbing within the applet using the FocusManager, but how can I get the applet to receive focus on a TAB from the browser, and once the applet has focus, how can give focus back to the browser when a TAB occurs from my last applet sub-component? At the moment a user has to click on the applet before he can tab in it, and then click outside it to tab in the html again.
Any help appreciated, as I cant find any reference to how to do this apart from other people asking the same but getting no replies.
Thanks,
MennoWell, I think it is both a Java & HTML problem.
When you TAB from HTML there must be a way to TAB to the Java applet, and when you TAB from the applet there must be a way, when you are on the last component within the applet, to TAB back to the HTML components.
Anyone know how?
Cheers,
Menno -
Differences between Java Web Start and HTML-Applets???
Hi,
I'm trying to get information about the differences between JWS-Applets and 'normal' HTML-embedded Applets.
Is it possible to develop both simultaneously in one project???
Is there a Programming-documentation that describes the differences between JWS and HTML-Applets???
Thanx!
RembrandCheck out the link shown below:
http://java.sun.com/products/javawebstart/1.2/docs/developersguide.html
All you need really is to create a JNLP file to launch your applet/application.
;o)
V.V. -
HTML 5 Offline App Creation for Product walkwalkthrough Demo
Hi,
Can we create offline App by using HTML 5, CSS, Java Scipt. But this app should be offline controll key.
Please see this link: http://vmwarewalkthroughs.com/VDS/
The folder structure of this page is
config, theme, www and offline index file and preview index.html file.
any content and images related changes has been done in config folder, theme ralated changes has been done in theme folder, www folder is the main template.
Can you please let me know, how it will be built initially, i mean what knowledge should be for this. I have not finding a proper way to built this but this app folder contain html, css, js files.
Thanks,
SusantaAndrewThompson64 wrote:
Out of curiosity. What is it you can do with JS that cannot be done with an applet and an active server (e.g. something that can run PHP, JSP, ASP..)?We require the app to run completely offline (or rather, the client does) (i.e.) no Internet connection. We have tried giving them an install with a portable apache and PHP, which has worked in the past but not for this client. So we were attempting to use HTML 5 for storing data offline, but the lack of support for offline caching in the Java Plug-in is the only thing holding us back, I guess we'll just have to wait for Sun to catch up :) -
Error while calling applet in HTML in SAP NWDS
Hi,
We have written a java code with Main method and we are trying to run it on web. So we have written another piece of HTML code where we are calling the othe program with applet. But getting below error.
Below is exce[ption I am getting while running jree charts made in java :
Java Plug-in 1.6.0_24
Using JRE version 1.6.0_24-b07 Java HotSpot(TM) Client VM
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
java.lang.reflect.InvocationTargetException
at com.sun.deploy.util.DeployAWTUtil.invokeAndWait(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.runOnEDT(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.RuntimeException: java.lang.InstantiationException: org.jfree.chart.demo.BarChartDemo
at sun.plugin2.applet.Plugin2Manager$12.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.lang.InstantiationException: org.jfree.chart.demo.BarChartDemo
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
... 15 more
Exception: java.lang.reflect.InvocationTargetException
Below is html code run to call applets :
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "" title="http://www.w3.org/TR/html4/loose.dtd">" class="link">http://www.w3.org/TR/html4/loose.dtd">
(http://www.w3.org/TR/html4/loose.dtd)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Hello</title>
</head>
<body>
<applet code=org.jfree.chart.demo.BarChartDemo archive="src.jar" width="320" height="120"></applet>
</body>
</html>
Please suggest.
Regards
AgamaniHi,
Though there are a lot of importing parameters, you should give only one structure for outtable, and read as index 1 and index 2.
FORM GET_SPRAS TABLES intable STRUCTURE itcsy
outtable STRUCTURE itcsy.
DATA: lv_kunnr LIKE kna1-kunnr.
CLEAR: GV_SPRAS.
lv_kunnr = intable-value.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
input = lv_kunnr
IMPORTING
output = lv_kunnr.
SELECT SINGLE LAND1 SPRAS INTO (gv_land1, gv_spras) FROM KNA1
WHERE KUNNR = lv_kunnr.
IF sy-subrc = 0.
READ TABLE outtable INDEX 1.
outtable-value = gv_spras.
MODIFY outtable INDEX 1.
READ TABLE outtable INDEX 2.
outtable-value = gv_land1.
MODIFY outtable INDEX 2.
ENDIF.
IF gv_land1 EQ 'DE'.
CLEAR: GV_LAND1,
GV_SPRAS.
ENDIF.
ENDFORM.
Edited by: Srinivas Kalluri on Mar 30, 2009 5:00 AM
Edited by: Srinivas Kalluri on Mar 30, 2009 5:10 AM -
Infobus applet and temporary files
Hi,
I have made an infobus applet and deploy it with the OAS407.
Now I have seen, that each time I load the applet from the
OAS407 the applet create 15 files in my temp-folder with the
prefix jar_cache (for example: jar_cache40989.tmp).
There is no problem with creating but there is a problem with
deleting because there is no mechanism for automatic deleting.
So I have to delete these files manually but I think that this
is unuseable for end-user.
Does anybody know how to bypass this problem ?
Thanks.
Nils
null<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Nils Buering ([email protected]):
I ran into the same problem when I built an applet that uses DAC and runs the app module in the downloaded applet. The Java plugin 1.2.2 is creating these files in TEMP and these files are equal in size to the support jar and zip files downloaded to the browser. You can easily verify this by comparing file sizes (use the Properties facility when you right click a Windows file sname to see its exact size in bytes). The plugin does not delete these files when you exit the browser and thus re-creates them every time you restart the browser and access the applet from the web server potentially filling the user's disk.
SUN has fixed this problem with the 1.3 plugin. Ater downloading and installing the 1.3 plugin, you must edit the applet's HTML file to add two new PARAM options: "cache_option" and "cache_archive". See http://java.sun.com/j2se/1.3/docs/guide/misc/appletcaching.html for instructions (a document titled "Applet caching in Java Plug-in") on doing this. This basically tells the plugin to use its own caching, instead of the browser's and doing this, the jar files created in the user's TEMP directory are deleted when you kill the browser.
However, since Jdeveloper is not certified with Java 2 v1.3, I ran into problems with code that works under the 1.2.2 plugin. The applet no longer runs once its been downloaded: I get a permissions error in jbo.logging.show and jbo.logging.trace; to wit: (java.lang.ExceptionInInitializerError: java.security.AccessControlException: access denied (java.sql.SQLPermission setLog). So switching to the 1.3 plugin will fix the buildup of jar files in TEMP problem; but your applets may no longer work! Best to wait until Jdeveloper is certified with 1.3 then you can run the 1.3 plugin successfully.
Hi,
I have made an infobus applet and deploy it with the OAS407.
Now I have seen, that each time I load the applet from the
OAS407 the applet create 15 files in my temp-folder with the
prefix jar_cache (for example: jar_cache40989.tmp).
There is no problem with creating but there is a problem with
deleting because there is no mechanism for automatic deleting.
So I have to delete these files manually but I think that this
is unuseable for end-user.
Does anybody know how to bypass this problem ?
Thanks.
Nils<HR></BLOCKQUOTE>
null -
PDF output does not refresh data in BI Publisher, XML and HTML do refresh
I just upgraded to BI Publisher 10.1.3.4.0 and I noticed that the PDF format of the reports does not reflect recent changes in data, while XML data and HTML output do reflect changes in data immediately.
I'm using BI Publisher to print APEX applications reports. When I change some data in APEX forms, I click again in the Print button and the data remains unchanged. I made some testing inside Oracle BI Publisher, and noticed that XML data and HTML output do reflect changes, but PDF output remains with the old data for some unknown amount of time. I cannot identify a method to force the PDF to refresh, just un-log and log in again several times until the data appears updated. This is serious because when users change data and print again, they expect the changes to be reflected in the new printable report, and may not notice that the data is the old version.
OS is Oracle Enterprise Linux.
Any help on this will be very welcome.
FranciscoOpen the report in Edit Mode Click on the reports and in the properties section Uncheck the
Enable Document Cache Property and your issue should be resolved. -
IIS, Javascript, Signed Applet and ASP Blank Page Problem
Hi,
I'm having a problem using a Signed Applet in a site that runs in a IIS (Windows Server 2003).
My aspx web page uses the applet to read my smart card and get information from it.
This applet uses an auxiliar dll (stored in a second Signed Jar file) in order to read the information from my smart card.
The way the solution is design:
1) Aspx page is asked from server
2) Internet Explorer recieve the page and asks the server for it content (images, applet, javascripts, etc)
3) After this the JVM runs (console opens)
4) After the Aspx page render fully a javascript register onload fires and call an applet method
5) Applet receive the call and run the logic of the method:
- reads the smart card;
- calls Javascript function in order to fill aspx fields with information from smart card
- calls Javascript function the simulates a click in a botton of aspx page (in order to call server side part sending data readed from smart card to server)
5) The server makes some logic with the information receive and responds to client registering in aspx page a call to another Javascrit function
6) The client received the asnwer from server and runs the Javascript function registered on step 5)
This Javascript calls another method from applet and runs the following logic:
- reads more information from smart card;
- call javascript function in order to fill more fields of aspx page with the information readed
- calls Javascript function the simulates a click in a botton of aspx page (in order to call server side part sending data readed from smart card to server)
7) The server makes some logic and call another pages with no Applets
8) Client asks for a second page with the same applet and we start with another logic express on steps 1);2);3),4);5) and then 7).
This is all ok, until sometimes the server stop responding correcly for requests regarding this two pages with the Applet.
When this happens the server just responds with a blank page.
- with fiddler I can seer the request for the aspx page (that uses the applet)
- but server responds with a blank html page
The JVM doesn't fire.
The IIS log don't show errors.
The eventviewer doesn't show errors.
The problem is solved with an IIS reset or a Application Pool reset.
After a while the problem returns.
This problem occours for other user in another machine, the server just stops responding correcly to request regarding pages with applets, the other pages still continue to work.
If we disable Java Control Panel->Advanced->Java Plug-in->Enable the next-generation Java Plug-in the problem seend to stop, but we can't force all clients to disable this option right?
Or there is a way to force the Applet to run with this option disabled?
As anyone experience similar problem?
Regards,
OFThis is all ok, until sometimes the server stop responding correcly for requests regarding this two pages with the Applet.
When this happens the server just responds with a blank page.
- with fiddler I can seer the request for the aspx page (that uses the applet)
- but server responds with a blank html pageWell, if http requests look identical in case of success and failure (pay attention to cookies, etc) then it has to be something on the server side.
It could be that server gets into this wrong state because of previous requests made by applet but it is hard to tell.
I am not clear how old/new plugin can make a difference unless your applets run in the legacy mode (i.e. you are actually trying to reuse SAME instance of the applet when
it is loaded next time).
I'd start with
1) carefully comparing good/bad sessions
2) checking whether server will serve correct response to another client when it serves "bad" page for current client
3) add debug statements to aspx - it is scripted page, may be some condition is not met and then it returns blank?
4) record all http requests in one session until you get to "error" state and then use any http server testing tool to "replay" this set of requests.
You should be able to get server into the same state without use of applet. Then you can try to tweak set of requests to see what makes a difference. -
I need help with Applets and Multithreading
[hello all. first time poster. big fan of java.]
now to the important matter: Applets and Threads
=======================================
1) I have an applet with that implements the runnable interface, and has one thread (and a simple animation). If I try to view this applet in the applet viewer with JGrasp, it spits an insane error telling me
"java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)"
but, if I run the applet through a web browser, by putting it in an html document, it runs correctly, without error
What on earth is wrong, and how do I fix it?!?
2) I want to put 2 threads in my applet?
If I implement the Runnable interface, I can only have one Run() method in my applet, right?
So how do I define behaviour for 2 threads when I only have one run method in which to define the behaviour? Can I use two threads with the runnable interface, or do I have to make objects of my own defined thread classes?
3) I tried to make 2 threads in my applet by creating my own thread classes, and instantiating them in my applet (instead of implementing the runnable interface).
I still get the same insane error as I mentioned in my first point (which I expected), except now, the applet won't work even when viewed through a web browser!!
Please please help me. I am frustrated beyond belief (at what is probably a very simple problem)
I have searched and searched all over and found no answers on thisIf I try to view this applet in the applet viewer with JGrasp, it spits an insane error telling me
"java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)"Don't know anything about JGrasp, but it runs with pretty tight security - thats what this insane error is all about. Use the appletviewer or a browser.
If I implement the Runnable interface, I can only have one Run() method in my applet, right?Correct
So how do I define behaviour for 2 threads when I only have one run method in which to define the behaviour?
Can I use two threads with the runnable interface, or do I have to make objects of my own defined thread classes?You can create two Runnable implementations (classes) in your applet.
example (missing code)
class MyApplet extends Applet {
void doSomething() {
void doSomethingElse() {
void startThreads() {
Thread t = new Thread(new Runnable() { public void run() { doSomething();}});
t.start();
t = new Thread(new Runnable2());
t.start();
class Runnable2 implements Runnable {
public void run() {
doSomethingElse();
}If the above seems confusing, read up on anonymous and inner classes.
3) I tried to make 2 threads in my applet by creating my own thread classesTry not subclassing thread - this causes a security check -
Security issues with applets and windows Vista when printing to file
Hi, everyone
I am currently developing an application that prints out the result of some calculations.
from a Javascript file, the output finally ends up in a java applet that should print the file in a special printer.
For debugging purposes I have created a File printer that creates a file from the output comming to the printer; this way I can debug what commands the printer is receiving.
This worked well on Windows Xp; Vista always asks for permissions for the applet, and altough I guarantee these permissions, printer is not allowed to create the output file and reports an error writing
after a little research, I have found that java applets have all permissions when certificated as trusted applications; all but file creating permissions
anyone has any idea of how could I fix this problem?
Thanks in advanceHI,
Have you actually signed your applet? If the signers certificate is the trusted key store for Java it should treat your applet as trusted. You can use a self signed certificate for testing as long as the cert is in the trusted key store.
Some links that might help:
[http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/keytool.html]
[http://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/rsa_signing.html]
Cheers,
Shane
Maybe you are looking for
-
Unable to instal Win 8 on iMac with Bootcamp & Win 7. Help please.
Unable to install windows 8 on my imac with boot camp running Win 7. Instal gets reset to windows 7 with error message "unable to instal Win 8"
-
Issue with VTWEG_AUFT field
Dear All, My client had a requirement for inter company scenario to read distribution channel from sales order in intercompany invoice for a particular condition type. To achieve, I had changed the field to VTWEG_AUFT ( dist channel of sales order )
-
Capacity question regarding the 1.77 GB "Other" stuff on my Iphone
I am aware that the "Other" issue has been discussed many times, however as I searched those discussions I couldn't find an answer to my question. I currently have 1.85 GB of free space. If I do a restore to fix the "Other" issue and keep exactly the
-
Printer Driver for Epson Stylus R800 Printer Included with OS X 5 Leopard
How many faulty drivers may there be included with OS X 5 Leopard? After installing OS X 5 Leopard I found that when using my Epson Stylus PHOTO R800 printer photograph prints and ordinary lettering were extremely feint and unusable. From the list of
-
Is it possible to have the 24-hour clock display a leading zero? Such as 09:00 instead of 9:00.