MYoung wrote:
>
> Firefox wants to download the file instead of showing the page.
> http://www.nabble.com/file/p15641885/no-go-xhtml.jpg
>
> IE7 cannot even download the file.
>
The mime type Wicket returns to the browser is text/<THE MARKUP TYPE>. In
your case it's text/xhtml which is not correct. Instead, one should use
application/xhtml+xml or text/html. The problem is that IE doesn't support
XHTML at all, so you have to use text/html and let all browsers treat the
response as html, not xhtml.
Wicket could be enhanced to differentiate between the template file
extension and the mime type.
For your case, try below as a workaround (or simply name your files
as *.html):
public class MyPage extends WebPage {
public String getMarkupType() {
return "xhtml";
}
protected void configureResponse() {
super.configureResponse();
getResponse().setContentType("text/html");
}
}
-----
--
Kent Tong
Wicket tutorials freely available at http://www.agileskills2.org/EWDW
Axis2 tutorials freely available at http://www.agileskills2.org/DWSAA
--
View this message in context:
http://www.nabble.com/Howto-use-.xhtml-instead-of-.html-for-template-file-extension-tp15641885p15660676.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]