WebSphere Application Server - Included JSP file is being rendered "as is" without being translated & c

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Application Server > April 2006 > Included JSP file is being rendered "as is" without being translated & c





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Included JSP file is being rendered "as is" without being translated & c

2006-04-27, 8:08 am

Hi,

When I include a file "header.jspf" (appended below) in "BankList.jsp" using
<jsp:directive.include file="header.jspf" />
WAS Express 6.0.2.5 translates its code as shown below. Clearly it is simply including the content of included jsp page without translating it. The result is, I get the content of included jsp page as it is on the rendered page. While Other App Servers pr
operly translates it & then includes it in translated Java file.

Using <jsp:include page="header.jspf" /> doesn't help either.

Please help me get some insight on this issue.

Thanks & regards

header.jspf
---------------
<?xml version="1.0" encoding="UTF-8"?>
<div style="font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px;-rave-layout: grid; width: 100%; height: 49px"
xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://www.sun.com/web/ui">
<f:subview id="header">
<ui:image binding="#{_header.image1}" width="93" height="43" id="image1" style="left: 0px; top: 0px; position: absolute" url="resources/images/ACM.GIF"/>
<ui:image binding="#{_header.image2}" width="147" height="57" id="image2" style="left: 840px; top: 0px; position: absolute" url="resources/images/AcadiaLogo.GIF" />
<!-- menu script itself. you should not modify this file -->
<script language="JavaScript" src="resources/jslib/menu.js"></script>
<!-- items structure. menu hierarchy and links are stored there -->
<script language="JavaScript" src="resources/jslib/menu_items.js"></script>
<!-- files with geometry and styles structures -->
<script language="JavaScript" src="resources/jslib/menu_tpl.js"></script>
<script language="JavaScript">
<!--//
// Note where menu initialization block is located in HTML document.
// Don't try to position menu locating menu initialization block in
// some table cell or other HTML element. Always put it before </body>

// each menu gets two parameters (see demo files)
// 1. items structure
// 2. geometry structure

new menu (SWAP_MENU_ITEMS, SWAP_MENU_POS);
new menu (REFERENCE_MENU_ITEMS, REFERENCE_MENU_POS);
new menu (REPORT_MENU_ITEMS, REPORT_MENU_POS);
new menu (IMPEXP_MENU_ITEMS, IMPEXP_MENU_POS);
new menu (ADMIN_MENU_ITEMS, ADMIN_MENU_POS);
new menu (MENU_BAR_ITEM, MENU_BAR_POS);

// make sure files containing definitions for these variables are linked to the document
// if you got some javascript error like "MENU_POS is not defined", then you've made syntax
// error in menu_tpl.js file or that file isn't linked properly.

// also take a look at stylesheets loaded in header in order to set styles
//-->
</script>
</f:subview>
<ui:label binding="#{_header.label1}" id="label1"/>
</div>
========================================
========================================

Translated output generated by Websphere App Server Express 6.0.2.5
--------------------------------------------------------------------
private final static char[] _jsp_string1 = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<div style=\"font-family: Verdana,Arial,Helvetica,sans-serif; font-size: 11px;-rave-layout: grid; width: 100%; height: 49px\&q
uot;\r\n xmlns:f=\"http://java.sun.com/jsf/core\" xmlns:h=\"http://java.sun.com/jsf/html\" xmlns:ui=\"http://www.sun.com/web/ui\">\r\n <f:subview id=\"header\">\r\n <ui:image binding=\"
#{_header.image1}\" width=\"93\" height=\"43\" id=\"image1\" style=\"left: 0px; top: 0px; position: absolute\" url=\"resources/images/ACM.GIF\"/>\r\n <ui:image binding=\"#{_header.im
age2}\" width=\"147\" height=\"57\" id=\"image2\" style=\"left: 840px; top: 0px; position: absolute\" url=\"resources/images/AcadiaLogo.GIF\" />\r\n ".toCharArray();
private final static char[] _jsp_string2 = "<!-- menu script itself. you should not modify this file -->".toCharArray();
private final static char[] _jsp_string3 = "\r\n <script language=\"JavaScript\" src=\"resources/jslib/menu.js\"></script>\r\n ".toCharArray();
private final static char[] _jsp_string4 = "<!-- items structure. menu hierarchy and links are stored there -->".toCharArray();
private final static char[] _jsp_string5 = "\r\n <script language=\"JavaScript\" src=\"resources/jslib/menu_items.js\"></script>\r\n ".toCharArray();
private final static char[] _jsp_string6 = "<!-- files with geometry and styles structures -->".toCharArray();
private final static char[] _jsp_string7 = "\r\n <script language=\"JavaScript\" src=\"resources/jslib/menu_tpl.js\"></script>\r\n <script language=\"JavaScript\">\r\n
".toCharArray();
private final static char[] _jsp_string8 = "<!--//\r\n // Note where menu initialization block is located in HTML document.\r\n // Don't try to position menu locating menu initialization block in\r\n // some tabl
e cell or other HTML element. Always put it before ".toCharArray();
private final static char[] _jsp_string9 = "</body>\r\n\r\n // each menu gets two parameters (see demo files)\r\n // 1. items structure\r\n // 2. geometry structure\r\n\r\n new menu (SWAP_MENU_ITEMS,
SWAP_MENU_POS);\r\n new menu (REFERENCE_MENU_ITEMS, REFERENCE_MENU_POS);\r\n new menu (REPORT_MENU_ITEMS, REPORT_MENU_POS);\r\n new menu (IMPEXP_MENU_ITEMS, IMPEXP_MENU_POS);\r\n new menu (ADMIN_MENU_ITEMS, ADMI
N_MENU_POS);\r\n new menu (MENU_BAR_ITEM, MENU_BAR_POS);\r\n\r\n // make sure files containing definitions for these variables are linked to the document\r\n // if you got some javascript error like \"MENU_POS is not
defined\", then you've made syntax\r\n // error in menu_tpl.js file or that file isn't linked properly.\r\n\r\n // also take a look at stylesheets loaded in header in order to set styles\r\n //-->\r\n\t</script&
gt;\r\n </f:subview>\r\n <ui:label binding=\"#{_header.label1}\" id=\"label1\"/>\r\n</div>\r\n".toCharArray();



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com