Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TilesServlet not found.

 
Edisandro Bessa
Ranch Hand
Posts: 584
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

My application uses JSF 1.1 and I would like to use Tiles without having to use struts.

Many tutorials on the web tell that I can use Tiles without struts by using the org.apache.struts.tiles.TilesServlet class.

However, after configure my web.xml file to use such class as described on these tutorials, I got a big fat ClassNotFoundException error.

After some google I could see that some people who have been using Struts 1.1 and then upgraded to latest versions also faced the same problem.

Does anyone know whether this class has been deprecated or even banned from the latest struts implementations ?

Where I can find this class ? Is there at least another alternative way to use Tiles in my JSF application without having to use struts ?

Here's my web.xml file

<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet>
<servlet-name>TilesServet</servlet-name>
<servlet-class>org.apache.struts.tiles.TilesServlet</servlet-class>
<init-param>
<param-name>definitions-config</param-name>
<param-value>/WEB-INF/tiles-definitions-clf.xml,/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>
<init-param>
<param-name>definitions-debug</param-name>
<param-value>2</param-value>
</init-param>

<load-on-startup>2</load-on-startup>
</servlet>

The error is:

org.apache.struts.tiles.TilesServlet
java.lang.ClassNotFoundException: org.apache.struts.tiles.TilesServlet

Thanks in Advance.
Edisandro.
[ April 01, 2007: Message edited by: Edisandro Bessa ]
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How you use JSF and tiles together depends on the implementation of JSF that you're using. If you're using MyFaces, this link explains how to to it, and it does not involve defining a servlet. If you are using some other implementation of JSF, see if you can find a document detailing specifically how to do it for your implementation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic