struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alistair Cairns" <acai...@companieshouse.gov.uk>
Subject NEWBIE: Getting Tiles to work with web logic 7
Date Wed, 09 Oct 2002 19:55:18 GMT
Hi 

I am new to using struts and have been getting up to speed on it over the last few days. 

I have a number of actions, action forms, and the validator up and running fine in a simple
web app. 

I then tried to plug in tiles. 

my struts-config.xml has the following: 

<plug-in className="org.apache.struts.tiles.TilesPlugin" >
  		 <set-property property="definitions-config" value="/WEB-INF/tiles-defs.xml" />
         <set-property property="definitions-debug" value="2" />
         <set-property property="definitions-parser-details" value="2" />
         <set-property property="definitions-parser-validate" value="true" />
 </plug-in>

My tiles-defs.xml has the following

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Tiles Configuration 1.1//EN"
          "http://jakarta.apache.org/struts/dtds/tiles-config.dtd">

<tiles-definitions>
	<definition name="logon" path="/layouts/layout.jsp">
		<put name="header" value="/common/header.jsp"/>
       	<put name="header" value="/common/footer.jsp"/>
       	<put name="header" value="/security/logon1.jsp"/>
    </definition>
</tiles-definitions>

And my layout.jsp look like: 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles" %>

<html>
<body>

<tiles:insert attribute="header"/>

<tiles:insert attribute="body"/>

<tiles:insert attribute="footer"/>

</body>
</html>


The header, footer, login1.jsp's referred to in the logon definition are trivial


When i deploy my web app and start web logic running I get the following exception: 

[INFO] PropertyMessageResources - -Initializing, config='org.apache.struts.actio
n.ActionResources', returnNull=true
[INFO] PropertyMessageResources - -Initializing, config='uk.gov.ch.chips.web.res
ources.ApplicationResources', returnNull=true
[INFO] ValidatorPlugIn - -Loading validation rules file from '/WEB-INF/validator
-rules.xml'
[INFO] ValidatorPlugIn - -Loading validation rules file from '/WEB-INF/validatio
n.xml'
<09-Oct-02 20:44:49 BST> <Error> <HTTP> <101216> <Servlet: "mycorp"
failed to pre
load on startup in webapp: "mycorp"
javax.servlet.ServletException: uk.mycorp.web.common.MyCorpRequestProcessor

        at org.apache.struts.tiles.TilesPlugin.initRequestProcessorClass(TilesPl
ugin.java:281)
        at org.apache.struts.tiles.TilesPlugin.init(TilesPlugin.java:130)
        at org.apache.struts.action.ActionServlet.initApplicationPlugIns(ActionS
ervlet.java:991)
        at org.apache.struts.action.ActionServlet.init(ActionServlet.java:458)
        at javax.servlet.GenericServlet.init(GenericServlet.java:258)
        at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubIm
pl.java:792)...............................

MyCorpRequestProcessor is our own request processor which extends the struts request processor.
It is just a placeholder
and does not overide any methods. 

What is puzzling me is that when I remove the tiles plug in, my app works fine. As soon as
I put the tiles plug in 
back into struts-config.xml, weblogic tthrows this exception when it starts up my web app.
Am I missing something simple? 
(e.g. as far as I understand the documentation trail, I don't have to use TilesRequestProcessor
anymore). 

It was all going so smoothly as well till this point :)

Thanks in advance for anyone's help. 

Alistair




--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message