On Sun, Apr 19, 2009 at 1:06 PM, Paolo Marrone <[email protected]>wrote:
> Hi all, > first of all, I'm sorry for a wicketstuff question posted on this list, but > I cannot find a mailing list for wicketstuff, so I hope someone can help me. > > I'm a happy user of wicket (great framework!), and because I need also the > server-side push feature, I gave a look to the wicketstuff-dojo-1.1 project, > that includes an implementation of server-push based on Dojo-cometd. > > I'm able to run the example within the embedded jetty server, without > modifications, but because I need to use Glassfish (it is the servlet > container we use in production), I tried to run the wicketstuff-push > examples on a Glassfish v3 server, but without success. > The problem, in my opinion, depends on the content of web.xml. > This is the original web.xml (it works on jetty, but not on Glassfish): > > <web-app id="WebApp_ID"> > <display-name>wicketstuff-push-examples</display-name> > <welcome-file-list> > <welcome-file>index.html</welcome-file> > <welcome-file>index.htm</welcome-file> > <welcome-file>index.jsp</welcome-file> > <welcome-file>default.html</welcome-file> > <welcome-file>default.htm</welcome-file> > <welcome-file>default.jsp</welcome-file> > </welcome-file-list> > </web-app> My apologies, the web.xml is now fixed in the current version. > > > > I added the following lines to web.xml in order to make the application > compatible with wicket: > > ... > <filter> > <filter-name>PushExamples</filter-name> > <filter-class> > org.apache.wicket.protocol.http.WicketFilter > </filter-class> > <init-param> > <param-name>applicationClassName</param-name> > <param-value> > org.wicketstuff.push.examples.application.ExampleApplication > </param-value> > </init-param> > </filter> > <filter-mapping> > <filter-name>PushExamples</filter-name> > <url-pattern>/*</url-pattern> > </filter-mapping> > ... > > with the above new web.xml the webapp apparently seems to work in Glassfish > (I can reach the home page, that contains just a list of links to launch all > the wicketstuff-push examples), but when I try to launch some Cometd based > example, I get the following error: > > WicketMessage: Can't instantiate page using constructor public > org.wicketstuff.push.examples.pages.WicketCometdChat(org.apache.wicket.PageParameters) > and argument > > Root cause: > > javax.servlet.ServletException: Error searching for cometd Servlet > at > org.wicketstuff.push.cometd.CometdAbstractBehavior.getCometdServletPath(CometdAbstractBehavior.java:232) > at > org.wicketstuff.push.cometd.CometdAbstractBehavior.<clinit>(CometdAbstractBehavior.java:28) > at > org.wicketstuff.push.cometd.CometdService.addChannelListener(CometdService.java:74) > at > org.wicketstuff.push.examples.pages.WicketAbstractChat.<init>(WicketAbstractChat.java:49) > at > org.wicketstuff.push.examples.pages.WicketCometdChat.<init>(WicketCometdChat.java:13) > at java.lang.reflect.Constructor.newInstance(Constructor.java:513) > .... > > It seems that the cometd servlet mapping cannot be found. > My questions are: > > - Why the original web.xml can work in jetty? Where does it get the wicket > filter definition, and the cometd servlet mapping? > > - Someone tried the wicketstuff-push example on a different servlet > container? If yes, which is the right web.xml file to use? > > Please help me. > Thank you > Paolo Marrone > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Rodolfo Hansen CEO, KindleIT Software Development Email: [email protected] Office: 1 (809) 732-5200 Mobile: 1 (809) 299-7332
