aspose file tools
The moose likes Struts and the fly likes tiles definition problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "tiles definition problem " Watch "tiles definition problem " New topic
Author

tiles definition problem

Jigar Gajjar
Greenhorn

Joined: Apr 24, 2010
Posts: 5
Hi,

i am developing sample application in struts 1.2
i am facing problem in implementing tiles plugins, i am not able to load page when i use tiles definition in jsp file or in xml file


my mainLayoutFile is as under:

<%@ taglib uri="/struts-html" prefix="h"%>
<%@ taglib uri="/struts-tiles" prefix="t"%>
<html>
<head>
<script>
alert('s');
</script>

<title><t:getAsString name="title" ignore="true" /></title>
</head>
<body background="/Pariwar/images/MainScreen.jpg">

<table align="center" width="100%">
<tr>
<td align="center">
<t:insert attribute="header" >
<t:put name="title" beanName="title" beanScope="tile"></t:put>
</t:insert></td>
</tr>
<tr>
<td><t:insert attribute="content" /></td>
</tr>
<tr>
<td><t:insert attribute="footer" /></td>
</tr>
</table>
</body>
</html>


my layoutdefintion file is as under


<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>

<logic:notPresent name="siteLayoutDef" scope="application" >
<tiles:definition id="siteLayoutDef" page="/pages/layout/pariwarLayout.jsp" scope="application">
<tiles:put name="footer" value="/pages/layouts/footer.jsp"/>
<tiles:put name="content" value="/pages/login/home.jsp"/>
</tiles:definition>
</logic:notPresent>


and page where i am using this layout is as under


<%@ taglib uri="/struts-tiles" prefix="tiles"%>

<jsp:include page="/pages/layouts/siteLayoutDefinition.jsp" />
<tiles:insert beanName="siteLayoutDef" beanScope="application">
<tiles:put name="content" value="/pages/mypages/blogs/myBlogList.jsp" />
</tiles:insert>

my problem is when i access above page it gives nothing but just blank page


can anyone please point out that whats going wrong in above files, please do tell me if you need more information to dig out something for above code


very very thank full to all supporters

Jigar Gajjar
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please UseCodeTags when posting code or configuration. Unformatted code and configuration is unnecessarily difficult to read.

Tiles has a habit of swallowing exceptions--make sure the log level is set to DEBUG level, and check the logs. The tiles definition files would be helpful. I'm assuming you're configuring the plugin correctly?
Jigar Gajjar
Greenhorn

Joined: Apr 24, 2010
Posts: 5
Hi thanks for your reply,
i am new to struts framwork, and would you please tell me how to set log level?
can you guide to set the log level in struts?

i am using jsp definition and not xml definotion according to the book that i read i dont need to configure plugin in struts-config neither tiles-def.xml, do i still need to configure tiles in struts-confi.xml?

Jigar Gajjar
Greenhorn

Joined: Apr 24, 2010
Posts: 5
Hi , some more information, i could debug log and i am getting following messages in log

[DEBUG] RequestProcessor - processForwardConfig(ForwardConfig[name=success,path=/pages/login/home.jsp,redirect=false,contextRelative=false,module=null])
[DEBUG] InsertTag - insert page='/pages/layout/pariwarLayout.jsp'.

after this i get blank page
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tiles definition problem
 
Similar Threads
Page is displayed blank for Login Application
Struts error
Struts with Tiles--- simple program but not working
Struts tiles help
Tiles winding me up.