Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

tiles definition problem  RSS feed

 
Jigar Gajjar
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!