On Wed, 12 Nov 2008 09:09:01 +0100
<[EMAIL PROTECTED]> wrote:

> I am not sure if this works and it is probably not a nice solution, but maybe 
> you can do something like
> 
> BoOcorrenciaPolicial bo = (BoOcorrenciaPolicial)
>               unmarshaller.unmarshal(new File(XML_DIR + id + ".xml"));
> 
> Class clazz = bo.getClass();
> Field field = clazz.getDeclaredField("hist");
> field.setAccessible(true);
> 
> String hist = bo.getHist();
> 
> Like that you would at least not have to change the fields from protected to 
> public.

Hm, I'm not sure I liked that solution so much. I was having some other
trouble with loading of classes and then I decided to add the following
to my catalina.policy:

grant {
    permission java.security.AllPermission;
    ...
};

After that I didn't even have to rename the fields to public or
anything. Though I think I have just given permission to my webapp to
do whatever it pleases. That doesn't seem very safe, so I would
appreciate if someone knows a more specific permission for my case.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to