You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Susan Hoddinott <su...@hexworx.com> on 2003/06/09 12:48:35 UTC
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 Hoddinott
http://www.hexworx.com
Re: Accessing data files via APPLET tags in JSP pages
Posted by Susan Hoddinott <sh...@dodo.com.au>.
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" <ma...@broadpark.no>
To: "Tomcat Users List" <to...@jakarta.apache.org>
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: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Accessing data files via APPLET tags in JSP pages
Posted by Susan Hoddinott <sh...@dodo.com.au>.
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" <ma...@broadpark.no>
To: "Tomcat Users List" <to...@jakarta.apache.org>
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: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Accessing data files via APPLET tags in JSP pages
Posted by Magne Skjeret <ma...@broadpark.no>.
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: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org