Accessing data files via APPLET tags in JSP pages
Hello, I am restricted in that my web hoster does not have an installed graphics environment (therefore any attempts to draw graphics offscreen in a servlet results in a null pointer from getLocalGraphicsEnvironment). In order to bypass this problem I have attempted to replace my servlet with an applet and I call this via an APPLET HTML tag in a JSP. It works fine except for the fact that any attempt to read a data file on the server seems instead to be interpreted as an attempt to read the file in a directory of the same name on the client, despite passing in such parameters as request.getRealPath(/) and request.getServletPath(). It also seems to use the JVM in any plug-in on the client machine rather than my preferred JVM environment on the server. Has anyone encountered these problems and found a way around them? Regards,Susan Hoddinotthttp://www.hexworx.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing data files via APPLET tags in JSP pages
man, 09.06.2003 kl. 12.48 skrev Susan Hoddinott: Hello, I am restricted in that my web hoster does not have an installed graphics environment (therefore any attempts to draw graphics offscreen in a servlet results in a null pointer from getLocalGraphicsEnvironment). In order to bypass this problem I have attempted to replace my servlet with an applet and I call this via an APPLET HTML tag in a JSP. It works fine except for the fact that any attempt to read a data file on the server seems instead to be interpreted as an attempt to read the file in a directory of the same name on the client, despite passing in such parameters as request.getRealPath(/) and request.getServletPath(). It also seems to use the JVM in any plug-in on the client machine rather than my preferred JVM environment on the server. Has anyone encountered these problems and found a way around them? An applet is running on the client machine, not on the server. If the server is using java1.4 you can set the server to be headless, making it possible to create images and such on a server without a graphichs environment. -Djava.awt.headless=true on the startup script will make it run headless. I hope this can help. Magne Skjeret Regards, Susan Hoddinott http://www.hexworx.com __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing data files via APPLET tags in JSP pages
Thanks, I'll try that. The component toolkit methods and awt toolkit stuff were all looking for X11 and there did not seem to be anything else as you are probably aware. It does seems strange to me that the APPLETS will read sound and graphics files on the server but not a simple data file. Regards, Susan Hoddinott http://www.hexworx.com - Original Message - From: Magne Skjeret [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 09, 2003 9:30 PM Subject: Re: Accessing data files via APPLET tags in JSP pages man, 09.06.2003 kl. 12.48 skrev Susan Hoddinott: Hello, I am restricted in that my web hoster does not have an installed graphics environment (therefore any attempts to draw graphics offscreen in a servlet results in a null pointer from getLocalGraphicsEnvironment). In order to bypass this problem I have attempted to replace my servlet with an applet and I call this via an APPLET HTML tag in a JSP. It works fine except for the fact that any attempt to read a data file on the server seems instead to be interpreted as an attempt to read the file in a directory of the same name on the client, despite passing in such parameters as request.getRealPath(/) and request.getServletPath(). It also seems to use the JVM in any plug-in on the client machine rather than my preferred JVM environment on the server. Has anyone encountered these problems and found a way around them? An applet is running on the client machine, not on the server. If the server is using java1.4 you can set the server to be headless, making it possible to create images and such on a server without a graphichs environment. -Djava.awt.headless=true on the startup script will make it run headless. I hope this can help. Magne Skjeret Regards, Susan Hoddinott http://www.hexworx.com __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Accessing data files via APPLET tags in JSP pages
On this same subject, I was wondering if there is any way of forcing an APPLET to access a server file, e.g. via socket connection, etc.? Regards, Susan Hoddinott http://www.hexworx.com - Original Message - From: Magne Skjeret [EMAIL PROTECTED] To: Tomcat Users List [EMAIL PROTECTED] Sent: Monday, June 09, 2003 9:30 PM Subject: Re: Accessing data files via APPLET tags in JSP pages man, 09.06.2003 kl. 12.48 skrev Susan Hoddinott: Hello, I am restricted in that my web hoster does not have an installed graphics environment (therefore any attempts to draw graphics offscreen in a servlet results in a null pointer from getLocalGraphicsEnvironment). In order to bypass this problem I have attempted to replace my servlet with an applet and I call this via an APPLET HTML tag in a JSP. It works fine except for the fact that any attempt to read a data file on the server seems instead to be interpreted as an attempt to read the file in a directory of the same name on the client, despite passing in such parameters as request.getRealPath(/) and request.getServletPath(). It also seems to use the JVM in any plug-in on the client machine rather than my preferred JVM environment on the server. Has anyone encountered these problems and found a way around them? An applet is running on the client machine, not on the server. If the server is using java1.4 you can set the server to be headless, making it possible to create images and such on a server without a graphichs environment. -Djava.awt.headless=true on the startup script will make it run headless. I hope this can help. Magne Skjeret Regards, Susan Hoddinott http://www.hexworx.com __ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]