Re: Wicket 6 - test ajax component.
Thanks for your reply. I would try to use other testing method to test my component. On Jul 21, 2015 4:47 PM, andrea del bene an.delb...@gmail.com wrote: Hi, I don't think it's possible to send a specific key as this requires JavaScript code to be executed. But you can test AJAX events: //simulate an AJAX click event tester.executeAjaxEvent(label, click); See 'Testing AJAX events' in the userguide for more details. Andrea. On 20/07/2015 16:27, gump lee wrote: Dear All, Is it possible to write a unit test with WicketTester which I need to send Enter key to an AJAX component? Best regards, Gump - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Using Wicket 6.20 give following error
Hello, just a quick observation: In 6.x version IHeaderResponse is in a different package it's under org.apache.wicket.markup.*head* so it's explained why you'd get the exception. I think this JQWicket you are using is the problem. Looks unmaintained and designed for 1.5 version(previous version than 6.x). I guess it's this one https://code.google.com/p/jqwicket/ -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Using-Wicket-6-20-give-following-error-tp4671619p4671648.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Removing jessionid
Hello Team Wicket: We are in the process of getting our web application approved for a security clearance. Two related issues are: 1. The presence of a jsessionid in the url when the application loads 2. Maintaining the same jsessionid cookie after login (Session Fixation) A quick search pointed me to the following two fixes for these issues, respectively: 1. Removing jsessionid from the url: Used for search engine bots - https://cwiki.apache.org/confluence/display/WICKET/SEO+-+Search+Engine+Optimization 2. Invalidating the current session upon authentication and then creating a new session: http://stackoverflow.com/questions/8162646/how-to-refresh-jsessionid-cookie-after-login Both of these tips were posted a while ago, so I wanted to reach out to the community to see if other approaches are recommended. BTW we are using Glassfish 4. Thank you, - ER
Re: Removing jessionid
Hi, 1. you can remove the sessionid from the url and have it stored in a cookie without any change to your app code. This is more of web container setup, it's not really Wicket who should be handling that. With Servlet 3.0 you can tell your web container how it should handle it in the web.xml file of your app like http://www.e-zest.net/blog/new-session-management-features-in-servlet-3-0/ notice the tracking-modeCOOKIE/tracking-mode option Look into having it as HttpOnly also, it means the cookie value cannot be read from JS so you'd want that turned also on to minimize the damage in case of a XSS vulnerability in your site. 2. Actually Wicket already comes with session fixation protection if you look in the Session class the method Session.replaceSession() has it explained in the Javadoc So say you have a LoginForm with a public void submit() { User user = userDao.getUser(username, password); if(user != null) { //pardon the stupidest authorization Session.get().replaceSession(); //we're destroying the old session and recreating a new one - a new sessionid is returned to the user AppSession newSession = (AppSession) Session.get(); newSession.setUser(user); } else { error(Wrong username/pass); } } -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Removing-jessionid-tp4671649p4671650.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to send a request to an external url from wicket?
Hi Sven, Thanks for your response but I think I cannot use this option. I need to pass to that url the form parameters. On my onSubmit, I need to build a list of parameters and pass via a post method to the url to be processed. This exception does not allow a list of parameters. Cheers, Cosmin. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-send-a-request-to-an-external-url-from-wicket-tp4671642p4671644.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to send a request to an external url from wicket?
Hi, the url allows parameters as any url, e.g http://server.com?param1=value1param2=value2;. If you need to post your parameters, you'll have to generate a hidden form and submit it. You can render the form with wicket (some WebMarkupContainers will suffice) or just use some JavaScript for it: http://stackoverflow.com/questions/133925/javascript-post-request-like-a-form-submit You can call the JavaScript in the Ajax request as follows: target.appendJavaScript(String.format(post('%s', %s);, path, params)); Have fun Sven On 22.07.2015 10:35, cosmindumy wrote: Hi Sven, Thanks for your response but I think I cannot use this option. I need to pass to that url the form parameters. On my onSubmit, I need to build a list of parameters and pass via a post method to the url to be processed. This exception does not allow a list of parameters. Cheers, Cosmin. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-send-a-request-to-an-external-url-from-wicket-tp4671642p4671644.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to send a request to an external url from wicket?
Ya, I need to submit the form with post method. This answer helped me. I will try it. Thanks a lot, Cosmin. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-send-a-request-to-an-external-url-from-wicket-tp4671642p4671646.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to integrate Wicket-cdi-1.1 to OSGi environment
Hi wicket-group: I want to integrate the wicket-cdi to Karaf container.But I met some issues in deploying wicket application. Some exception is below: javax.servlet.ServletException: java.lang.IllegalStateException: No BeanManager found via the CDI provider and no fallback specified. Check your CDI setup or specify a fallback BeanManager in the CdiConfiguration. In Karaf env,I has installed the Pax-CDI features. But I don’t know Why occur the exception,So I hope whether give me some advising about how to use wicket-cdi in OSGI environment? Thank you very much! Looking forward to your reply! Cheers, Wicket user-James