You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jurgen Lust (JIRA)" <de...@myfaces.apache.org> on 2006/02/15 14:36:08 UTC

[jira] Created: (MYFACES-1126) ExtensionsFilter results in empty response on Jetty 6

ExtensionsFilter results in empty response on Jetty 6
-----------------------------------------------------

         Key: MYFACES-1126
         URL: http://issues.apache.org/jira/browse/MYFACES-1126
     Project: MyFaces
        Type: Bug
  Components: Tomahawk  
    Versions: 1.1.1, Nightly    
 Environment: Windows XP SP2, Jetty 6 as part of the Jetty6 plugin for maven2
    Reporter: Jurgen Lust


When deploying a MyFaces webapp that uses the ExtensionsFilter in Jetty6, the response is always empty.
You can verify this by adding this to the tomahawk/examples/simple/pom.xml:

       <plugins>
           <plugin>
               <groupId>org.mortbay.jetty</groupId>
               <artifactId>maven-jetty6-plugin</artifactId>
               <version>6.0.0beta9</version>
               <configuration>
                   <scanIntervalSeconds>10</scanIntervalSeconds>
               </configuration>
           </plugin>
       </plugins>

And then typing mvn jetty6:run in the same folder.
Now you can access the simple example at http://localhost:8080/myfaces-example-simple/
Normally you will now see a completely empty page...


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (TOMAHAWK-75) ExtensionsFilter results in empty response on Jetty 6

Posted by "Jurgen Lust (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/TOMAHAWK-75?page=comments#action_12367256 ] 

Jurgen Lust commented on TOMAHAWK-75:
-------------------------------------

This appears to be an issue with Jetty 6, and not with MyFaces. It has been fixed in the latest snapshot of the Jetty6 plugin

> ExtensionsFilter results in empty response on Jetty 6
> -----------------------------------------------------
>
>          Key: TOMAHAWK-75
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-75
>      Project: MyFaces Tomahawk
>         Type: Bug
>  Environment: Windows XP SP2, Jetty 6 as part of the Jetty6 plugin for maven2
>     Reporter: Jurgen Lust

>
> When deploying a MyFaces webapp that uses the ExtensionsFilter in Jetty6, the response is always empty.
> You can verify this by adding this to the tomahawk/examples/simple/pom.xml:
>        <plugins>
>            <plugin>
>                <groupId>org.mortbay.jetty</groupId>
>                <artifactId>maven-jetty6-plugin</artifactId>
>                <version>6.0.0beta9</version>
>                <configuration>
>                    <scanIntervalSeconds>10</scanIntervalSeconds>
>                </configuration>
>            </plugin>
>        </plugins>
> And then typing mvn jetty6:run in the same folder.
> Now you can access the simple example at http://localhost:8080/myfaces-example-simple/
> Normally you will now see a completely empty page...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1126) ExtensionsFilter results in empty response on Jetty 6

Posted by "Jurgen Lust (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1126?page=comments#action_12366492 ] 

Jurgen Lust commented on MYFACES-1126:
--------------------------------------

The jetty plugin gets the myfaces libraries from the dependencies of the project, as specified in the POM.
The problem you are having is related to the startupServletContextListener: apparently Jetty does not yet support listeners via TLD files, so you should add the following lines to the web.xml of the tomahawk simple example web.xml:

<listener>
  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>

Now it should start correctly.

I've been trying to locate the problem, but haven't found the exact source yet. 
I have noticed that in the ExtensionsResponseWrapper there is a comment that Jetty uses the getOutputStream() method, whereas Tomcat uses the getWriter() method, which is not the case for Jetty6: it also uses the getWriter() method.

Anyway, it has been a while since I wrote ServletFilters and such - JSF does such a good job hiding all that request/response complexity I haven't needed it anymore :-) - so it might take me a while to figure out how this thing works...

> ExtensionsFilter results in empty response on Jetty 6
> -----------------------------------------------------
>
>          Key: MYFACES-1126
>          URL: http://issues.apache.org/jira/browse/MYFACES-1126
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1, Nightly
>  Environment: Windows XP SP2, Jetty 6 as part of the Jetty6 plugin for maven2
>     Reporter: Jurgen Lust

>
> When deploying a MyFaces webapp that uses the ExtensionsFilter in Jetty6, the response is always empty.
> You can verify this by adding this to the tomahawk/examples/simple/pom.xml:
>        <plugins>
>            <plugin>
>                <groupId>org.mortbay.jetty</groupId>
>                <artifactId>maven-jetty6-plugin</artifactId>
>                <version>6.0.0beta9</version>
>                <configuration>
>                    <scanIntervalSeconds>10</scanIntervalSeconds>
>                </configuration>
>            </plugin>
>        </plugins>
> And then typing mvn jetty6:run in the same folder.
> Now you can access the simple example at http://localhost:8080/myfaces-example-simple/
> Normally you will now see a completely empty page...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (MYFACES-1126) ExtensionsFilter results in empty response on Jetty 6

Posted by "Bill Dudney (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-1126?page=comments#action_12366490 ] 

Bill Dudney commented on MYFACES-1126:
--------------------------------------

Jurgen,

