Tiles w/o Stuts problem.

T

ToddP

I'm trying to implement Tiles ( from Struts 1.3 ) into a web that is
NOT using Struts. I've found and followed instruction on doing this
and the docs I've found don't seem to work. The latest docs I've been
able to find to do this, BTW, are for 1.1.

The problem I'm having is that tiles isn't finding my tiles-defs.xml
file. At least that is what I assume this error means:

javax.servlet.jsp.JspException: Can't get definitions factory from
context.
at
org.apache.struts.tiles.taglib.InsertTag.processDefinitionName(Ljava.lang.String;)Lorg.apache.struts.tiles.taglib.InsertTag
$TagHandler;(Unknown Source)
at
org.apache.struts.tiles.taglib.InsertTag.createTagHandler()Lorg.apache.struts.tiles.taglib.InsertTag
$TagHandler;(Unknown Source)
at org.apache.struts.tiles.taglib.InsertTag.doStartTag()I(Unknown
Source)

How do I configure my app to see the tiles-defs.xml? I've tried each
of the following entries (both the context-param and the servlet
entries) in my web.xml file (see code snippet below).

Note: Using the servlet definition ( Tiles Servlet ) failed because
TilesServlet doesn't seem to be exist since Struts 1.1.

Can anyone please point me in the correct direction?
TIA

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app>
<context-param> <param-name>
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG </
param-name> <param-value> /WEB-INF/tiles-defs.xml,/org/apache/
tiles/classpath-defs.xml </param-value> </context-param>
<!-- Uncommented and tried - did not work - TilesServlet doesn't
exist in any of the Struts jars --> <!-- servlet> <servlet-
name>Tiles Servlet</servlet-name> <servlet-
class>org.apache.struts.tiles.TilesServlet</servlet-class>
<init-param> <param-name>definitions-config</param-
name> <param-value>/WEB-INF/tiles-defs.xml</param-
value> </init-param> <init-param> <param-
name>definitions-parser-validate</param-name> <param-
value>true</param-value> </init-param> <load-on-
startup>2</load-on-startup> </servlet --> </web-
app>
 
T

ToddP

Let me try the code snippet again:

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

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

<context-param>
<param-name>
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
</param-name>
<param-value>
/WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml
</param-value>
</context-param>

<!-- servlet>
<servlet-name>Tiles Servlet</servlet-name>
<servlet-class>org.apache.struts.tiles.TilesServlet</servlet-
class>
<init-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/tiles-defs.xml</param-value>
</init-param>
<init-param>
<param-name>definitions-parser-validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet -->


</web-app>
 
T

ToddP

Can't get the code snippet to show. Let me try a third time:

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

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>

<context-param>
<param-name>
org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG
</param-name>
<param-value>
/WEB-INF/tiles-defs.xml,/org/apache/tiles/classpath-defs.xml
</param-value>
</context-param>

<!-- servlet>
<servlet-name>Tiles Servlet</servlet-name>
<servlet-class>org.apache.struts.tiles.TilesServlet</servlet-
class>
<init-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/tiles-defs.xml</param-value>
</init-param>
<init-param>
<param-name>definitions-parser-validate</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet -->


</web-app>
-->
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top