Hi All,

I have the following problem: when I try to remove either of booking.jsp and
booking.jsf (having same contents) from the directory tree of app.war
(following), I get the message HTTP status 404 The requested resource
(/s_ejb3_jb421_tobbfele/pages/booking.jsp) is not available.

Thank you in advance: Balazs Bamer

JBoss 4.2.1 output:
16:23:21,101 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.PRETTY_HTML' found, using default value true
16:23:21,101 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.ALLOW_JAVASCRIPT' found, using default value true
16:23:21,101 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.DETECT_JAVASCRIPT' found, using default value false
16:23:21,101 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.AUTO_SCROLL' found, using default value false
16:23:21,101 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value
org.apache.myfaces.renderkit.html.util.DefaultAddResource
16:23:21,101 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.ADD_RESOURCE_CLASS' found, using default value
org.apache.myfaces.renderkit.html.util.DefaultAddResource
16:23:21,121 INFO  [MyfacesConfig] No context init parameter
'org.apache.myfaces.CHECK_EXTENSIONS_FILTER' found, using default value true


app.war (inside s_ejb3_jb421_tobbfele.ear) contents, with only the
booking.jsf:
META-INF/
META-INF/MANIFEST.MF
WEB-INF/
WEB-INF/web.xml
WEB-INF/lib/
WEB-INF/lib/com-sun-rave-designtime.jar
WEB-INF/lib/commons-beanutils.jar
WEB-INF/lib/commons-chain.jar
WEB-INF/lib/commons-codec.jar
WEB-INF/lib/commons-collections.jar
WEB-INF/lib/commons-digester.jar
WEB-INF/lib/commons-el.jar
WEB-INF/lib/commons-fileupload.jar
WEB-INF/lib/commons-lang.jar
WEB-INF/lib/commons-logging.jar
WEB-INF/lib/commons-validator.jar
WEB-INF/lib/jakarta-oro.jar
WEB-INF/lib/jsfcl-dt.jar
WEB-INF/lib/jsfcl.jar
WEB-INF/lib/jstl-api.jar
WEB-INF/lib/jstl-impl.jar
WEB-INF/lib/openide.jar
WEB-INF/lib/propertyeditors.jar
WEB-INF/lib/shale-clay.jar
WEB-INF/lib/shale-core.jar
WEB-INF/lib/shale-remoting.jar
WEB-INF/lib/shale-tiger.jar
WEB-INF/lib/shale-tiles.jar
WEB-INF/lib/shale-view-1.0.4.jar
WEB-INF/lib/tiles-core.jar
WEB-INF/lib/tomahawk-1.1.2-SNAPSHOT.jar
WEB-INF/classes/
WEB-INF/classes/com/
WEB-INF/classes/com/loxon/
WEB-INF/classes/com/loxon/shaleproba/
WEB-INF/classes/com/loxon/shaleproba/FlightServlet.class
booking_messages.properties
booking_messages_en.properties
booking_messages_es.properties
booking_messages_fr.properties
images/
pages/
theme/
index.html
pages/booking.jsf
theme/style.css
WEB-INF/faces-config.xml


index.html:
<html>
<head>
  <meta http-equiv="Refresh" content="0; URL=pages/booking.jsf">
</head>
</html>


faces-config.xml:
<?xml version="1.0"?>
<!DOCTYPE faces-config PUBLIC
  "-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN"
  "http://java.sun.com/dtd/web-facesconfig_1_1.dtd";>
<faces-config>
        <managed-bean>
                <managed-bean-name>flightServlet</managed-bean-name>
        
<managed-bean-class>com.loxon.shaleproba.FlightServlet</managed-bean-class>
                <managed-bean-scope>request</managed-bean-scope>
        </managed-bean>
</faces-config>


web.xml:
<?xml version="1.0"?>
<web-app   xmlns="http://java.sun.com/xml/ns/j2ee";
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
                             
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";
                      version="2.4">
    <description>debug web.xml</description>
    <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
        <description>
            State saving method: "client" or "server" (= default)
            See JSF Specification 2.5.2
        </description>
    </context-param>
    <context-param>
        <param-name>javax.faces.ALLOW_JAVASCRIPT</param-name>
        <param-value>true</param-value>
        <description>
            This parameter tells MyFaces if javascript code should be
allowed in the
        </description>
    </context-param>
    <context-param>
        <param-name>javax.faces.DETECT_JAVASCRIPT</param-name>
        <param-value>false</param-value>
    </context-param>
    <context-param>
        <param-name>javax.faces.PRETTY_HTML</param-name>
        <param-value>true</param-value>
        <description>
            If true, rendered HTML code will be formatted, so that it is
"human readable".
            i.e. additional line separators and whitespace will be written,
that do not
            influence the HTML code.
            Default: "true"
        </description>
    </context-param>
    <context-param>
        <param-name>javax.faces.AUTO_SCROLL</param-name>
        <param-value>true</param-value>
        <description>
            If true, a javascript function will be rendered that is able to
