It appears that the blank web application that comes with Struts
requires the application init-param to find the
ApplicationResources.properties (it was working with 1.1 beta 1 without
it), but is missing it in the nightly build. So, here are the changes
that are required to get the blank webapp to work "out of the box". Can
someone please commit these changes so it won't cause others headaches
for 1.1 beta 2 and those using the nightly builds?
1. Add an init-param in the web.xml:
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
2. Edit ApplicationResources.properties to use welcome.* rather than
index.*:
welcome.title=Struts Blank Application
welcome.heading=Welcome!
welcome.message=To get started on your own application, copy the
struts-blank.war to a new WAR file using the name for your application.
Place it in your container's "webapp" folder (or equivalent), and let
your container auto-deploy the application. Edit the skeleton
configuration files as needed, restart your container, and you are on
your way! (You can find the application.properties file with this
message in the /WEB-INF/src/java/resources folder.)
3. Edit the tiles-defs.xml to have at least one definition or edit the
DTD (min of 1 definition for it to be a valid doc):
<definition name=".mainLayout"
path="/common/layouts/classicLayout.jsp">
<put name="title" value="Sample Page Title" />
<put name="header" value="/common/header.jsp" />
<put name="menu" value=".mainMenu" />
<put name="footer" value="/common/footer.jsp" />
<put name="body" value=".portal.body" />
</definition>
Thanks!
James
> -----Original Message-----
> From: James Higginbotham
> Sent: Tuesday, August 13, 2002 12:17 PM
> To: [EMAIL PROTECTED]
> Subject: Struts 1.1, Tiles, and blank webapp
>
>
> Hello all,
>
> I've been using Struts 1.02 for some time, and started
> looking at Struts 1.1 and Tiles for our next pass of our
> application. I'm using JBoss 3.0.0 + Tomcat/Catalina 4.0.3,
> and have been trying to deploy the sample applications that
> some with Struts. After attempting to use 1.1 beta 1 from the
> website, I'm seeing tiles work but the welcome page from
> struts cannot find ApplicationResources.properties, or struts
> works (properties file is found) but tiles won't work. I then
> tried upgrading to the most recent tiles lib from their web
> page, and that throws errors about abstract methods not being
> implemented when trying to use the tiles plugin. So, I have
> also tried the nightly build from last night (0813) and
> noticed that tiles is not part of the struts jar. When I try
> to deploy the blank example again (which seems to have some
> Tiles configuration setup), it fails with an XML validation
> exception. This was fixed by removed the comments around all
> the definitions (the DTD must require at least one and CVS
> has a tiles-def.xml with no defs in it!). I now get errors
> with the welcome.title resource not being found (again), but
> the war deploys without error otherwise.
>
> Any help would be appreciated as to why the default blank
> application isn't working from the CVS head, and why using
> the blank tiles application from the contrib dir of 1.1 beta
> 1 fails miserably as well..
>
>
> Thanks,
> James
>
> Here is a listing of my war file - the tiles-defs.xml has
> uncommented definitions, everything else is what comes from
> the nightly build src archive for the blank webapp):
>
> 0 Tue Aug 13 12:04:14 CDT 2002 META-INF/
> 58 Tue Aug 13 12:04:14 CDT 2002 META-INF/MANIFEST.MF
> 0 Tue Aug 13 11:45:38 CDT 2002 pages/
> 0 Tue Aug 13 11:57:02 CDT 2002 WEB-INF/
> 0 Tue Aug 13 12:04:02 CDT 2002 WEB-INF/classes/
> 0 Tue Aug 13 11:45:38 CDT 2002 WEB-INF/src/
> 0 Tue Aug 13 11:45:38 CDT 2002 WEB-INF/src/java/
> 0 Tue Aug 13 11:45:38 CDT 2002 WEB-INF/src/java/resources/
> 267 Tue Aug 13 02:51:36 CDT 2002 index.jsp
> 634 Tue Aug 13 02:51:36 CDT 2002 pages/Welcome.jsp
> 1451 Tue Aug 13 02:51:36 CDT 2002
> WEB-INF/classes/ApplicationResources.properties
> 3553 Tue Aug 13 02:51:36 CDT 2002 WEB-INF/src/build.xml
> 1451 Tue Aug 13 02:51:36 CDT 2002
> WEB-INF/src/java/resources/application.properties
> 6228 Tue Aug 13 02:51:36 CDT 2002 WEB-INF/struts-config.xml
> 1270 Tue Aug 13 11:54:34 CDT 2002 WEB-INF/tiles-defs.xml
> 1195 Tue Aug 13 02:51:36 CDT 2002 WEB-INF/validation.xml
> 1435 Tue Aug 13 02:51:36 CDT 2002 WEB-INF/validator.xml
> 1958 Tue Aug 13 11:59:54 CDT 2002 WEB-INF/web.xml
> 0 Tue Aug 13 12:04:14 CDT 2002 WEB-INF/lib/
> 81046 Tue Aug 13 02:52:00 CDT 2002
> WEB-INF/lib/commons-beanutils.jar 146663 Tue Aug 13 02:52:00
> CDT 2002 WEB-INF/lib/commons-collections.jar
> 62998 Tue Aug 13 02:52:00 CDT 2002
> WEB-INF/lib/commons-dbcp.jar 93664 Tue Aug 13 02:52:00 CDT
> 2002 WEB-INF/lib/commons-digester.jar 14411 Tue Aug 13
> 02:52:00 CDT 2002 WEB-INF/lib/commons-fileupload.jar
> 28153 Tue Aug 13 02:52:00 CDT 2002
> WEB-INF/lib/commons-lang.jar 24858 Tue Aug 13 02:52:00 CDT
> 2002 WEB-INF/lib/commons-logging.jar 28930 Tue Aug 13
> 02:52:00 CDT 2002 WEB-INF/lib/commons-pool.jar 28517 Tue Aug
> 13 02:52:00 CDT 2002 WEB-INF/lib/commons-resources.jar 22133
> Tue Aug 13 02:52:00 CDT 2002 WEB-INF/lib/commons-services.jar
> 28752 Tue Aug 13 02:52:00 CDT 2002
> WEB-INF/lib/commons-validator.jar 65368 Tue Aug 13 02:52:00
> CDT 2002 WEB-INF/lib/jakarta-oro.jar
> 6727 Tue Aug 13 02:52:00 CDT 2002
> WEB-INF/lib/jdbc2_0-stdext.jar 458362 Tue Aug 13 02:52:00 CDT
> 2002 WEB-INF/lib/struts.jar
> 8481 Tue Aug 13 02:52:00 CDT 2002 WEB-INF/struts-bean.tld
> 18339 Tue Aug 13 02:52:00 CDT 2002
> WEB-INF/struts-config_1_0.dtd 33526 Tue Aug 13 02:52:00 CDT
> 2002 WEB-INF/struts-config_1_1.dtd 62003 Tue Aug 13 02:52:00
> CDT 2002 WEB-INF/struts-html.tld 13871 Tue Aug 13 02:52:00
> CDT 2002 WEB-INF/struts-logic.tld 61676 Tue Aug 13 02:52:00
> CDT 2002 WEB-INF/struts-nested.tld
> 1562 Tue Aug 13 02:52:00 CDT 2002 WEB-INF/struts-template.tld
> 7524 Tue Aug 13 02:52:00 CDT 2002 WEB-INF/struts-tiles.tld
> 1591 Tue Aug 13 02:52:00 CDT 2002 WEB-INF/tiles-config.dtd
> 8111 Tue Aug 13 02:52:00 CDT 2002
> WEB-INF/validation_1_1.dtd 33480 Tue Aug 13 02:52:00 CDT
> 2002 WEB-INF/validator-rules.xml
> 8818 Tue Aug 13 02:52:00 CDT 2002
> WEB-INF/validator-rules_1_1.dtd 15429 Tue Aug 13 02:52:00
> CDT 2002 WEB-INF/web-app_2_2.dtd 32560 Tue Aug 13 02:52:00
> CDT 2002 WEB-INF/web-app_2_3.dtd
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>