The jetty m2 plugin is trying to deploy from the src directory instead of from the target dir. Any idea how to make the m2 plugin deploy from the target dir? IOW, the src dir does not have the jars for myfaces but the target does. I've pasted the stack trace that I get from m2 below.

Also since few of us are that familiar with Jetty (as far as I know anyway) perhaps you could do some digging to help us find the problem?

Thanks again for using myfaces!

[INFO] Configuring Jetty for project: Tomahawk Examples: Simple
[INFO] Webapp source directory is: .../myfaces-current/tomahawk/examples/simple/src/main/webapp
[INFO] web.xml file located at: .../myfaces-current/tomahawk/examples/simple/src/main/webapp/WEB-INF/web.xml
[INFO] Classes located at: .../myfaces-current/tomahawk/examples/simple/target/classes
[INFO] tmp dir for webapp will be .../myfaces-current/tomahawk/examples/simple/target/jetty-tmp
[INFO] Starting Jetty Server ...
[INFO] No connectors configured, using defaults: org.mortbay.jetty.nio.SelectChannelConnector listening on 8080 with maxIdleTime 30000
1 [main] INFO org.mortbay.log - Logging to org.slf4j.impl.SimpleLogger@d71256 via org.mortbay.log.Slf4jLog
[INFO] Context path = /myfaces-example-simple
[INFO] Webapp directory = .../myfaces-current/tomahawk/examples/simple/src/main/webapp
[INFO] Setting up classpath ...
[INFO] Finished setting up classpath
[INFO] Started configuring web.xml, resource base=.../myfaces-current/tomahawk/examples/simple/src/main/webapp
[INFO] Finished configuring web.xml
1560 [main] WARN org.mortbay.log - failed Faces Servlet
1562 [main] WARN org.mortbay.log - failed ContextHandler@a9da7{/myfaces-example-simple,file:.../myfaces-current/tomahawk/examples/simple/src/main/webapp/}
1621 [main] INFO org.mortbay.log - Started SelectChannelConnector @ 0.0.0.0:8080
1622 [main] WARN org.mortbay.log - failed Server@751a9b
[INFO] Jetty server exiting.
[INFO] ----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ----------------------------------------------------------------------------
[INFO] Failure

Embedded error: No Factories configured for this Application. This happens if the faces-initialization does not work at all - make sure that you properly include all configuration settings necessary for a basic faces application and that all the necessary libs are included. Also check the logging output of your web application and your container for any exceptions!
If you did that and find nothing, the mistake might be due to the fact that you use some special web-containers which do not support registering context-listeners via TLD files and a context listener is not setup in your web.xml.
A typical config looks like this;
<listener>
  <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
</listener>


> ExtensionsFilter results in empty response on Jetty 6
> -----------------------------------------------------
>
>          Key: MYFACES-1126
>          URL: http://issues.apache.org/jira/browse/MYFACES-1126
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.1, Nightly
>  Environment: Windows XP SP2, Jetty 6 as part of the Jetty6 plugin for maven2
>     Reporter: Jurgen Lust

>
> When deploying a MyFaces webapp that uses the ExtensionsFilter in Jetty6, the response is always empty.
> You can verify this by adding this to the tomahawk/examples/simple/pom.xml:
>        <plugins>
>            <plugin>
>                <groupId>org.mortbay.jetty</groupId>
>                <artifactId>maven-jetty6-plugin</artifactId>
>                <version>6.0.0beta9</version>
>                <configuration>
>                    <scanIntervalSeconds>10</scanIntervalSeconds>
>                </configuration>
>            </plugin>
>        </plugins>
> And then typing mvn jetty6:run in the same folder.
> Now you can access the simple example at http://localhost:8080/myfaces-example-simple/
> Normally you will now see a completely empty page...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Closed: (TOMAHAWK-75) ExtensionsFilter results in empty response on Jetty 6

Posted by "sean schofield (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/TOMAHAWK-75?page=all ]
     
sean schofield closed TOMAHAWK-75:
----------------------------------

    Resolution: Won't Fix

Closing at Jurgen's suggestion.

> ExtensionsFilter results in empty response on Jetty 6
> -----------------------------------------------------
>
>          Key: TOMAHAWK-75
>          URL: http://issues.apache.org/jira/browse/TOMAHAWK-75
>      Project: MyFaces Tomahawk
>         Type: Bug
>  Environment: Windows XP SP2, Jetty 6 as part of the Jetty6 plugin for maven2
>     Reporter: Jurgen Lust

>
> When deploying a MyFaces webapp that uses the ExtensionsFilter in Jetty6, the response is always empty.
> You can verify this by adding this to the tomahawk/examples/simple/pom.xml:
>        <plugins>
>            <plugin>
>                <groupId>org.mortbay.jetty</groupId>
>                <artifactId>maven-jetty6-plugin</artifactId>
>                <version>6.0.0beta9</version>
>                <configuration>
>                    <scanIntervalSeconds>10</scanIntervalSeconds>
>                </configuration>
>            </plugin>
>        </plugins>
> And then typing mvn jetty6:run in the same folder.
> Now you can access the simple example at http://localhost:8080/myfaces-example-simple/
> Normally you will now see a completely empty page...

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira