You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Arinté <ar...@gmail.com> on 2007/07/10 23:15:31 UTC

Losing my mind

I am working with Geronimo version 2M6 and I am trying to use jsf, but its not 
working.  It is a one page website I am trying to test, but to no avail.  Here 
is my plan file.

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.1">
     <environment>
         <moduleId>
             <groupId>default</groupId>
             <artifactId>apache</artifactId>
             <version>1.0</version>
             <type>car</type>
         </moduleId>
         <dependencies>
             <dependency>
                 <groupId>org.apache.myfaces.core</groupId>
                 <artifactId>myfaces-api</artifactId>
                 <type>jar</type>
             </dependency>
             <dependency>
                 <groupId>org.apache.myfaces.core</groupId>
                 <artifactId>myfaces-impl</artifactId>
                 <type>jar</type>
             </dependency>
         </dependencies>
     </environment>

     <context-root>/apache</context-root>
</web-app>

It deploys fine, but the jsf stuff isn't looked at at all.  When I view the 
webpage its blank.  When I right-click and do view source I have this
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
     xmlns:f="http://java.sun.com/jsf/core"
     xmlns:h="http://java.sun.com/jsf/html">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert 3</title>
</head>
<body>

<f:view>
     <h:form>
         <h:selectOneMenu id="subscriptions">
             <f:selectItem id="item1" itemLabel="News" itemValue="1" />
             <f:selectItem id="item2" itemLabel="Sports" itemValue="2" />
             <f:selectItem id="item3" itemLabel="Music" itemValue="3" />
             <f:selectItem id="item4" itemLabel="Java" itemValue="4" />
             <f:selectItem id="item5" itemLabel="Web" itemValue="5" />
         </h:selectOneMenu>
         <h:commandButton></h:commandButton>
     </h:form>
</f:view>
</body>
</html>

HELP!?!?!?!?


Re: Losing my mind

Posted by Paul McMahan <pa...@gmail.com>.
On Jul 10, 2007, at 5:15 PM, Arinté wrote:

>         <dependencies>
>             <dependency>
>                 <groupId>org.apache.myfaces.core</groupId>
>                 <artifactId>myfaces-api</artifactId>
>                 <type>jar</type>
>             </dependency>
>             <dependency>
>                 <groupId>org.apache.myfaces.core</groupId>
>                 <artifactId>myfaces-impl</artifactId>
>                 <type>jar</type>
>             </dependency>
>         </dependencies>
>     </environment>

In java ee5 jsf is provided by the container so you don't need to  
include these dependencies.

> It deploys fine, but the jsf stuff isn't looked at at all.  When I  
> view the webpage its blank.  When I right-click and do view source  
> I have this
> <?xml version="1.0" encoding="ISO-8859-1" ?>
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
>     xmlns:f="http://java.sun.com/jsf/core"
>     xmlns:h="http://java.sun.com/jsf/html">
> <head>
> <meta http-equiv="Content-Type" content="text/html;  
> charset=ISO-8859-1" />
> <title>Insert 3</title>
> </head>
> <body>
>
> <f:view>
>     <h:form>
>         <h:selectOneMenu id="subscriptions">
>             <f:selectItem id="item1" itemLabel="News" itemValue="1" />
>             <f:selectItem id="item2" itemLabel="Sports"  
> itemValue="2" />
>             <f:selectItem id="item3" itemLabel="Music"  
> itemValue="3" />
>             <f:selectItem id="item4" itemLabel="Java" itemValue="4" />
>             <f:selectItem id="item5" itemLabel="Web" itemValue="5" />
>         </h:selectOneMenu>
>         <h:commandButton></h:commandButton>
>     </h:form>
> </f:view>
> </body>
> </html>
>
> HELP!?!?!?!?


If that's what you see in your browser then the jsf tags aren't being  
interpreted, which implies that you did not add the FacesServlet to  
your web.xml.   See the bottom of this file for an example:
http://myfaces.apache.org/cardemoweb.html



Best wishes,
Paul



Re: Losing my mind

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 7/10/07, Arinté <ar...@gmail.com> wrote:
> I am working with Geronimo version 2M6 and I am trying to use jsf, but its not
> working.  It is a one page website I am trying to test, but to no avail.  Here
> is my plan file.
>
...
>          <dependencies>
>              <dependency>
>                  <groupId>org.apache.myfaces.core</groupId>
>                  <artifactId>myfaces-api</artifactId>
>                  <type>jar</type>
>              </dependency>
>              <dependency>
>                  <groupId>org.apache.myfaces.core</groupId>
>                  <artifactId>myfaces-impl</artifactId>
>                  <type>jar</type>
>              </dependency>

Hi,

I might be mistaken, but you don't need these deps. They're available
in the Java EE 5-compliant server and so are in Geronimo 2. Regardless
of the outcome, that's not an issue, I guess.

> It deploys fine, but the jsf stuff isn't looked at at all.  When I view the
> webpage its blank.  When I right-click and do view source I have this

You didn't show us the webapp deployment descriptor - WEB-INF/web.xml
and what's more important - how you opened the web page. Did you use
something like http://localhost:8080/apache/mypage.jsf or
http://localhost:8080/apache/faces/mypage.jsp or alike?

/me entering in "more info needed" mode

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl