Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » JSF support?
JSF support? [message #77024] Tue, 14 November 2006 10:27 Go to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

Hi,

I write a webapp bundle and I want to integrate JSF. My server is the
jettybundle.
But I get allways this error when running the webapp bundle:

org.mortbay.jetty.servlet.ServletHandler handle
SCHWERWIEGEND: /faces/index.jsp:
java.lang.IllegalStateException: Application was not properly
initialized at startup, could not find Factory:
javax.faces.context.FacesContextFactory
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:263)
at javax.faces.webapp.FacesServlet.init(FacesServlet.java:142)
at
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.initializeDelegate(ServletManager.java:144)
at
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.service(ServletManager.java:128)
at
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(ServletRegistration.java:91)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxyServlet.java:110)
at
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:428)
at
org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHan dler.java:677)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java: 820)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.ja va:986)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:8 37)
at
org.mortbay.http.SocketListener.handleConnection(SocketListe ner.java:245)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:3 57)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:5 34)



But the Factory is available in the bundle!
Is there any support for JSF in an equinox bundle?
Or can anybody help me or give me a hint?

Best regards,
Sabine
Re: JSF support? [message #77223 is a reply to message #77024] Wed, 15 November 2006 03:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: skaegi.sympatico.ca

Hi Sabine,

Equinox currently doesn't have a JSF bundle.
That said, it should be feasible to add support, it's more a matter of
finding the time to take a look.
(contributions welcome)

With that said, as I recall JSF uses a ServletContextListener to do some
initialization work as the context gets created so I suspect the error
you're seeing is related to not having an attribute set.

The OSGi HttpService does not have the concept of a ServletContextListener
however (if you're determined) you can simulate the initialization with
either another servlet or by wrapping the Faces servlet with another servlet
that can do the initialization. The first approach is probably sufficient
for testing. Eventually we might look at doing the second approach and
offering good out-of-the-box support.

HTH
-Simon

"Sabine Wagner" <user@domain.invalid> wrote in message
news:ejc5p6$jgi$1@utils.eclipse.org...
> Hi,
>
> I write a webapp bundle and I want to integrate JSF. My server is the
> jettybundle.
> But I get allways this error when running the webapp bundle:
>
> org.mortbay.jetty.servlet.ServletHandler handle
> SCHWERWIEGEND: /faces/index.jsp:
> java.lang.IllegalStateException: Application was not properly
> initialized at startup, could not find Factory:
> javax.faces.context.FacesContextFactory
> at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:263)
> at javax.faces.webapp.FacesServlet.init(FacesServlet.java:142)
> at
>
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.ini
tializeDelegate(ServletManager.java:144)
> at
>
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.ser
vice(ServletManager.java:128)
> at
>
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(
ServletRegistration.java:91)
> at
>
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxySer
vlet.java:110)
> at
>
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.
java:68)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:428)
> at
> org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHan dler.java:677)
> at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:568)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
> at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
> at org.mortbay.http.HttpServer.service(HttpServer.java:909)
> at org.mortbay.http.HttpConnection.service(HttpConnection.java: 820)
> at org.mortbay.http.HttpConnection.handleNext(HttpConnection.ja va:986)
> at org.mortbay.http.HttpConnection.handle(HttpConnection.java:8 37)
> at
> org.mortbay.http.SocketListener.handleConnection(SocketListe ner.java:245)
> at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:3 57)
> at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:5 34)
>
>
>
> But the Factory is available in the bundle!
> Is there any support for JSF in an equinox bundle?
> Or can anybody help me or give me a hint?
>
> Best regards,
> Sabine
>
Re: JSF support? [message #77367 is a reply to message #77223] Thu, 16 November 2006 19:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: user.domain.invalid

Hi Simon,

thanks for your reply.
I solved the problem with the FacesContextFactory. But now I have the
problem that there's no ServletContextListener registered. And I don't
know how to to register the Listener without web.xml.
You mentioned that it's possible to simulate this with a servlet.
Can you post a small example servlet, please!

Best regards,
Sabine



Simon Kaegi schrieb:
> Hi Sabine,
>
> Equinox currently doesn't have a JSF bundle.
> That said, it should be feasible to add support, it's more a matter of
> finding the time to take a look.
> (contributions welcome)
>
> With that said, as I recall JSF uses a ServletContextListener to do some
> initialization work as the context gets created so I suspect the error
> you're seeing is related to not having an attribute set.
>
> The OSGi HttpService does not have the concept of a ServletContextListener
> however (if you're determined) you can simulate the initialization with
> either another servlet or by wrapping the Faces servlet with another servlet
> that can do the initialization. The first approach is probably sufficient
> for testing. Eventually we might look at doing the second approach and
> offering good out-of-the-box support.
>
> HTH
> -Simon
>
> "Sabine Wagner" <user@domain.invalid> wrote in message
> news:ejc5p6$jgi$1@utils.eclipse.org...
>
>>Hi,
>>
>>I write a webapp bundle and I want to integrate JSF. My server is the
>>jettybundle.
>>But I get allways this error when running the webapp bundle:
>>
>>org.mortbay.jetty.servlet.ServletHandler handle
>>SCHWERWIEGEND: /faces/index.jsp:
>>java.lang.IllegalStateException: Application was not properly
>>initialized at startup, could not find Factory:
>>javax.faces.context.FacesContextFactory
>>at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:263)
>>at javax.faces.webapp.FacesServlet.init(FacesServlet.java:142)
>>at
>>
>
> org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.ini
> tializeDelegate(ServletManager.java:144)
>
>>at
>>
>
> org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.ser
> vice(ServletManager.java:128)
>
>>at
>>
>
> org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(
> ServletRegistration.java:91)
>
>>at
>>
>
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxySer
> vlet.java:110)
>
>>at
>>
>
> org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.
> java:68)
>
>>at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
>>at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:428)
>>at
>> org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHan dler.java:677)
>>at
>
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:568)
>
>>at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
>>at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
>>at org.mortbay.http.HttpServer.service(HttpServer.java:909)
>>at org.mortbay.http.HttpConnection.service(HttpConnection.java: 820)
>>at org.mortbay.http.HttpConnection.handleNext(HttpConnection.ja va:986)
>>at org.mortbay.http.HttpConnection.handle(HttpConnection.java:8 37)
>>at
>> org.mortbay.http.SocketListener.handleConnection(SocketListe ner.java:245)
>>at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:3 57)
>>at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:5 34)
>>
>>
>>
>>But the Factory is available in the bundle!
>>Is there any support for JSF in an equinox bundle?
>>Or can anybody help me or give me a hint?
>>
>>Best regards,
>>Sabine
>>
>
>
>
Re: JSF support? [message #77462 is a reply to message #77367] Fri, 17 November 2006 05:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: skaegi.sympatico.ca

Sure, here's a quick example
If you know exactly which classes are involved you can create a no argument
constructor by extending this and setting the instances (or just take a look
and do your own thing.)

HTH
-Simon

--
package some.package
import java.io.IOException;
import javax.servlet.*;

public class ServletCotextListenerServletAdaptor implements Servlet {
private ServletConfig config;
private ServletContextListener listener;
private Servlet delegate;

public ServletCotextListenerServletAdaptor(ServletContextListener listener,
Servlet delegate) {
this.listener = listener;
this.delegate = delegate;
}

public void init(ServletConfig config) throws ServletException {
this.config = config;
listener.contextInitialized(new
ServletContextEvent(config.getServletContext()));
delegate.init(config);
}

public void service(ServletRequest req, ServletResponse resp) throws
ServletException, IOException {
delegate.service(req, resp);
}

public void destroy() {
delegate.destroy();
listener.contextDestroyed(new
ServletContextEvent(config.getServletContext()));
config = null;
}

public ServletConfig getServletConfig() {
return config;
}

public String getServletInfo() {
return "";
}
}





"Sabine Wagner" <user@domain.invalid> wrote in message
news:ejie3m$jlf$1@utils.eclipse.org...
> Hi Simon,
>
> thanks for your reply.
> I solved the problem with the FacesContextFactory. But now I have the
> problem that there's no ServletContextListener registered. And I don't
> know how to to register the Listener without web.xml.
> You mentioned that it's possible to simulate this with a servlet.
> Can you post a small example servlet, please!
>
> Best regards,
> Sabine
>
>
>
> Simon Kaegi schrieb:
> > Hi Sabine,
> >
> > Equinox currently doesn't have a JSF bundle.
> > That said, it should be feasible to add support, it's more a matter of
> > finding the time to take a look.
> > (contributions welcome)
> >
> > With that said, as I recall JSF uses a ServletContextListener to do some
> > initialization work as the context gets created so I suspect the error
> > you're seeing is related to not having an attribute set.
> >
> > The OSGi HttpService does not have the concept of a
ServletContextListener
> > however (if you're determined) you can simulate the initialization with
> > either another servlet or by wrapping the Faces servlet with another
servlet
> > that can do the initialization. The first approach is probably
sufficient
> > for testing. Eventually we might look at doing the second approach and
> > offering good out-of-the-box support.
> >
> > HTH
> > -Simon
> >
> > "Sabine Wagner" <user@domain.invalid> wrote in message
> > news:ejc5p6$jgi$1@utils.eclipse.org...
> >
> >>Hi,
> >>
> >>I write a webapp bundle and I want to integrate JSF. My server is the
> >>jettybundle.
> >>But I get allways this error when running the webapp bundle:
> >>
> >>org.mortbay.jetty.servlet.ServletHandler handle
> >>SCHWERWIEGEND: /faces/index.jsp:
> >>java.lang.IllegalStateException: Application was not properly
> >>initialized at startup, could not find Factory:
> >>javax.faces.context.FacesContextFactory
> >>at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:263)
> >>at javax.faces.webapp.FacesServlet.init(FacesServlet.java:142)
> >>at
> >>
> >
> >
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.ini
> > tializeDelegate(ServletManager.java:144)
> >
> >>at
> >>
> >
> >
org.eclipse.equinox.http.registry.internal.ServletManager$Se rvletWrapper.ser
> > vice(ServletManager.java:128)
> >
> >>at
> >>
> >
> >
org.eclipse.equinox.http.servlet.internal.ServletRegistratio n.handleRequest(
> > ServletRegistration.java:91)
> >
> >>at
> >>
> >
> >
org.eclipse.equinox.http.servlet.internal.ProxyServlet.proce ssAlias(ProxySer
> > vlet.java:110)
> >
> >>at
> >>
> >
> >
org.eclipse.equinox.http.servlet.internal.ProxyServlet.servi ce(ProxyServlet.
> > java:68)
> >
> >>at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> >>at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder .java:428)
> >>at
>
>> org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHan dler.java:677)
> >>at
> >
> > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandl er.java:568)
> >
> >>at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
> >>at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
> >>at org.mortbay.http.HttpServer.service(HttpServer.java:909)
> >>at org.mortbay.http.HttpConnection.service(HttpConnection.java: 820)
> >>at org.mortbay.http.HttpConnection.handleNext(HttpConnection.ja va:986)
> >>at org.mortbay.http.HttpConnection.handle(HttpConnection.java:8 37)
> >>at
>
>> org.mortbay.http.SocketListener.handleConnection(SocketListe ner.java:245)
> >>at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:3 57)
> >>at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:5 34)
> >>
> >>
> >>
> >>But the Factory is available in the bundle!
> >>Is there any support for JSF in an equinox bundle?
> >>Or can anybody help me or give me a hint?
> >>
> >>Best regards,
> >>Sabine
> >>
> >
> >
> >
>
Re: JSF support? [message #82865 is a reply to message #77024] Mon, 05 February 2007 19:11 Go to previous messageGo to next message
Martin Dames is currently offline Martin DamesFriend
Messages: 28
Registered: July 2009
Junior Member
Hey,

just want to know if there are any progress for an JSF bundle.

Sabine, could you tell us, what you did to use JSF in Equinox?

Thank you.
Re: JSF support? [message #102153 is a reply to message #77024] Thu, 29 November 2007 16:55 Go to previous message
Tilo Gau is currently offline Tilo GauFriend
Messages: 36
Registered: July 2009
Member
Hello all!

Are there some current news about JSF-Support at Eclipse Equinox serverside?


T.Gau
Previous Topic:Is there any implementation of Configuration Admin Service?
Next Topic:Stop loading of a bundle.
Goto Forum:
  


Current Time: Sun Oct 17 02:52:46 GMT 2021

Powered by FUDForum. Page generated in 0.01676 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top