Hi, I'm using Struts and Tiles. Never heard of struts-faces, so...
-----Message d'origine----- De�: Michael Rasmussen [mailto:[EMAIL PROTECTED] Envoy�: jeudi 10 juin 2004 14:32 ��: [EMAIL PROTECTED] Objet�: RE: [bug?] <html:base> tag and mozilla Seb' Are you using struts-faces or just struts? Michael From: Lesaint S�bastien <[EMAIL PROTECTED]> >Reply-To: "Struts Developers List" <[EMAIL PROTECTED]> >To: [EMAIL PROTECTED] >Subject: [bug?] <html:base> tag and mozilla >Date: Thu, 10 Jun 2004 10:32:05 +0200 > > >Hello guys, > >I don't know if this is really a bug, at least it is an issue that I think >you should be aware of (if not already). > >When developing a webApp, I came into a very weird struts logging problem. >After investigation, it appeared that my problem was related to a >particular >behaviour of Mozilla against other browsers (IE and Opera, as far as I >tested). I don't know if this is a Mozilla issue or a <html:base> struts >tag >issue. > >I enclosed a piece of the discussion that occurred on the struts-user >mailing list. The first part describes mozilla's behaviour, then it >describes my code. > >Let me know if this is of any help. > >-- >Seb' > >-----Message d'origine----- >De�: Lesaint S�bastien >Envoy�: lundi 7 juin 2004 20:45 >��: Struts Users Mailing List >Objet�: [SOLVED]RE: odd errors certainly related to Tiles and/or Struts, >occurs o nly with Mozilla > >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] _________________________________________________________________ Watch the online reality show Mixed Messages with a friend and enter to win a trip to NY http://www.msnmessenger-download.click-url.com/go/onm00200497ave/direct/01/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
