Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2007

Tip: Looking for answers? Try searching our database.

Tiles w/o Stuts problem.

Thread view: 
ToddP - 30 Nov 2007 18:12 GMT
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>
ToddP - 30 Nov 2007 18:14 GMT
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>
ToddP - 30 Nov 2007 18:17 GMT
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>
-->


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.