Whats that line from Harts War? ...Policy Forbids..

tell us the contents of
/etc/tomcat4/policy.d/04webapps.policy
-OR-
/%TOMCAT_HOME%/conf/catalina.policy

you should see something like..

// The permissions granted to the context WEB-INF/classes directory
// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-"
{
// };

enable the grant and add in the path of the folder you wish to access..

HTH,
Martin-
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Tuesday, February 01, 2005 2:23 PM
Subject: Re: general Thread disscussion


>
> >To be honest, I've only heard this in the past few days.  I didn't know
that, generically, writing files was "forbidden" by J2EE.  I knew it was
something you generally want to avoid from a webapp for other reasons, but
it's news to me too :)  So no, I don't have any reference I can point you
to.  I'd be interested in such a reference myself!
> >
> >
> >
> [...]
> Ok i will inform you, when i found a reference.
> [...]
>
> >Just want to be sure I follow... Do you mean a case where you have a
class along these lines:
> >
> >public class myData {
> >  public static HashMap data = new HashMap();
> >}
> >
> >... and you might be reading and/or writing from this during the course
of processing a reqeust AS WELL AS from a background thread?  If that's the
question, the answer is you need to be very careful.  You can synchronize
all access to the HashMap, but then you are introducing a bottleneck into
the system at best, and a potential deadlock or any one of the other
multitude of thread contention issues that confuse the hell out of most of
us when they crop up!
> >
> >If your static information is read-only, you have no issue of course.  I
do this in that application I was talking about... I have a class almost
identical to what you see above except that the HashMap is private and I
have a getter/setter pair.  It's never altered during the run of the
application though, after startup anyway, so no problem.  If it could be
altered though, that would change matters.
> >
> >
> [...]
> Thats excectly what i want. An altered ressource during the run. So i
> have to find another solution for this case.
>
>
> ---------------------------------------------------------------------
> 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]

Reply via email to