do a little more research on the wicket wiki site, there are plenty examples on this
On Mon, Nov 24, 2008 at 8:04 AM, wch2001 <[EMAIL PROTECTED]> wrote: > > > sorry, Martjin, > > Can u tell me more clear? > > change the mountBookmarkablePage? > > > thanks > > > Martijn Dashorst wrote: > > > > Mount your page with one of the URL coding strategies. 1000 examples > > on the list or wiki. > > > > Martijn > > > > On 11/24/08, wch2001 <[EMAIL PROTECTED]> wrote: > >> > >> Dear all, > >> > >> why My application run with the whole package name? > >> > >> like > >> > https://apps.rednano.sg/peopleupdate/?wicket:bookmarkablePage=%3Asg.sphsearch.people.selfupdate.wicket.page.LoginPage > >> > >> the below is my web application: > >> > >> > >> > >> package sg.sphsearch.people.selfupdate.wicket.application; > >> > >> import java.net.MalformedURLException; > >> import javax.servlet.http.HttpServletRequest; > >> import org.acegisecurity.AuthenticationManager; > >> import org.apache.wicket.Request; > >> import org.apache.wicket.RequestCycle; > >> import org.apache.wicket.Response; > >> import org.apache.wicket.Session; > >> import org.apache.wicket.WicketRuntimeException; > >> import > >> > org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadWebRequest; > >> import org.apache.wicket.protocol.http.WebRequest; > >> import org.apache.wicket.security.hive.HiveMind; > >> import org.apache.wicket.security.hive.authentication.LoginContext; > >> import org.apache.wicket.security.hive.config.PolicyFileHiveFactory; > >> import org.apache.wicket.security.swarm.SwarmWebApplication; > >> import org.apache.wicket.spring.injection.annot.SpringComponentInjector; > >> import org.apache.wicket.util.file.Folder; > >> import org.slf4j.Logger; > >> import org.slf4j.LoggerFactory; > >> import sg.sphsearch.people.selfupdate.wicket.config.NameConstants; > >> import sg.sphsearch.people.selfupdate.wicket.page.AccessDeniedPage; > >> import sg.sphsearch.people.selfupdate.wicket.page.ErrorPage; > >> import sg.sphsearch.people.selfupdate.wicket.page.ExpiredPage; > >> import sg.sphsearch.people.selfupdate.wicket.page.IndexPage; > >> import sg.sphsearch.people.selfupdate.wicket.page.LoginPage; > >> import > >> sg.sphsearch.people.selfupdate.wicket.page.RegistrationConfirmPage; > >> import sg.sphsearch.people.selfupdate.wicket.page.RegistrationPage; > >> import sg.sphsearch.people.selfupdate.wicket.security.AcegiApplication; > >> import sg.sphsearch.people.selfupdate.wicket.security.AcegiLoginContext; > >> import > >> sg.sphsearch.people.selfupdate.wicket.security.SelfupdateRequestCycle; > >> import > >> sg.sphsearch.people.selfupdate.wicket.session.PeopleSelfUpdateSession; > >> > >> /** > >> * > >> * @author jmulyadi > >> * > >> */ > >> public class PeopleSelfUpdateApplication extends SwarmWebApplication > >> implements AcegiApplication > >> { > >> > >> static final Logger logger = > >> LoggerFactory.getLogger(PeopleSelfUpdateApplication.class); > >> private static final String TEMP_CONFIG_ID = "4"; > >> private AuthenticationManager authenticationManager; > >> private Folder uploadTempFolder = null; > >> > >> @Override > >> protected void init() > >> { > >> super.init(); > >> > >> addComponentInstantiationListener(new > >> SpringComponentInjector(this)); > >> > >> // Application Settings > >> getApplicationSettings().setInternalErrorPage(ErrorPage.class); > >> > >> getApplicationSettings().setPageExpiredErrorPage(ExpiredPage.class); > >> > >> getApplicationSettings().setAccessDeniedPage(AccessDeniedPage.class); > >> > >> // Markup Settings > >> getMarkupSettings().setCompressWhitespace(true); > >> getMarkupSettings().setStripComments(true); > >> getMarkupSettings().setStripWicketTags(true); > >> > >> // Request Cycle Settings > >> getRequestCycleSettings().setResponseRequestEncoding("UTF-8"); > >> getSessionSettings().setMaxPageMaps(100); > >> > >> // Obtain location for upload > >> uploadTempFolder = new > >> > Folder(NameConstants.IMAGESERVERCONFIGS.getImageServerConfigs().get(TEMP_CONFIG_ID).getServerPath()); > >> // Ensure folder exists > >> uploadTempFolder.mkdirs(); > >> > >> mountBookmarkablePage("/register", RegistrationPage.class); > >> mountBookmarkablePage("/confirmregistration", > >> RegistrationConfirmPage.class); > >> } > >> > >> @Override > >> @SuppressWarnings(value = "unchecked") > >> public Class getHomePage() > >> { > >> return IndexPage.class; > >> } > >> > >> @Override > >> @SuppressWarnings(value = "unchecked") > >> public Class getLoginPage() > >> { > >> return LoginPage.class; > >> } > >> > >> @Override > >> protected void setUpHive() > >> { > >> PolicyFileHiveFactory factory = new > >> PolicyFileHiveFactory(getActionFactory()); > >> > >> try > >> { > >> > >> > factory.addPolicyFile(getServletContext().getResource("/WEB-INF/policy/selfupdate.hive")); > >> factory.setAlias("principal", > >> "sg.sphsearch.auth.domain.Principal"); > >> factory.setAlias("base", > >> "sg.sphsearch.people.selfupdate.wicket"); > >> > >> //this application currently uses 1 policy file but you can add > >> as > >> many as you like > >> //factory.addPolicyFile(...); > >> } > >> catch (MalformedURLException e) > >> { > >> throw new WicketRuntimeException(e); > >> } > >> > >> HiveMind.registerHive(getHiveKey(), factory); > >> } > >> > >> @Override > >> protected Object getHiveKey() > >> { > >> return getServletContext().getContextPath(); > >> } > >> > >> public LoginContext getLogoffContext() > >> { > >> return new AcegiLoginContext(); > >> } > >> > >> @Override > >> public AuthenticationManager getAuthenticationManager() > >> { > >> return authenticationManager; > >> } > >> > >> public void setAuthenticationManager(final AuthenticationManager > >> authenticationManager) > >> { > >> this.authenticationManager = authenticationManager; > >> } > >> > >> @Override > >> public Session newSession(Request request, Response response) > >> { > >> return new PeopleSelfUpdateSession(this, request); > >> } > >> > >> @Override > >> protected WebRequest newWebRequest(HttpServletRequest > servletRequest) > >> { > >> return new UploadWebRequest(servletRequest); > >> } > >> > >> @Override > >> public RequestCycle newRequestCycle(Request request, Response > >> response) > >> { > >> return new SelfupdateRequestCycle(this, (WebRequest) request, > >> response); > >> } > >> > >> public Folder getUploadTempFolder() > >> { > >> return uploadTempFolder; > >> } > >> } > >> -- > >> View this message in context: > >> > http://www.nabble.com/Help%2C-why-the-loginpage-has-the-whole-package-name--tp20655674p20655674.html > >> Sent from the Wicket - User mailing list archive at Nabble.com. > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > > > > > > -- > > Become a Wicket expert, learn from the best: http://wicketinaction.com > > Apache Wicket 1.3.4 is released > > Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > -- > View this message in context: > http://www.nabble.com/Help%2C-why-the-loginpage-has-the-whole-package-name--tp20655674p20656407.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Aladejebi Ayodeji A., DabarObjects Solutions Phone: +234 9 481 7 156 Mobile: +234 803 589 1780 Email: [EMAIL PROTECTED] Web: www.dabarobjects.com Blog: blog.dabarobjects.com Participate, Collaborate, Innovate Join Community: http://www.cowblock.net/ Get A Free Blog: http://blogs.cowblock.net/
