You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Bertrand VENZAL <be...@cirso.fr> on 2005/10/04 18:32:04 UTC

Applet in WEB-INF/src ....

Hi All,

I try to make running an applet in a vm, but I can't find the file .class 
if I put the applet in the repertory WEB-INF. However if I put the applet 
in the root (.), he works correctly. It is the same thing for libraries.

This is the code I m using in the template ...

<applet code="applet.GraphApplet.class" codebase="WEB-INF" 
        width="640" height="480" archive=
"lib/jfreechart-0.9.21.jar,lib/jcommon-0.9.6.jar">
        <param name="jour" value="$ctx_appletNbConnex">
        <param name="numMois" value="8">
        <param name="nbConnex" value="$ctx_appletJour">
        <param name="maxConnex" value="3">
</applet>

So do you know why there is a limitation for the file under the repertory 
WEB-INF ? or maybe it is completely an other thing ? 

I hope this is clear because I m not at the moment ....

Thanks 
Bertrand

Re: Applet in WEB-INF/src ....

Posted by Aaron Evans <aa...@yahoo.ca>.
Bertrand VENZAL <bertrand.venzal <at> cirso.fr> writes:

> 
> Hi All,
> 
> I try to make running an applet in a vm, but I can't find the file .class 
> if I put the applet in the repertory WEB-INF. However if I put the applet 
> in the root (.), he works correctly. It is the same thing for libraries.
> 
> This is the code I m using in the template ...
> 
> <applet code="applet.GraphApplet.class" codebase="WEB-INF" 
>         width="640" height="480" archive=
> "lib/jfreechart-0.9.21.jar,lib/jcommon-0.9.6.jar">
>         <param name="jour" value="$ctx_appletNbConnex">
>         <param name="numMois" value="8">
>         <param name="nbConnex" value="$ctx_appletJour">
>         <param name="maxConnex" value="3">
> </applet>
> 
> So do you know why there is a limitation for the file under the repertory 
> WEB-INF ? or maybe it is completely an other thing ? 
> 

I don't use applets much, but I think your applet tag gets output to the 
browser and it is up to the browser to download the class file.  This is 
exactly how images, css files, javascript files and so on work.  

Anything within WEB-INF is considered protected content and cannot be 
downloaded directly from a browser.  If it were not so, then anyone could 
pull down application configuration files, class files etc and steal db 
passwords, sensitive config data and reverse compile the class files.

You can use a server-side include to include jsp/vm/html resources stored 
under WEB-INF into a given template, but you can't have the browser download
them directly from that directory.  You can create a directory under the
root called "applets" and use "applets" for the codebase parameter.







---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org