Re: Struts Templates Example in VAJ 3.5.3/WTE - Problem
Cedric, Jon, Downloaded a more recent version of Struts (30 June 2001), added flush='true', to template:get statements and Voila !,that does solve the template rendering problem, Thanks, Martin
Re: Struts Templates Example in VAJ 3.5.3/WTE - Problem
Cedric, very briefly tried adding flush="true" to alltemplate:get ... tags,resulted inthe following error:org.apache.jasper.JasperException: Attribute flush invalid according to the specified TLD. Jon, the browser used is IE5.5, there weren't any exceptions to the console. I've attached part of the source for the generated html, hopefully this will provide some clues, seems the template isbeing rendered at the bottom of the page minus the content. . . . .htmlheadtitleTemplates/titlelink rel="stylesheet"href="http://localhost:8080/jsptemplates/css/templates.css" charset="ISO-8859-1" type="text/css"/headbody background='http://localhost:8080/jsptemplates/graphics/blueAndWhiteBackground.gif' table tr valign='top' td/td tdtable trtd/td/tr trtd/td/tr trtd/td/tr /table /td /tr /table/body/html
Re: Struts Templates Example in VAJ 3.5.3/WTE - Problem
Cedric, very briefly tried adding flush="true" to alltemplate:get ... tags,resulted inthe following error:org.apache.jasper.JasperException: Attribute flush invalid according to the specified TLD. Jon, the browser used is IE5.5, there weren't any exceptions to the console. I've attached the source for the generated html, hopefully this will provide some clues, seems the template isbeing rendered at the bottom of the page minus the content. font size='5'a name=topTopics/a/fontp table width='145' trtda href='http://localhost:8080/jsptemplates/jsp/introduction.jsp' Introduction /a/td/tr trtda href='http://localhost:8080/jsptemplates/jsp/using.jsp' Using Templates /a/td/tr trtda href='http://localhost:8080/jsptemplates/jsp/optional.jsp' Optional Content /a/td/tr trtda href='http://localhost:8080/jsptemplates/jsp/more.jsp' ... and more .../a/td/tr /table/p table tr tdimg src='http://localhost:8080/jsptemplates/graphics/java.gif'//td tdimg src='http://localhost:8080/jsptemplates/graphics/templates.gif'//td /tr /tablehr p class=ParagraphiThis example application is based on a href=http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb_p.html;Using JSP templates to encapsulate Webpage layout and encourage modular design/a by David Geary. Follow that link for the full article, which also covers using role-based and nested templates. The template classes described in the Java World article were the basis for those included with Struts 1.0./i/p h3 class=ChapTitleIntroduction/h3 p class=ParagraphWindow toolkits typically provide a layout mechanism that positions widgets in a container; for example, AWT and Swing have layout managers, whereas VisualWorks Smalltalk has wrappers./p p class=ParagraphBecause layout undergoes many changes over the course of development, it's important to encapsulate that functionality so layout can be modified with minimal impact to the rest of the application. In fact, layout managers are an example of one of the tenets of object-oriented design: encapsulate the concept that varies, which is also a fundamental theme for many design patterns./p p class=ParagraphJSP does not provide direct support for encapsulating layout, so web pages with identical formats usually replicate layout code; for example, bA Web Page Layout/b shows a web page containing sections for a header, footer, sidebar, and main content./p p class=ParagraphThe layout of the page shown in bA Web Page Layout/b is implemented with HTML table tags, as listed in Including Content./p pimg src=http://localhost:8080/jsptemplates/graphics/templates-1.gif;/p h4 class=CodeCaptionIncluding Content/h4 p class=Example-Code lt;htmllt;headlt;titleTemplateslt;/titlelt;/headbr lt;body background='http://localhost:8080/jsptemplates/graphics/blueAndWhiteBackground.gif'/p p class=Example-Code lt;table width='610'br lt;tr valign='top'lt;tdlt;jsp:include page='sidebar.jsp'/lt;/tdbr lt;tdlt;tablebr lt;trlt;tdlt;jsp:include page='header.html'/lt;/tdlt;/trbr lt;trlt;tdlt;jsp:include page='chapter.jsp'/lt;/tdlt;/trbr lt;trlt;tdlt;jsp:include page='footer.jsp'/lt;/tdlt;/trbr lt;/tablebr lt;/tdbr lt;/trnbsp;br lt;/tablebr lt;/bodylt;/html/p p class=ParagraphIn Including Content, content is included with lt;jsp:include which allows content to vary without modifying HTML; however, because the layout is hardcoded, layout changes require modifications to the page. If a website has many pages with identical formats, even simple layout changes require modifications to all of the pages./p h4 class=ChapTitleUsing A Template/h4 br p class=Example-Code lt;%@ taglib URI='/WEB-INF/struts-template.tld' prefix='template' %/p p class=Example-Code lt;template:insert template='/chapterTemplate.jsp'br lt;template:put name='title' content='Templates' direct='true'/br lt;template:put name='header' content='/header.html'/br lt;template:put name='sidebar' content='/sidebar.jsp'/br lt;template:put name='content' content='/introduction.html'/br lt;template:put name='footer' content='/footer.html'/br lt;/template:insert/p p class=ParagraphTo minimize the impact of layout changes, a mechanism is needed for dynamically including layout in addition to content. That way, both layout and content can be changed without modifying files that use them. For large websites that have many pages with identical formats, such a mechanism is valuable because it localizes changes to layout. That mechanism is JSP templates./p hrp align=righta href='#top'font size=1TOP/font/a/p html head titleTemplates/title link rel=stylesheet href=http://localhost:8080/jsptemplates/css/templates.css; charset=ISO-8859-1 type=text/css /head body background='http://localhost:8080/jsptemplates/graphics/blueAndWhiteBackground.gif' table tr valign='top' td/td tdtable trtd/td/tr trtd/td/tr trtd/td/tr /table /td
Re: Struts Templates Example in VAJ 3.5.3/WTE - Problem
This same error happens in iPlanet Application Server 6.0 SP2. I haven't found a workaround yet, and it's supposedly a flaw (bug) in the app server's JSP container. Matt --- Martin [EMAIL PROTECTED] wrote: Cedric, very briefly tried adding flush=true to all template:get ... tags, resulted in the following error: org.apache.jasper.JasperException: Attribute flush invalid according to the specified TLD. Jon, the browser used is IE5.5, there weren't any exceptions to the console. I've attached the source for the generated html, hopefully this will provide some clues, seems the template is being rendered at the bottom of the page minus the content. font size='5'a name=topTopics/a/fontp table width='145' trtda href='http://localhost:8080/jsptemplates/jsp/introduction.jsp' Introduction /a/td/tr trtda href='http://localhost:8080/jsptemplates/jsp/using.jsp' Using Templates /a/td/tr trtda href='http://localhost:8080/jsptemplates/jsp/optional.jsp' Optional Content /a/td/tr trtda href='http://localhost:8080/jsptemplates/jsp/more.jsp' ... and more .../a/td/tr /table/p table tr tdimg src='http://localhost:8080/jsptemplates/graphics/java.gif'//td tdimg src='http://localhost:8080/jsptemplates/graphics/templates.gif'//td /tr /tablehr p class=ParagraphiThis example application is based on a href=http://www.javaworld.com/javaworld/jw-09-2000/jw-0915-jspweb_p.html;Using JSP templates to encapsulate Webpage layout and encourage modular design/a by David Geary. Follow that link for the full article, which also covers using role-based and nested templates. The template classes described in the Java World article were the basis for those included with Struts 1.0./i/p h3 class=ChapTitleIntroduction/h3 p class=ParagraphWindow toolkits typically provide a layout mechanism that positions widgets in a container; for example, AWT and Swing have layout managers, whereas VisualWorks Smalltalk has wrappers./p p class=ParagraphBecause layout undergoes many changes over the course of development, it's important to encapsulate that functionality so layout can be modified with minimal impact to the rest of the application. In fact, layout managers are an example of one of the tenets of object-oriented design: encapsulate the concept that varies, which is also a fundamental theme for many design patterns./p p class=ParagraphJSP does not provide direct support for encapsulating layout, so web pages with identical formats usually replicate layout code; for example, bA Web Page Layout/b shows a web page containing sections for a header, footer, sidebar, and main content./p p class=ParagraphThe layout of the page shown in bA Web Page Layout/b is implemented with HTML table tags, as listed in Including Content./p pimg src=http://localhost:8080/jsptemplates/graphics/templates-1.gif;/p h4 class=CodeCaptionIncluding Content/h4 p class=Example-Code lt;htmllt;headlt;titleTemplateslt;/titlelt;/headbr lt;body background='http://localhost:8080/jsptemplates/graphics/blueAndWhiteBackground.gif'/p p class=Example-Code lt;table width='610'br lt;tr valign='top'lt;tdlt;jsp:include page='sidebar.jsp'/lt;/tdbr lt;tdlt;tablebr lt;trlt;tdlt;jsp:include page='header.html'/lt;/tdlt;/trbr lt;trlt;tdlt;jsp:include page='chapter.jsp'/lt;/tdlt;/trbr lt;trlt;tdlt;jsp:include page='footer.jsp'/lt;/tdlt;/trbr lt;/tablebr lt;/tdbr lt;/trnbsp;br lt;/tablebr lt;/bodylt;/html/p p class=ParagraphIn Including Content, content is included with lt;jsp:include which allows content to vary without modifying HTML; however, because the layout is hardcoded, layout changes require modifications to the page. If a website has many pages with identical formats, even simple layout changes require modifications to all of the pages./p h4 class=ChapTitleUsing A Template/h4 br p class=Example-Code lt;%@ taglib URI='/WEB-INF/struts-template.tld' prefix='template' %/p p class=Example-Code lt;template:insert template='/chapterTemplate.jsp'br lt;template:put name='title' content='Templates' direct='true'/br lt;template:put name='header' content='/header.html'/br lt;template:put name='sidebar' content='/sidebar.jsp'/br lt;template:put name='content' content='/introduction.html'/br lt;template:put name='footer' content='/footer.html'/br lt;/template:insert/p p class=ParagraphTo minimize the impact of layout changes, a mechanism is needed for dynamically including layout in addition to content. That way, both layout and content can be changed without modifying files that use them. For large websites that have many pages with identical formats, such a mechanism is valuable because it localizes changes to layout. That mechanism is JSP templates./p hrp align=righta href='#top'font size=1TOP/font/a/p html head titleTemplates/title link rel=stylesheet
RE: Struts Templates Example in VAJ 3.5.3/WTE - Problem
Hi Martin, Did you get to the bottom of this? Which browser are you using? Are any exceptions thrown to your console? It seems strange as I have had templates working fine in the WTE. Jon. -Original Message- From: Martin [mailto:[EMAIL PROTECTED]] Sent: 01 July 2001 21:04 To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Struts Templates Example in VAJ 3.5.3/WTE - Problem I have installed the Struts Templates example into VAJ 3.5.3/WTE environment. Have all the required pages and links working, the problem is that the page is not rendered as per the template. The Header, content and footer show up after the Sidebar and start at the left of the page and overlap the bottom of the Sidebar. A sample is attached. Would appreciate feeback on this porblem. Thanks
Struts Templates Example in VAJ 3.5.3/WTE - Problem
I have installed the Struts Templates example into VAJ 3.5.3/WTE environment. Have all the required pages and links working, the problem is that the page is not rendered as per the template. The Header, content and footer show up after the Sidebar and start at the left of the page and overlap the bottom of the Sidebar. A sample is attached. Would appreciate feeback on this porblem. Thanks Title: Templates Topics Introduction Using Templates Optional Content ... and more ... This example application is based on Using JSP templates to encapsulate Webpage layout and encourage modular design by David Geary. Follow that link for the full article, which also covers using role-based and nested templates. The template classes described in the Java World article were the basis for those included with Struts 1.0. Introduction Window toolkits typically provide a layout mechanism that positions widgets in a container; for example, AWT and Swing have layout managers, whereas VisualWorks Smalltalk has wrappers. Because layout undergoes many changes over the course of development, it's important to encapsulate that functionality so layout can be modified with minimal impact to the rest of the application. In fact, layout managers are an example of one of the tenets of object-oriented design: encapsulate the concept that varies, which is also a fundamental theme for many design patterns. JSP does not provide direct support for encapsulating layout, so web pages with identical formats usually replicate layout code; for example, A Web Page Layout shows a web page containing sections for a header, footer, sidebar, and main content. The layout of the page shown in A Web Page Layout is implemented with HTML table tags, as listed in Including Content. Including Content htmlheadtitleTemplates/title/headbody background='http://localhost:8080/jsptemplates/graphics/blueAndWhiteBackground.gif' table width='610'tr valign='top'tdjsp:include page='sidebar.jsp'//tdtdtabletrtdjsp:include page='header.html'//td/trtrtdjsp:include page='chapter.jsp'//td/trtrtdjsp:include page='footer.jsp'//td/tr/table/td/tr/table/body/html In Including Content, content is included with jsp:include which allows content to vary without modifying HTML; however, because the layout is hardcoded, layout changes require modifications to the page. If a website has many pages with identical formats, even simple layout changes require modifications to all of the pages. Using A Template %@ taglib URI='/WEB-INF/struts-template.tld' prefix='template' % template:insert template='/chapterTemplate.jsp'template:put name='title' content='Templates' direct='true'/template:put name='header' content='/header.html'/template:put name='sidebar' content='/sidebar.jsp'/template:put name='content' content='/introduction.html'/template:put name='footer' content='/footer.html'//template:insert To minimize the impact of layout changes, a mechanism is needed for dynamically including layout in addition to content. That way, both layout and content can be changed without modifying files that use them. For large websites that have many pages with identical formats, such a mechanism is valuable because it localizes changes to layout. That mechanism is JSP templates. TOP