Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

please help struts hibernate ---tiles framework is not working please help

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
new bie here
hi i am making a project on online bookstore using struts and hibernate using myeclipse i used tiles definition but its not imported in my jsp
in struts config
please help me this is not working

=============================================================
<struts-config>
<data-sources />
<form-beans>
<form-bean name="bookForm"
type="org.apache.struts.action.DynaActionForm">
<form-property name="search" type="java.lang.String" />
<form-property name="searchtype" type="java.lang.String" />
<form-property name="searchresult" type="java.util.List"></form-property>
</form-bean>
<form-bean name="adminForm"
type="org.apache.struts.action.DynaActionForm">
<form-property name="uname" type="java.lang.String" />
<form-property name="pass" type="java.lang.String" />

</form-bean>
<form-bean name="adminDeleteForm"
type="org.apache.struts.action.DynaActionForm">
<form-property name="isbnno" type="java.lang.String" />

</form-bean>
</form-beans>
<global-exceptions />
<global-forwards>

</global-forwards>
<action-mappings>
<action path="/adminlogin" forward="/adminlogin.jsp"></action>
<action path="/adminoperation" name="adminForm"
type="com.yourcompany.struts.action.adminaction.AdminAction"
input="/adminlogin.jsp" scope="request">
<forward name="adminCRUD" path="/adminCRUD.jsp" />
<forward name="adminlogin" path="/adminlogin.jsp" />
</action>


<action path="/adminInsertUpdate" forward="/adminInsertUpdate.jsp"></action>
<action path="/adminDelete" forward="/adminDelete.jsp"></action>


<action attribute="bookForm" name="bookForm" path="/book"
input="/start.jsp" scope="session"
type="com.yourcompany.struts.action.BookAction">
<forward name="booksearch" path="/booksearch.jsp" />
<forward name="start" path="/start.jsp" />
</action>
<action
attribute="adminDeleteForm"
input="/adminDelete.jsp"
name="adminDeleteForm"
path="/delete"
type="com.yourcompany.struts.action.DeleteAction">
<forward name="adminCRUD" path="/adminCRUD.jsp" />
</action>


<!-- <forward name="sendtoadmin" path="/sendit.do" />-->




</action-mappings>

<message-resources
parameter="com.yourcompany.struts.ApplicationResources" />

<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
<set-property property="moduleAware" value="true" />
<set-property property="definitions-parser-validate" value="true" />
</plug-in>
=====================================================
tiles-defs.xml
well i just put the necessary code
<definition name="main.layout" path="/mainlayout.jsp">

<put name="header" value="/header.jsp" />

<put name="footer" value="/footer.jsp" />

</definition>
<definition name="start.page" extends="main.layout">
<put name="title" value="default page" />
<put name="body" value="/start.jsp" />
</definition>
<definition name="booksearch.page" extends="main.layout">
<put name="title" value="book result page" />
<put name="body" value="/booksearch.jsp" />
</definition>
================================================
start.jsp


<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*"%>

<%@ page import="com.yourcompany.ghj.*"%>
<%@ page import="java.util.List"%>
<jsp:directive.page import="com.yourcompany.bookModel.BookSearch" />

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
prefix="bean"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html"
prefix="html"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic"
prefix="logic"%>

<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
prefix="tiles"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-template"
prefix="template"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested"
prefix="nested"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html locale="true">
<head>
<html:base />

<title>start.jsp</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->

</head>

<body>
<table>
<tr>

<html:form action="book.do" > 
<html:select property="searchtype">
<html:option value="select">select</html:option>
<html:option value="titlebook">title</html:option>
<html:option value="authorbook">author</html:option>
<html:option value="publisherbook">publisher</html:option>
</html:select>
<html:text property="search"></html:text>
<html:submit>search</html:submit>
</html:form>
<td>
<html:link action="/adminlogin">admin</html:link>
</td>
</tr>
</table>



</body>

</html:html>
======================================================
in xml i put this as the index file
<welcome-file-list>
<welcome-file>start.jsp</welcome-file>
</welcome-file-list>

there are header and footer which i used but i think there is problem of path or name please help me
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please use the "code" tags so the XML/JSP/etc. is readable.

It's unclear to me what the problem is--you're not using any tiles tags in your JSP nor referring to any tiles definitions in your struts-config file, so I'm not sure what you're expecting to happen.
 
We've gotta get close enough to that helmet to pull the choke on it's engine and flood his mind! Or, we could just read this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic