package it.eurosoft; import it.eurosoft.gui.module.login.LoginBase; import it.eurosoft.gui.module.pratiche.PraticheBase; import it.eurosoft.mapping.convenzioni.Convenzione; import it.eurosoft.util.MySession;
import java.util.Locale; import org.apache.wicket.Application; import org.apache.wicket.Page; import org.apache.wicket.Request; import org.apache.wicket.Response; import org.apache.wicket.Session; import org.apache.wicket.protocol.http.WebApplication; import org.apache.wicket.spring.injection.annot.SpringComponentInjector; import wicket.authentication.AuthenticatedWebApplication; import wicket.authentication.AuthenticatedWebSession; import wicket.markup.html.WebPage; /** * Application object for your web application. If you want to run this application without deploying, run the Start class. * * @see wicket.myproject.Start#main(String[]) */ public class WicketApplication extends AuthenticatedWebApplication { /** * Constructor */ public WicketApplication() { // Session session = HibernateUtil.getSessionFactory().getCurrentSession(); // session.beginTransaction(); } public MySession newSession(AuthenticatedWebApplication request, Response response) { // TODO Auto-generated method stub MySession mys=new MySession(request); return (mys); } /** * @see wicket.Application#getHomePage() */ public Class getHomePage() { return LoginBase.class; } public void init() { try { getMarkupSettings().setStripWicketTags(true); Locale locale = Locale.getDefault(); System.out.println("Country: " + locale.getCountry()); System.out.println("Language: " + locale.getLanguage()); // this.addComponentInstantiationListener(new SpringComponentInjector(((WebApplication)this))); } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } } @Override protected Class<? extends WebPage> getSignInPageClass() { // TODO Auto-generated method stub return null; } @Override protected Class<? extends AuthenticatedWebSession> getWebSessionClass() { // TODO Auto-generated method stub return MySession.class; } } 2008/11/13 <[EMAIL PROTECTED]> > Show us the code that declares your WicketApplication class. > > Specially the import header and the "public class ... " line. > > Regards, > Bruno > > On Nov 13, 2008 2:24pm, francesco dicarlo <[EMAIL PROTECTED]> wrote: > >> hi i've switched my wicket application from webapplication to >> >> authenticatedwebapplication with jaas authentication on jboss. >> >> >> >> now it doesn't start giving me errors on filter in web.xml telling me that >> >> must be a subclass of webapplication. >> >> >> >> How must i declare now the web.xml in order to run >> >> authenticatedwebapplication? >> >> >> >> here the log >> >> >> >> ERROR [[/sisco]] Exception starting filter wicket.sisco >> >> org.apache.wicket.WicketRuntimeException: Application class >> >> it.eurosoft.WicketApplication must be a subclass of WebApplication >> >> >> >> and the web.xml >> >> >> >> >> >> >> >> wicket.sisco >> >> >> >> org.apache.wicket.protocol.http.WicketFilter >> >> >> >> applicationClassName >> >> it.eurosoft.WicketApplication >> >> >> >>