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 Mikko Wuokko <mi...@evtek.fi> on 2007/03/07 13:07:27 UTC

No Base tag messes DocumentBuilder in an applet

Hi.

I'm  been now a for a while trying to figure out what has happened to 
kill WikiWiazrd applet in our JSPWiki portlet around on month ago.

Now I've debugged and tracked, and finally isolated the problem but 
still cannot make out any reason why its happening. Ok so this is what 
I've got:

At revision jetspeed 509630 it works fine.

At revision jetspeed > 509631 it fails:

- DocumentBuilderFactory inside the WikiWizard failes to get instance()
   This is caused by the decision method to get the instance for trying 
to get the instance class name out of the html(!?) of the current 
jetspeed page. It reads the first line (DOCTYPE) and fill fail of 
course. If you remove the DOCTYPE line, the first line will then be "" 
and that will then make the instance locator to use fallbackclass and 
the WikiWizard works.

- Only the header.vm files are changed. The difference is the absence of 
base tag.

Do you have any idea why this is happening? Why does the base tag in the 
source code of the html where the applet is affect in the 
DocumentBuilderFactory.newInstance() call? I'm not really familiar with 
this thing..

I am very puzzled..

Thanks,

Mikko

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


Re: No Base tag messes DocumentBuilder in an applet

Posted by Mikko Wuokko <mi...@evtek.fi>.
Hi.

Just to note that I got this one working now and some tips for others 
who might be using applets in their portles. It would seem that the 
codobase attribute (or parameter in IE) in the applet-tag does the 
trick. I believe this is only needed when the applet uses somekind of 
classloading or external resources of anykind (like properties files). 
Otherwise it will try to load the classess and resources by using the 
jetspeed context and classloaders, which will fail of course.

So, it works now..

Regards,

-Mikko

Mikko Wuokko wrote:
> Hi.
> 
> I'm  been now a for a while trying to figure out what has happened to 
> kill WikiWiazrd applet in our JSPWiki portlet around on month ago.
> 
> Now I've debugged and tracked, and finally isolated the problem but 
> still cannot make out any reason why its happening. Ok so this is what 
> I've got:
> 
> At revision jetspeed 509630 it works fine.
> 
> At revision jetspeed > 509631 it fails:
> 
> - DocumentBuilderFactory inside the WikiWizard failes to get instance()
>   This is caused by the decision method to get the instance for trying 
> to get the instance class name out of the html(!?) of the current 
> jetspeed page. It reads the first line (DOCTYPE) and fill fail of 
> course. If you remove the DOCTYPE line, the first line will then be "" 
> and that will then make the instance locator to use fallbackclass and 
> the WikiWizard works.
> 
> - Only the header.vm files are changed. The difference is the absence of 
> base tag.
> 
> Do you have any idea why this is happening? Why does the base tag in the 
> source code of the html where the applet is affect in the 
> DocumentBuilderFactory.newInstance() call? I'm not really familiar with 
> this thing..
> 
> I am very puzzled..
> 
> Thanks,
> 
> Mikko
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 

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