Re: Wrong Content Type text/plain
hello, we had a similar problem and we solved it by using Tiles servlet instead of Tiles listener. Cheers, Teemu Torsten Römer wrote: I added Tiles to the struts2-blank-2.0.6 example webapp and started to work on my application. All works just fine on my Linux/Tomcat 5.5 development box but when I deploy the app to the provider's Linux/Tomcat 5.5 webspace the content type is suddenly text/plain instead of text/html and all I see is the HTML source. The funny thing is, that when an action is executed through s:action namespace=/test name=home executeResult=true/s:action the content type is text/html and the page displays correctly, but when the same action is executed through s:url action= Home the above described problem occurs. Setting something like %@ page language=java contentType=text/html; charset=ISO-8859-1 % in the Tiles template and even the subpages seems to be ignored. Calling a JSP directly works fine. -- View this message in context: http://www.nabble.com/Wrong-Content-Type-text-plain-tf3559135.html#a9954129 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wrong Content Type text/plain
Thanks Teemu, You provided the hint that solved the problem! Because I was too lazy to check how to use the Tiles servlet I tried to use org.apache.tiles.listener.TilesListener instead of org.apache.struts2.tiles.StrutsTilesListener and already like that it works. However the documentation states that The latter [StrutsTilesListener] provides tighter integration with Struts features such as freemarker integration. so I wonder if this applies to the Tiles servlet as well and if it would be better to use it instead of the TilesListener? Torsten Teemu Tapper wrote: hello, we had a similar problem and we solved it by using Tiles servlet instead of Tiles listener. Cheers, Teemu Torsten Römer wrote: I added Tiles to the struts2-blank-2.0.6 example webapp and started to work on my application. All works just fine on my Linux/Tomcat 5.5 development box but when I deploy the app to the provider's Linux/Tomcat 5.5 webspace the content type is suddenly text/plain instead of text/html and all I see is the HTML source. The funny thing is, that when an action is executed through s:action namespace=/test name=home executeResult=true/s:action the content type is text/html and the page displays correctly, but when the same action is executed through s:url action= Home the above described problem occurs. Setting something like %@ page language=java contentType=text/html; charset=ISO-8859-1 % in the Tiles template and even the subpages seems to be ignored. Calling a JSP directly works fine. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wrong Content Type text/plain
2007/4/12, Torsten Römer [EMAIL PROTECTED]: However the documentation states that The latter [StrutsTilesListener] provides tighter integration with Struts features such as freemarker integration. so I wonder if this applies to the Tiles servlet as well and if it would be better to use it instead of the TilesListener? I think that this problem is solved in the Tiles SVN repository. The problem is that Struts 2 depends on a buggy version of Tiles 2 (yuk!). Do not try to replace a new build of Tiles 2 since it won't work, so maybe you have to wait until Tiles 2 is released and the integration with Struts 2 stabilizes. Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wrong Content Type text/plain
Antonio Petrelli wrote: 2007/4/12, Torsten Römer [EMAIL PROTECTED]: However the documentation states that The latter [StrutsTilesListener] provides tighter integration with Struts features such as freemarker integration. so I wonder if this applies to the Tiles servlet as well and if it would be better to use it instead of the TilesListener? I think that this problem is solved in the Tiles SVN repository. The problem is that Struts 2 depends on a buggy version of Tiles 2 (yuk!). Do not try to replace a new build of Tiles 2 since it won't work, so maybe you have to wait until Tiles 2 is released and the integration with Struts 2 stabilizes. I'll gladly wait. I'm already happy that it works now, and I am glad I tried Struts2 after making two minor webapps with JSF/MyFaces/Tomahawk/Tiles - maybe a cumbersome combination, but I think Tiles is just too cool not to use it - because I feel much more comfortable with Struts2; it seems much more intuitive, the documentation is much better and the links to the example webapps actually work. I consider some good Getting Started docs and a working example app very important, as I think many beginners will give up in frustration when they haven't got anything to work after an hour or so... Sorry for being off-topic but I just felt like showing some appreciation for Struts2 :-) Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Wrong Content Type text/plain
2007/4/12, Torsten Römer [EMAIL PROTECTED]: Antonio Petrelli wrote: I'll gladly wait. I'm already happy that it works now, and I am glad I tried Struts2 after making two minor webapps with JSF/MyFaces/Tomahawk/Tiles - maybe a cumbersome combination It seems that you did not try Shale (including JSF, and MyFaces) and Tiles 2, or did you simply forget it? :-) Antonio - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Wrong Content Type text/plain
I added Tiles to the struts2-blank-2.0.6 example webapp and started to work on my application. All works just fine on my Linux/Tomcat 5.5 development box but when I deploy the app to the provider's Linux/Tomcat 5.5 webspace the content type is suddenly text/plain instead of text/html and all I see is the HTML source. The funny thing is, that when an action is executed through s:action namespace=/test name=home executeResult=true/s:action the content type is text/html and the page displays correctly, but when the same action is executed through a href=s:url action=home/Home/a the above described problem occurs. Setting something like %@ page language=java contentType=text/html; charset=ISO-8859-1 % in the Tiles template and even the subpages seems to be ignored. Calling a JSP directly works fine. There is a Struts1 + Tiles webapp running just fine on the same webspace. I spent some hours googling but I could not find any solution. Does anyone have an idea what is going on and what might be the difference between my development machine and the provider's server could cause this problem? Torsten - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]