ArticlesTutorialsInterview Questions & AnswersCertificationsFree Books & Sample ChaptersTechnical Discussions  Your Account | Advertise with us | Feedback |
Few pages of this site are under construction and we are constantly trying to improve it. If you have any suggestions or ideas about how to improve the site, please Let us know.
A first look at Shale Framework - Get started with Shale

A first look at Shale Framework
Get started with Shale    -by Anand ,DevelopersBook.com, 06/02/2007

page  2 of 5

Setting Up

Configure /WEB-INF/web.xml Resource

The next step is to create our helloworld/WEB-INF/web.xml descriptor file for our hello world web application. It sets up your web application to use the Shale Application Filter, the Commons Chain Listener, and the Shale Servlet mapping. All this amounts to is using Shale as your application's controller.

web.xml

<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4"

         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

         xsi:schemaLocation="http:/java.sun.com/dtd/web-app_2_3.dtd">

             <display-name>Hello World!</display-name>

             <!-- Determines whether state is saved on the server or on the client. The

                 tradeoff here is server memory versus network bandwidth. -->

            <context-param>

                        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>

                        <param-value>server</param-value>

            </context-param>

 
            <!-- Sets up the shale application filter -->

            <filter>

                        <filter-name>shale</filter-name>

                        <filter-class>

                                    org.apache.shale.faces.ShaleApplicationFilter

                        </filter-class>

            </filter>

  
           
<filter-mapping>

                        <filter-name>shale</filter-name>

                        <url-pattern>*.faces</url-pattern>

            </filter-mapping>
                     

            <!-- Set up the Commons Chain listener -->

            <listener>

                        <listener-class>

                                    org.apache.commons.chain.web.ChainListener

                        </listener-class>

            </listener>

             <servlet>

                        <servlet-name>faces</servlet-name>

                        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>

            </servlet>

            <servlet-mapping>

                        <servlet-name>faces</servlet-name>

                        <url-pattern>*.faces</url-pattern>

            </servlet-mapping>

</web-app>

 

  Continued.....
1  | | 2  |  3  |  4  |  5  | Articles Home
Test
About Us | Our Mission | Terms of use | Author Terms |    Search        | Contact Us | Advertise With Us | Link to Us | Sitemap
Copyright © 2016 developersBOOK.COM. All rights reserved.