File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes please help struts hibernate ---tiles framework is not working please help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "please help struts hibernate ---tiles framework is not working please help" Watch "please help struts hibernate ---tiles framework is not working please help" New topic

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

shan rast

Joined: Jan 25, 2009
Posts: 7
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

<data-sources />
<form-bean name="bookForm"
<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 name="adminForm"
<form-property name="uname" type="java.lang.String" />
<form-property name="pass" type="java.lang.String" />

<form-bean name="adminDeleteForm"
<form-property name="isbnno" type="java.lang.String" />

<global-exceptions />

<action path="/adminlogin" forward="/adminlogin.jsp"></action>
<action path="/adminoperation" name="adminForm"
input="/adminlogin.jsp" scope="request">
<forward name="adminCRUD" path="/adminCRUD.jsp" />
<forward name="adminlogin" path="/adminlogin.jsp" />

<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"
<forward name="booksearch" path="/booksearch.jsp" />
<forward name="start" path="/start.jsp" />
<forward name="adminCRUD" path="/adminCRUD.jsp" />

<!-- <forward name="sendtoadmin" path="/" />-->


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" />
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 name="" extends="main.layout">
<put name="title" value="default page" />
<put name="body" value="/start.jsp" />
<definition name="" extends="main.layout">
<put name="title" value="book result page" />
<put name="body" value="/booksearch.jsp" />

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

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

<%@ taglib uri=""
<%@ taglib uri=""
<%@ taglib uri=""

<%@ taglib uri=""
<%@ taglib uri=""
<%@ taglib uri=""
<%@ taglib prefix="c" uri=""%>

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


<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">



<html:form action="" > 
<html:select property="searchtype">
<htmlption value="select">select</htmlption>
<htmlption value="titlebook">title</htmlption>
<htmlption value="authorbook">author</htmlption>
<htmlption value="publisherbook">publisher</htmlption>
<html:text property="search"></html:text>
<html:link action="/adminlogin">admin</html:link>


in xml i put this as the index file

there are header and footer which i used but i think there is problem of path or name please help me
David Newton

Joined: Sep 29, 2008
Posts: 12617

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.
I agree. Here's the link:
subject: please help struts hibernate ---tiles framework is not working please help
Similar Threads
how do i use html:select to forward to different pages?
DynaValidatorActionForm not working
Struts with Tiles--- simple program but not working
Cannot Retrieve Definition for Form Bean Null
Problem while running a project using tiles in netbeans