Thanks for the quick reply. Please see my comments inline.
[EMAIL PROTECTED] wrote:
Ah, right on the money. After explicitly setting the content type to text/html all is fine. Thanks.Joel, Answers inline.Joel Rosi-Schwartz <[EMAIL PROTECTED]> wrote ..Hi, I am building a site with Sitemesh and Webwork and I am having two problems that I would appreciate assistance with. We have adopted doing all of our JSP development using the XML compliant syntax rather than the older JSP propriatary syntax. Both problems I have relate to this. For the record I am using Sitemesh 1.5, Webwork 1.2.1 and I am running on JBoss 3.2 with Tomcat 4.1.12 embedded. These are running on RH Linux 7.3 with Java 1.4.1. The first problem, is that when I do a very simple JSP page using the xml syntax with a page as such: <?xml version="1.0" encoding="UTF-8"?> <jsp:root version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page" > <html> <head> <title>User registration</title> </head> <body> </body> </html> </jsp:root> the page shows but there is no Sitemesh wrapping present. If I substitute plain HTML or JSP propriatary syntax into the same jsp file, then Sitemesh wraps the page just fine. My understading was that Sitemesh did not care how the page content was produced, so this behaviour is very surprising to me.At the moment decorators in sitemesh.xml or decorators.xml only decorate content of type text/html. Is it likely that the content you produce is of text/xml ?
Are you saying that my analysis is correct or are you saying that I need to test if the templates are the cause of the problem?The second problem is more basic. Is it even possible to use the Webwork taglibs in jps that uses the xml syntax? So far my testing has indicated that this does not work and my guess is that it is because the taglibs use templates that spew out the old style JSP. So in the end I am trying to mix oil and water. Is this accuarate? If so, would translating the templates resolve the issue or are there more fundamental changes that would have to be applied to the taglib library itself?There should be no problems if you substitute the templates for your own. It should be very simple to test however.
Sure:Can I ask why you are going with the new syntax?
- if one already works with XML on a regular basis it is a lot easier to read and write
- being plain old XML we can use all of our xml tools and processing on the web pages
- I believe that it will eventually be the standard and the old syntax will die away or at lease become deprecated. But seeing how this is the web that may take longer than I care to worry about ;-)
- it is, in our opinion, more elegant and aesthetically pleasing
- stay with Webwork and give up the preference
- do the extra work to modify all of the templates
- go back to using Struts
Cheerio,
Joel
Cheers, Scott- joel