restore the
            former vertical scroll on every request. Convenient feature if
you have pages
            with long lists and you do not want the browser page to always
jump to the top
            if you trigger a link or button action that stays on the same
page.
            Default: "false"
        </description>
    </context-param>
    <filter>
        <filter-name>extensionsFilter</filter-name>
       
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
        <init-param>
            <param-name>maxFileSize</param-name>
            <param-value>20m</param-value>
            <description>Set the size limit for uploaded files.
                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB
            </description>
        </init-param>
        <init-param>
            <param-name>uploadThresholdSize</param-name>
            <param-value>100k</param-value>
            <description>Set the threshold size - files
                    below this limit are stored in memory, files above
                    this limit are stored on disk.

                Format: 10 - 10 bytes
                        10k - 10 KB
                        10m - 10 MB
                        1g - 1 GB
            </description>
        </init-param>
    </filter>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <servlet-name>Faces Servlet</servlet-name>
    </filter-mapping>
    <filter-mapping>
        <filter-name>extensionsFilter</filter-name>
        <url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
     </filter-mapping>
  <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>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
  </filter-mapping>
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
</web-app> 


booking.jsf:
<%@ taglib uri="http://java.sun.com/jsf/html"; prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core"; prefix="f" %>
<%@ taglib uri="http://struts.apache.org/shale/core"; prefix="s" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk"; prefix="t"%>
<html>
 <head>
  <title>Metro Systems </title>
  <link href="../theme/style.css" rel="stylesheet" type="text/css">
 </head>
 <body>
<div id="container"> 
<f:loadBundle basename="booking_messages" var="booking_messages"/>
  <f:view>
      <h3> <h:outputText value="#{booking_messages['welcome']}"/>  </h3> 
   <h:form onsubmit="return validateForm(this);">
     <table align="center" cellpadding="5" cellspacing="5">
       <tr>
         <td>Email</td>
         <td><h:inputText id="email" value="#{flightServlet.flight.email}">
                    <s:commonsValidator type="required"
                          arg="Email"
                          server="true"
                          client="true"/>
                    <s:commonsValidator type="email" 
                             arg="#{flightServlet.flight.email}"
                          server="true"
                          client="true"/>
             </h:inputText>
         </td>
       </tr>
       <tr>
         <td><h:outputText id="departure"
value="#{booking_messages['date']}"/></td>
         <td>
            <t:inputCalendar monthYearRowClass="yearMonthHeader"
weekRowClass="weekHeader"
                currentDayCellClass="currentDayCell"
value="#{flightServlet.flight.departure}" renderAsPopup="true"
                popupTodayString="#{booking_messages['popup_today_string']}"
popupWeekString="#{booking_messages['popup_week_string']}">
                    <s:commonsValidator type="required"
                          arg="Departure date"
                          server="true"
                          client="true"/>
             </t:inputCalendar>
        </td>
       </tr>
       <tr>
         <td><h:outputText value="#{booking_messages['city']}"/> </td>
         <td> <h:selectOneMenu value="#{flightServlet.flight.city}"
required="true">
                             <f:selectItem itemLabel="Los Angeles"
itemValue="Los Angeles"/>
                             <f:selectItem itemLabel="Madrid"
itemValue="Madrid"/>
                             <f:selectItem itemLabel="Mexico City"
itemValue="Mexico City"/>
                             <f:selectItem itemLabel="New York"
itemValue="New York"/>
                             <f:selectItem itemLabel="Paris"
itemValue="Paris"/>
            </h:selectOneMenu></td>
       </tr>
     </table>
     <h:message for="email" styleClass="errors"/> 
     <h:message for="departure" styleClass="errors"/> 
     <s:validatorScript functionName="validateForm"/>
     <h:commandButton type="submit" value="#{booking_messages['reserve']}"
action="#{flightServlet.reserve}"/>
    <h:messages/> 
  </h:form>
  </f:view>
    </div> 
</body>
</html>


ear application.xml:
<application>
  <display-name>JSF Shale EJB3 JBoss 4.2.1</display-name>
  <module>
    <web>
      <web-uri>app.war</web-uri>
      <context-root>/s_ejb3_jb421_tobbfele</context-root>
    </web>
  </module>
  <module>
    <ejb>app.jar</ejb>
  </module>
</application>


ear jboss-ap.xml:
<jboss-app>
  <loader-repository>
    s_ejb3_jb421_tobbfele:archive=s_ejb3_jb421_tobbfele.ear
  </loader-repository>
</jboss-app>
-- 
View this message in context: 
http://www.nabble.com/ejb3-app-functions-only-when-both-.jsf-and-.jsp-is-present-tf4691133.html#a13407621
Sent from the Shale - User mailing list archive at Nabble.com.

Reply via email to