You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Mark Lundquist <lu...@gmail.com> on 2007/01/15 21:29:06 UTC

trouble w/ cocoon-webapp + Eclipse + Jetty Launcher

Hi,

When I run cocoon-webapp using "mvn jetty:run", it works fine.  When I 
launch it from Eclipse using the Jetty plugin, I get this:

	No thread-bound request found: Are you referring to request attributes 
outside of an actual web request? If you are actually operating within 
a web request and still receive this message,your code is probably 
running outside of DispatcherServlet/DispatcherPortlet: In this case, 
use RequestContextListener or RequestContextFilter to expose the 
current request.

I configured the Jetty Launcher like so...

	webapp root: target/webapp
	context name: /

Any clues?
thx,
—ml—

Re: trouble w/ cocoon-webapp + Eclipse + Jetty Launcher

Posted by Mark Lundquist <lu...@gmail.com>.
On Jan 15, 2007, at 3:04 PM, Daniel Fagerstrom wrote:

> I don't think they are the same thing. In my Jetty launcher plugin 
> (1.4.1), both of the fields are there and I use the field connected to 
> the "use custom webdefaults config file.

ohh... you mean, right there in front of me? :-/

Seriously... this is why I do so much better with command-line tools :-/

>
>> java.io.IOException: Jetty configuration problem: 
>> java.lang.IllegalStateException: Unknown tag: description
> Which shows that the "Jetty XML configuration file" field doesn't 
> understand the scheme of an ordinary webapp file.

Yes... hence my befuddlement.

thx,
—ml—


Re: trouble w/ cocoon-webapp + Eclipse + Jetty Launcher

Posted by Daniel Fagerstrom <da...@nada.kth.se>.
Mark Lundquist skrev:
> 
> On Jan 15, 2007, at 1:16 PM, Daniel Fagerstrom wrote:
> 
>> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116756809412994&w=2
> 
> Thanks, Daniel.  I think I must be misunderstanding something, though.  
> When I pull up the Jetty Web configuration panel, it doesn't have "Use
> custom webdefaults config file" exactly, but I have a box marked "Use a 
> Jetty XML configuration file" and I presume that's the same thing.

I don't think they are the same thing. In my Jetty launcher plugin 
(1.4.1), both of the fields are there and I use the field connected to 
the "use custom webdefaults config file. IIRC the "Jetty XML 
configuration file" corresponds to the servlet.xml in Tomcat.

>  When 
> I select that option with "webdefault.xml", it breaks with this:
> 
> java.io.IOException: Jetty configuration problem: 
> java.lang.IllegalStateException: Unknown tag: description
>     at org.mortbay.jetty.Server.<init>(Server.java:124)
>     at 
> com.iw.plugins.jettyrunner.PluginRunner.launchWithXML(PluginRunner.java:226) 
> 
>     at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:91)
>     at com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java:75)
> 
> (<description> is the first child of <web-app> in the webdefault.xml file).

Which shows that the "Jetty XML configuration file" field doesn't 
understand the scheme of an ordinary webapp file.

> Sorry for being so lame, to atone for it I will add all this to the docs 
> once I have it working :-/

No problem.

> thx,
> —ml—
> 
> P.S. The comment in webdefault.xml seems awfully disparaging about 
> RequestAttributeListeners, whatever those are...

I saw that. But after having spent a couple of hours before I found out 
that they didn't support all of servlet 2.4 by default. I thought that 
they got their priorities wrong.

They have given up their fight against the standard in Jetty 6 and just 
implements the RequestAttributeListeners without complaining explicitly.

/Daniel



Re: trouble w/ cocoon-webapp + Eclipse + Jetty Launcher

Posted by Mark Lundquist <lu...@gmail.com>.
On Jan 15, 2007, at 1:16 PM, Daniel Fagerstrom wrote:

> http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116756809412994&w=2

Thanks, Daniel.  I think I must be misunderstanding something, though.   
When I pull up the Jetty Web configuration panel, it doesn't have "Use
custom webdefaults config file" exactly, but I have a box marked "Use a  
Jetty XML configuration file" and I presume that's the same thing.   
When I select that option with "webdefault.xml", it breaks with this:

java.io.IOException: Jetty configuration problem:  
java.lang.IllegalStateException: Unknown tag: description
	at org.mortbay.jetty.Server.<init>(Server.java:124)
	at  
com.iw.plugins.jettyrunner.PluginRunner.launchWithXML(PluginRunner.java: 
226)
	at com.iw.plugins.jettyrunner.PluginRunner.launch(PluginRunner.java:91)
	at com.iw.plugins.jettyrunner.PluginRunner.main(PluginRunner.java:75)

(<description> is the first child of <web-app> in the webdefault.xml  
file).

Sorry for being so lame, to atone for it I will add all this to the  
docs once I have it working :-/
thx,
—ml—

P.S. The comment in webdefault.xml seems awfully disparaging about  
RequestAttributeListeners, whatever those are...


Re: trouble w/ cocoon-webapp + Eclipse + Jetty Launcher

Posted by Daniel Fagerstrom <da...@nada.kth.se>.
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=116756809412994&w=2

/Daniel

Mark Lundquist skrev:
> Hi,
> 
> When I run cocoon-webapp using "mvn jetty:run", it works fine.  When I 
> launch it from Eclipse using the Jetty plugin, I get this:
> 
>     No thread-bound request found: Are you referring to request 
> attributes outside of an actual web request? If you are actually 
> operating within a web request and still receive this message,your code 
> is probably running outside of DispatcherServlet/DispatcherPortlet: In 
> this case, use RequestContextListener or RequestContextFilter to expose 
> the current request.
> 
> I configured the Jetty Launcher like so...
> 
>     webapp root: target/webapp
>     context name: /
> 
> Any clues?
> thx,
> —ml—