Hello all, I finally found out where this problem came from when I check the access log of the server.
As you could see in the code snippets, I use the <html:base> tag in the header of the jsp file I use as the view component (pageModelTest.jsp). The resulting HTML tag is "http://www.myserver.com/webApp/layout/defaultPageModel.jsp". What Mozilla does and other browser don't is requesting the page "http://www.myserver.com/webApp/layout/defaultPageModel.jsp", IE for example only request "http://www.myserver.com/webApp/layout/". I don't know exactly why browsers send a request to URI defined in the base tag, but the result is that the server processes the page in the case of Mozilla, causing errors in the tiles tags. Tiles tags in the defaultPageModel.jsp page are all using the "name" attribute, therefore awaiting a value to do the include. Because of the direct request on the defaultPageModel.jsp page, there isn't even a component context, causing uncaught exceptions (null pointer exceptions because of the missing context or "org.apache.jasper.JasperException: Error - tag.getAsString : component context is not defined"). So, I'm quite happy I found where the problem came from, but I still need to solve it. My questions are then the followings: - In general, is the HTML <base> tag really useful ? Required for the <html:link> and <html:url> tags maybe ? - If the <html:base> tag is necessary, how can I force Struts to write "http://www.myserver.com/webApp/layout/" instead of "http://www.myserver.com/webApp/layout/defaultPageModel.jsp", solving my mozilla problem ? Hope this message can help some people and that I could get some answer about the base tag. -- Seb' -----Message d'origine----- De : Lesaint Sébastien Envoyé : lundi 7 juin 2004 18:06 À : Struts Users Mailing List Objet : RE: odd errors certainly related to Tiles and/or Struts, occurs o nly with Mozilla Thanks for your answer, but it doesn't make sense. I tried it though, it doesn't work :) I can't call http://www.myserver.com/webApp/login.do anymore if I use it. -----Message d'origine----- De : Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED] Envoyé : lundi 7 juin 2004 17:04 À : Struts Users Mailing List Objet : Re: odd errors certainly related to Tiles and/or Struts, occurs o nly with Mozilla Lesaint Sébastien wrote: >Hi, > >A little more information. > >My investigation lead me to the conclusion that this error is somehow >related to Tiles includes. > >When requesting the page with mozilla, I noticed there is a delay between >the time the text is visible and the time the browser stop loading and the >error is logged on the server. It might not be relevant though... > >I reproduced the bug with the minimum code. >------------------------------------ >I'm using a Struts action forwarding to a Tiles def, my struts-config has >the following code : ><action forward="tilesDef.pageModel.test" path="/login" /> > try <action forward="/login" path="tilesDef.pageModel.test"/> Wolfgang > >------------------------------------ >The Tiles def is as follow in the Tiles-def.xml file : ><definition name="tilesDef.pageModel.test" path="/layout/pageModelTest.jsp"> > <put name="pageFooter" value="/footer.jsp" /> ></definition> > >------------------------------------ >The pageModelTest.jsp page : ><%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %> ><%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %> > ><html:html> ><head> > <html:base /> ></head> ><body topmargin="0" leftmargin="0" bgcolor="#FFFFFF"> > > ><table border="0" cellspacing="0" cellpadding="0"> ><tr> > <td><tiles:insert attribute="pageFooter" flush="true" /></td> > <td width="1"><img src="" width="1" height="1"></td> ></tr> ></table> > ></body> ></html:html> >------------------------------------ > >Note : the bug does not appear when pageModelTest.jsp does not contain the ><tiles:insert> tag. > >------------------------------------ >The footer.jsp page : ><br><br> ><center><i>Copyright my company</i></center> > >Note : the bug does not appear when I directly request footer.jsp. > > >I'm completely clueless on the subject now... :( > >Please help, > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]