Re: Wicket on low end hardware

2023-01-03 Thread François Meillet
Have you try the command line options -verbose:class to list all classes loaded 
in the JVM at startup ?
For example loading Yauaa (Yet Another UserAgent Analyzer, 
https://github.com/nielsbasjes/yauaa) or Simple Magic 
(https://github.com/j256/simplemagic) takes time.

François


> Le 3 janv. 2023 à 16:36, Martin Terra  a 
> écrit :
> 
> Just a note, you don't need to make the startup "pre-touching" process a
> blocking one so that if a user were to interact with the app, they could do
> so while startup pretouch is doing its thing.
> 
> And you could profile whether you want to do the pre-touch in single thread
> or multi-thraded.
> 
> **
> Martin
> 
> ti 3. tammik. 2023 klo 16.58 s...@stantastic.nl kirjoitti:
> 
>> Thanks everyone. I did not expect the amount of feedback that I got. It
>> is much appreciated.
>> 
>> I spent most of my day profiling with VisualVM and it strengthened by
>> beliefs that my problems do not appear to be related to anything but
>> Wicket combined with our dated hardware. Please do not consider this a
>> criticism. I understand that not a lot of people run servlet containers
>> on this kind of hardware nowadays.
>> 
>> My database queries all run quickly and my domain classes are hardly
>> even touched when the system starts. Our rather simple login page -
>> which is stateless and does not query the database when the form is
>> empty - takes 5-15 seconds to load on the first try. Subsequent requests
>> take about 40-120ms (browser caching disabled). Once logged in, the
>> other pages do not take as long, but they do feel sluggish until they
>> have been requested once.
>> 
>> I tried to only load the quickstart example as Martijn suggested. It
>> starts more quickly than our own application but all things considered,
>> its performance did not impress me and that application really is super
>> simple. The first page load of the quickstart took about 2 seconds,
>> after that it normalized to about 30ms per request.
>> 
>> When all pages have been loaded once, things are absolutely fine. So I
>> am considering Martin's approach of preloading components. That still
>> leaves me with the considerable startup time but we will learn to live
>> with that. Or we might switch from Tomcat to Jetty eventually.
>> 
>> If anyone thinks I might be leaving some stuff on the table, I would be
>> open to hire someone to do some consulting work on this. Please get in
>> touch with me if you are interested.
>> 
>> Cheers.
>> 
>> Stan
>> 
>> 
>> Martin Terra schreef op 2023-01-02 04:29:
>> 
>>> Anything in wicket can be preloaded,  but as premature optimization is
>>> evil, you should profile your application.
>>> 
>>> If you do not have debug access to a real/simulated environment then
>>> the
>>> least you can do is make your own thread logger to log what the threads
>>> are
>>> doing.
>>> 
>>> **
>>> Martin
>>> 
>>> ma 2. tammik. 2023 klo 3.19 Anna Eileen (shengchehs...@gmail.com)
>>> kirjoitti:
>>> 
 Hello
 
 Would you please describe your web application components? Database ?
 What services ran on the device?
 
 From: s...@stantastic.nl 
 Date: Monday, January 2, 2023 at 5:23 AM
 To: users@wicket.apache.org 
 Subject: Wicket on low end hardware
 
 Hi,
 
 My use case for Wicket is a quite unconventional one. I use it as the
 framework for the web interface of an appliance that runs on low end
 hardware. The appliance doesn't have gigabytes of memory to waste or
 tens of CPU cores. It's more like Celeron powered hardware with maybe
 one or two gigabytes of RAM.
 
 I general this all works and customers are happy once the device is
 running. But I find that deployment is quite slow, and so are the
 first
 couple of page loads of the day. Just to be clear: I cannot really
 claim
 that my performance problems are all Wicket related. They may be, but
 they probably also are down to other underlying issues. A badly
 optimized database, or a badly configured servlet container come to
 mind...
 
 However, I was wondering if anyone has experience in using Wicket on
 low
 end hardware. I would be very interested in how to optimize for this.
 
 Thanks,
 
 Stan
>> 


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Apache Wicket 6.0.0-beta1 is released

2012-03-26 Thread François Meillet
Great !  Thanks !

François



Le 26 mars 2012 à 20:43, Martin Grigorov a écrit :

> The Wicket team is proud to announce the first beta release of the
> Wicket 6.x series.
> This release brings over many improvements over the 1.5.x series.
> 
> The roadmap with the major goals can be found at
> https://cwiki.apache.org/WICKET/wicket-60-roadmap.html.
> The migration guide with all major and some minor changes can be found
> at https://cwiki.apache.org/WICKET/migration-to-wicket-60.html.
> 
> Git tag:
> release/wicket-6.0.0-beta1
> 
> Changelog:
> https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310561&version=12315431
> Many of the listed tickets are fixed both in 1.5.x and 6.0.x.
> 
> Maven:
> 
> org.apache.wicket
> wicket-core
> 6.0.0-beta1
> 
> 
> 
> Download the full distribution (including source):
> http://www.apache.org/dyn/closer.cgi/wicket/6.0.0-beta1
> 
> We don't plan any more API breaks but if you find something that can
> be made better now it the time
> to discuss it! We will try to avoid making any API changes in the
> Release Candidates that will follow this
> beta release.
> Any feedback about the new features, their implementation and their
> documentation is very welcome!
> 
> 
> The Wicket team!
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 
> 
> __
> This email has been scanned by Netintelligence
> http://www.netintelligence.com/email
> 



Re: PageExpiredErrorPage - httpServletResponse.status

2012-03-15 Thread François Meillet
ticket : https://issues.apache.org/jira/browse/WICKET-4455


Le 15 mars 2012 à 10:24, Martin Grigorov a écrit :

> This is the case since several versions of Wicket, not just 6.0.
> But I think your suggestion is better.
> File a ticket please.
> 
> On Thu, Mar 15, 2012 at 11:17 AM, Francois Meillet
>  wrote:
>> In 6.0-SNAPSHOT
>> 
>> The default implementation of the PageExpiredErrorPage
>> set the httpServletResponse.status to  HttpServletResponse.SC_NOT_FOUND
>> 
>> Why not HttpServletResponse.SC_GONE ?
>> 
>> François
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.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: PageExpiredException and PageExpired

2012-03-15 Thread François Meillet
I found the problem : 

I use a IRequestCycleListener and my onException implementation was buggy.
The ordering of catch-clause was bad !.

Thanks Martin.

François



Le 15 mars 2012 à 08:46, Martin Grigorov a écrit :

> Hi,
> 
> Looking at the application from your other post I think the
> authorization strategy doesn't allow the showing of PageExpired page.
> It checks whether there is signed in user and either shows the
> requested page or shows the login page.
> 
> On Wed, Mar 14, 2012 at 9:05 PM, Francois Meillet
>  wrote:
>> I have the following settings
>> 
>> getPageSettings().setRecreateMountedPagesAfterExpiry(false);
>> getApplicationSettings().setPageExpiredErrorPage(PageExpired.class);
>> 
>> I don't get the PageExpired (which is bookmarkable) for PageExpiredException
>> 
>> Do I forget something ?
>> 
>> 
>> François
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.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: Debug Performance Issue in Wicket App

2012-03-14 Thread François Meillet
A java profiler will save your time

François 


Le 14 mars 2012 à 15:22, eugenebalt a écrit :

> I am having some delays/performance issues in my Wicket app. It could be
> anything.
> 
> Is there a way to turn on some debugging that monitors the lifecycle of all
> Wicket requests/responses? thanks
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Debug-Performance-Issue-in-Wicket-App-tp4471948p4471948.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: Could not find component after session dies

2012-03-14 Thread François Meillet
Hi Martin,

Le 14 mars 2012 à 13:50, Martin Grigorov a écrit :

> Hi Francois,
> 
> On Wed, Mar 14, 2012 at 1:51 PM, Francois Meillet
>  wrote:
>> Release:
>> Wicket 6.0-SNAPSHOT
> 
> Good!
> And sorry if I break the APIs from time to time ;-)
;-)

> 
>> 
>> 
>> The pages:
>> All pages extends a Skeleton, which has a header panel.
>> 
>> In this header panel, another panel is displayed, depending if the user is 
>> logged (ConnectedPanel) or not (HeaderLoginPanel).
>> 
>> So when a user is not connected, the component's structure is
>> Page-HeaderPanel-HeaderLoginPanel
>> and when the user is connected, the structure is
>> Page-HeaderPanel-ConnectedPanel
>> 
>> 
>> The problem:
>> The user logs in and waits until the session die.
>> Then when he clicks on link linktest  
>> (org.apache.wicket.markup.html.link.Link),  in the ConnectedPanel , the 
>> following error appears:
>> 
>> Could not find component 'HeaderPanel:HeaderLoginPanel:linktest on page 
>> 'class HomePage
>> 
>> Question 1
>> Why does Wicket try to find linktest in the HeaderLoginPanel  ?
>> As Linktest belongs to ConnectedPanel.
> 
> Can you check what is the url in the produced html (view page source).
> It will be even more weird if the link url is correct but later Wicket
> confuses itself somehow.

Not a good new : the url is 
linktest
The problem is the same with the 1.5.5

> 
>> 
>> Question 2
>> Why don't I get a PageExpiredException ?
> 
> Try with 
> org.apache.wicket.settings.IPageSettings#setRecreateMountedPagesAfterExpiry(false)
> 

That works

>> 
>> 
>> François
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.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: Enable debug messages for org.apache.wicket.util.resource to get a list of all filenames tried

2012-03-08 Thread François Meillet
 if you use logback, add the line
 
in your log config file

Le 9 mars 2012 à 08:28, mlabs a écrit :

> how exactly do I enable these debug messages?
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Enable-debug-messages-for-org-apache-wicket-util-resource-to-get-a-list-of-all-filenames-tried-tp4458722p4458722.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: LoadableDetachableModels for a ListView ( database with Cayenne)

2012-02-16 Thread François Meillet
Hi Vineet,

   public LoadableDetachableModel load(final Long xxx) {
   
LoadableDetachableModel> model = new 
LoadableDetachableModel>() {

protected YourClass load() {
try {

List list = get your liste here( xxx )

return list 

} catch (YourException e) {
   
}
}
};
return model;
}

IModel> model = load( x );

new ListView(id, model) ;



That is ok for a small list.

And if you have to handle large lists, you should use a Dataview with 
DataProvider.

François 





Le 16 févr. 2012 à 15:53, vineet semwal a écrit :

> sorry when i meant if you are going to retrieve a lot of data use dataview
> 
> On Thu, Feb 16, 2012 at 8:17 PM, vineet semwal
>  wrote:
>> see listmodel
>> 
>> btw if you have a big list ,use dataview
>> 
>> On Thu, Feb 16, 2012 at 8:14 PM, atomix  
>> wrote:
>>> Hi all ,
>>> 
>>> I'm using Cayenne as my database service...
>>> 
>>> Now in a query return a List
>>> 
>>> which I want to wrap a whole List in to ( so call)
>>> LoadableDetachableListModels to provide for a ListView, I'm also know that a
>>> DataProvider could do the same thing but did any one have write something
>>> like LoadableDetachableListModels to wrap a generic List and provide to a
>>> ListView...
>>> 
>>> Please help!!
>>> 
>>> I've read
>>> http://wicketinaction.com/2008/09/building-a-smart-entitymodel/
>>> .. so one entity is fine but
>>> but didn't know very clear what can be use for a List
>>> 
>>> --
>>> View this message in context: 
>>> http://apache-wicket.1842946.n4.nabble.com/LoadableDetachableModels-for-a-ListView-database-with-Cayenne-tp4394185p4394185.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
>>> 
>> 
>> 
>> 
>> --
>> thank you,
>> 
>> regards,
>> Vineet Semwal
> 
> 
> 
> -- 
> thank you,
> 
> regards,
> Vineet Semwal
> 
> -
> 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: Problem DatePicker, ModalWindow and IE8

2012-02-10 Thread François Meillet
Hi Mathieu,

Have you try to modify (or set) the CSS "z-index" property (link the the 
"position" property) of the div that cover the close button

François


Le 10 févr. 2012 à 09:21, Matt a écrit :

> close



Re: Numeric Filter on TextField

2012-01-05 Thread François Meillet
Have a look to 
http://stackoverflow.com/questions/469357/html-text-input-allow-only-numeric-input

François


Le 5 janv. 2012 à 09:16, codix a écrit :

> I have a TextField for filtering the data in a DataTable. However, the rows
> in the table is purely numeric. How do I prevent users from entering
> non-numeric input on the TextField by using an onKeyUp event?
> 
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Numeric-Filter-on-TextField-tp4264649p4264649.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 get client ip with wicket 1.5

2011-11-20 Thread François Meillet
((ServletWebRequest) 
RequestCycle.get().getRequest()).getContainerRequest().getRemoteHost()

François


Le 21 nov. 2011 à 08:20, vineet semwal a écrit :

> ServletWebRequest servletWebRequest = (ServletWebRequest)
> getRequestCycle().getRequest();
>HttpServletRequest request =
> servletWebRequest.getContainerRequest();
>String ipAddress = request.getHeader("X-Forwarded-For");
> 
> On Mon, Nov 21, 2011 at 12:41 PM, Paolo  wrote:
>> Alle domenica 20 novembre 2011, vineet semwal ha scritto:
>>>   HttpServletRequest request = servletWebRequest.getContainerRequest();
>>> String ipAddress = request.getHeader("X-Forwarded-For");
>>> 
>> 
>> Thank you for your very fast reply.
>> I implemented your code:
>> 
>> HttpServletRequest request = ServletWebRequest.getContainerRequest();
>> String ipAddress = request.getHeader("X-Forwarded-For");
>> 
>> but I got this error on the first line:
>> Cannot make a static reference to the non-static method 
>> getContainerRequest() from the type ServletWebRequest
>> 
>> Can you help me?
>> Thak you so much.
>> 
>>> On Sun, Nov 20, 2011 at 4:41 PM, Paolo  wrote:
 I need to known the ip address of the user connected to my tomcat server.
 In previous post, I read about...
 
 getWebRequestCycle().getWebRequest().getHttpServletRequest().getRemoteAddr();
 
 But I also find some documentation with google that in Wicket 1.5 I should 
 use WebClientInfo:
 
 getRemoteAddr
 protected String getRemoteAddr(RequestCycle requestCycle)
 When using ProxyPass, requestCycle().getHttpServletRequest(). 
 getRemoteAddr() returns the IP of the machine forwarding the request. In 
 order to maintain the clients ip address, the server places it in the 
 X-Forwarded-For Header.
 Parameters:
 requestCycle - the request cycle
 Returns:
 remoteAddr IP address of the client, using the X-Forwarded-For header and 
 defaulting to: getHttpServletRequest().getRemoteAddr(
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
>> 
> 
> 
> 
> -- 
> thank you,
> 
> regards,
> Vineet Semwal
> 
> -
> 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: Wicket deployment issue on oc4j

2011-08-30 Thread François Meillet
Have a look to jmxremote.access

http://download.oracle.com/javase/6/docs/technotes/guides/management/agent.html#gdeup
and
http://download.oracle.com/javase/1,5.0/docs/guide/jmx/tutorial/security.html


François





Le 30 août 2011 à 07:22, josyula jagan kumar a écrit :

> Dear All,
> When we try to deploy wicket application on oc4j we are getting 403 Forbidden 
> error. If we make -Doc4j.jmx.security.proxy.off=true then we are able to 
> access the application.
> We tried many options found on internet like placing a blank page or removing 
> wicket-jmx from classpath and so on..
> Could you please let us know what could be the issue?
> Thanks & Regards
> Jagan


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: form in modal window

2011-05-25 Thread François Meillet
 @Override
protected void onSubmit(AjaxRequestTarget ajaxRequestTarget, 
Form form) {

  form.getDefaultModel().
}

Le 25 mai 2011 à 13:57, Mathilde Pellerin a écrit :

> Thanks for answer.
> 
> Sorry for the first question : it was not the main problem so I didn't
> search the solution.  Now it's fine, the confirmation message disappear.
> 
> But the main problem was the second : how can I prevent the modal to
> disappear when login failed?
> 
> I tried to use ajaxButton instead submit button but then I can't I use the
> model of my form like I did with submit button.
> 
> Any advice would be great...
> 
> this is my actual code (with submit button, no ajax) :
> 
> public class ConnexionContentPanel extends FeedbackPanel {
>private static final long serialVersionUID = 6952274296991345904L;
> 
>@SpringBean
>private ServiceIdentification serviceIdentif;
> 
>@SuppressWarnings("serial")
>public ConnexionContentPanel(String id) {
>super(id);
> 
>Form loginForm = new Form("loginForm",
>new CompoundPropertyModel(new
> LoadableDetachableModel() {
> 
>@Override
>protected Membre load() {
>return new Membre();
>}
>})) {
> 
>@Override
>protected void onSubmit() {
>Membre membre;
> 
>membre = serviceIdentif.identifier(getModelObject().getId(),
> getModelObject().getPassword());
>if(membre == null)
>error("Identifiant ou mot de passe incorrect");
>else
>System.out.println("Connexion");
> 
>}
>};
> 
>loginForm.add(new TextField("membreId"));
>loginForm.add(new PasswordTextField("password"));
> 
>add(loginForm);
>}
> }
> 
> 
> 2011/5/25 Martin Grigorov 
> 
>> Translate the message to English and search in Nabble/Google.
>> It has been discussed many times.
>> 
>> On Wed, May 25, 2011 at 12:46 PM, Mathilde Pellerin <
>> mathilde.pelle...@gmail.com> wrote:
>> 
>>> Hi all,
>>> 
>>> I have a login form in a modal window.
>>> I want that an error message appears when login fail, so my panel extends
>>> FeedBackPanel.
>>> But when I submit the form, an confirmation message appears with this
>>> message :
>>> "Voulez-vous vraiment quitter cette page ?
>>> Reloading this page will cause the modal window to disappear.
>>> Appuyer sur OK pour continuer, ou Annuler pour rester sur la page
>>> actuelle."
>>> 
>>> and if I click on OK, the modal window disappear even if login failed.
>>> 
>>> this is my code :
>>> public ConnexionContentPanel(String id) {
>>>   super(id);
>>> 
>>>   Form loginForm = new Form("loginForm",
>>>   new CompoundPropertyModel(new
>>> LoadableDetachableModel() {
>>> 
>>>   @Override
>>>   protected Membre load() {
>>>   return new Membre();
>>>   }
>>>   })) {
>>> 
>>>   @Override
>>>   protected void onSubmit() {
>>>   Membre membre;
>>> 
>>>   try {
>>>   membre =
>>> serviceIdentif.identifier(getModelObject().getId(),
>>> getModelObject().getPassword());
>>>   if(membre == null)
>>>   error("Identifiant ou mot de passe incorrect");
>>>   else
>>>   System.out.println("Connexion");
>>>   } catch (Exception e) {
>>>   e.printStackTrace();
>>>   }
>>> 
>>>   }
>>>   };
>>>   loginForm.add(new TextField("membreId"));
>>>   loginForm.add(new PasswordTextField("password"));
>>> 
>>>   add(loginForm);
>>>   }
>>> 
>>> how can I avoid the confirmation message, and how can I prevent the modal
>>> to
>>> disappear whan login failed?
>>> 
>>> thanks.
>>> 
>>> Mathilde
>>> 
>>> --
>>> Mathilde Pellerin  Ingénieur en Génie Logiciel  Tél mobile :
>>> 06.60.78.79.03   E-m

Re: form in modal window

2011-05-25 Thread François Meillet
just use an AjaxButton

François



Le 25 mai 2011 à 13:57, Mathilde Pellerin a écrit :

> Thanks for answer.
> 
> Sorry for the first question : it was not the main problem so I didn't
> search the solution.  Now it's fine, the confirmation message disappear.
> 
> But the main problem was the second : how can I prevent the modal to
> disappear when login failed?
> 
> I tried to use ajaxButton instead submit button but then I can't I use the
> model of my form like I did with submit button.
> 
> Any advice would be great...
> 
> this is my actual code (with submit button, no ajax) :
> 
> public class ConnexionContentPanel extends FeedbackPanel {
>private static final long serialVersionUID = 6952274296991345904L;
> 
>@SpringBean
>private ServiceIdentification serviceIdentif;
> 
>@SuppressWarnings("serial")
>public ConnexionContentPanel(String id) {
>super(id);
> 
>Form loginForm = new Form("loginForm",
>new CompoundPropertyModel(new
> LoadableDetachableModel() {
> 
>@Override
>protected Membre load() {
>return new Membre();
>}
>})) {
> 
>@Override
>protected void onSubmit() {
>Membre membre;
> 
>membre = serviceIdentif.identifier(getModelObject().getId(),
> getModelObject().getPassword());
>if(membre == null)
>error("Identifiant ou mot de passe incorrect");
>else
>System.out.println("Connexion");
> 
>}
>};
> 
>loginForm.add(new TextField("membreId"));
>loginForm.add(new PasswordTextField("password"));
> 
>add(loginForm);
>}
> }
> 
> 
> 2011/5/25 Martin Grigorov 
> 
>> Translate the message to English and search in Nabble/Google.
>> It has been discussed many times.
>> 
>> On Wed, May 25, 2011 at 12:46 PM, Mathilde Pellerin <
>> mathilde.pelle...@gmail.com> wrote:
>> 
>>> Hi all,
>>> 
>>> I have a login form in a modal window.
>>> I want that an error message appears when login fail, so my panel extends
>>> FeedBackPanel.
>>> But when I submit the form, an confirmation message appears with this
>>> message :
>>> "Voulez-vous vraiment quitter cette page ?
>>> Reloading this page will cause the modal window to disappear.
>>> Appuyer sur OK pour continuer, ou Annuler pour rester sur la page
>>> actuelle."
>>> 
>>> and if I click on OK, the modal window disappear even if login failed.
>>> 
>>> this is my code :
>>> public ConnexionContentPanel(String id) {
>>>   super(id);
>>> 
>>>   Form loginForm = new Form("loginForm",
>>>   new CompoundPropertyModel(new
>>> LoadableDetachableModel() {
>>> 
>>>   @Override
>>>   protected Membre load() {
>>>   return new Membre();
>>>   }
>>>   })) {
>>> 
>>>   @Override
>>>   protected void onSubmit() {
>>>   Membre membre;
>>> 
>>>   try {
>>>   membre =
>>> serviceIdentif.identifier(getModelObject().getId(),
>>> getModelObject().getPassword());
>>>   if(membre == null)
>>>   error("Identifiant ou mot de passe incorrect");
>>>   else
>>>   System.out.println("Connexion");
>>>   } catch (Exception e) {
>>>   e.printStackTrace();
>>>   }
>>> 
>>>   }
>>>   };
>>>   loginForm.add(new TextField("membreId"));
>>>   loginForm.add(new PasswordTextField("password"));
>>> 
>>>   add(loginForm);
>>>   }
>>> 
>>> how can I avoid the confirmation message, and how can I prevent the modal
>>> to
>>> disappear whan login failed?
>>> 
>>> thanks.
>>> 
>>> Mathilde
>>> 
>>> --
>>> Mathilde Pellerin  Ingénieur en Génie Logiciel  Tél mobile :
>>> 06.60.78.79.03   E-mail
>>> : mathilde.pelle...@gmail.com   Mon CV en ligne :
>>>  http://www.mathilde-pellerin.fr/
>> Mes
>>> liens :  
>>> 
>>> 
>> 
>> 
>> 
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com 
>> 
> 
> 
> 
> -- 
> Mathilde Pellerin  Ingénieur en Génie Logiciel  Tél mobile :
> 06.60.78.79.03   E-mail
> : mathilde.pelle...@gmail.com   Mon CV en ligne :
>  http://www.mathilde-pellerin.fr/Mes
> liens :  
> 






-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: StoredResponsesMap

2011-05-23 Thread François Meillet
Thanks Martin,

I tested with trunk, it's fixed. everything is ok now !

François


Le 23 mai 2011 à 12:58, Martin Grigorov a écrit :

> It's fixed in trunk.
> If you can use trunk for your tests I'll be thankful for feedback.
> 
> On Mon, May 23, 2011 at 1:05 PM, Martin Grigorov wrote:
> 
>> Please file a ticket.
>> 
>> 2011/5/23 François Meillet 
>> 
>>> Hi Wicketers,
>>> 
>>> While I was doing some load testing with with a small prog using Apache
>>> httpclient  (45 threads, only the get requests were done)
>>> 
>>> I got this error
>>> 
>>> 17:59:22.086 ERROR ["http-bio-8080"-exec-1]   DefaultExceptionMapper -
>>> 108 - Unexpected error occurred
>>> java.lang.NullPointerException: null
>>>   at
>>> org.apache.wicket.protocol.http.StoredResponsesMap$Value.access$000(StoredResponsesMap.java:37)
>>> ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.wicket.protocol.http.StoredResponsesMap.removeEldestEntry(StoredResponsesMap.java:73)
>>> ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:410)
>>> ~[na:1.6.0_22]
>>>   at java.util.HashMap.put(HashMap.java:385) ~[na:1.6.0_22]
>>>   at
>>> org.apache.wicket.protocol.http.StoredResponsesMap.put(StoredResponsesMap.java:95)
>>> ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.wicket.protocol.http.WebApplication.storeBufferedResponse(WebApplication.java:723)
>>> ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.wicket.request.handler.render.WebPageRenderer.storeBufferedResponse(WebPageRenderer.java:73)
>>> ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:258)
>>> ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:139)
>>> ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:718)
>>> ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
>>> ~[wicket-request-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:96)
>>> ~[wicket-request-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
>>> [wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
>>> [wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:138)
>>> [wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
>>> [wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
>>>   at
>>> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>>> [catalina.jar:7.0.12]
>>>   at
>>> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>>> [catalina.jar:7.0.12]
>>>   ..
>>> 
>>> 
>>> via jmx I could see that only 45 sessions were there
>>> and that the PeakNumberOfActiveRequests was also 45.
>>> 
>>> 
>>> Do you have any idea ?
>>> 
>>> François
>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>>> 
>> 
>> 
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com <http://jweekend.com/>
>> 
>> 
> 
> 
> -- 
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>

François Meillet
fm...@meillet.com




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



StoredResponsesMap

2011-05-23 Thread François Meillet
Hi Wicketers,

While I was doing some load testing with with a small prog using Apache 
httpclient  (45 threads, only the get requests were done)  

I got this error

17:59:22.086 ERROR ["http-bio-8080"-exec-1]   DefaultExceptionMapper -  108 - 
Unexpected error occurred
java.lang.NullPointerException: null
at 
org.apache.wicket.protocol.http.StoredResponsesMap$Value.access$000(StoredResponsesMap.java:37)
 ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.wicket.protocol.http.StoredResponsesMap.removeEldestEntry(StoredResponsesMap.java:73)
 ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
at java.util.LinkedHashMap.addEntry(LinkedHashMap.java:410) 
~[na:1.6.0_22]
at java.util.HashMap.put(HashMap.java:385) ~[na:1.6.0_22]
at 
org.apache.wicket.protocol.http.StoredResponsesMap.put(StoredResponsesMap.java:95)
 ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.wicket.protocol.http.WebApplication.storeBufferedResponse(WebApplication.java:723)
 ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.wicket.request.handler.render.WebPageRenderer.storeBufferedResponse(WebPageRenderer.java:73)
 ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:258)
 ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.wicket.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:139)
 ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:718)
 ~[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:63)
 ~[wicket-request-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:96)
 ~[wicket-request-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:212)
 [wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:253)
 [wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:138)
 [wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194) 
[wicket-core-1.5-RC4.2.jar:1.5-RC4.2]
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 [catalina.jar:7.0.12]
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 [catalina.jar:7.0.12]
..


via jmx I could see that only 45 sessions were there
and that the PeakNumberOfActiveRequests was also 45.


Do you have any idea ?

François  


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Killing threads in Application's onDestroy method

2011-05-18 Thread François Meillet
You should have a look at Terracotta Quartz, a very good scheduler.

François


Le 18 mai 2011 à 20:51, Henrique Boregio a écrit :

> Hi, in my Wicket Application class, I create a couple of thread that
> sleep most of the time..and come alive every one in a while to do some
> maintenance tasks.
> 
> I create them in the init() method of the Wicket Application...and
> call kill() on them in the onDestroy() method.
> 
> When I shutdown tomcat and restart it again (via the default .bat or
> .sh), I can see from my log files that some threads from the previuos
> deploy are still hanging around in memory.
> 
> Am I doing something wrong?
> 
> Many thanks.
> 
> -
> 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: Access to HttpServletResponse gone in 1.5?

2011-01-26 Thread François Meillet
with the 1.5 API you get

 WebResponse response = (WebResponse) getRequestCycle().getResponse();

François



Le 27 janv. 2011 à 01:15, Todd Wolff a écrit :

> Hi,
> 
> 
> 
> After migrating from 1.4.x to 1.5 RCI, I encountered only one breaking
> change.  I used to be able to access the servlet response object via:
> 
> 
> 
> getWebRequestCycle().getWebResponse().getHttpServletResponse();
> 
> 
> 
> But now, expected to be able to use:
> 
> 
> 
> ((ServletWebResponse)getResponse()).getHttpServletResponse();
> 
> 
> 
> But I get  a ClassCastException because ServletWebResponse is wrapped a
> couple of times, i.e. by BufferedWebResponse and then again by
> HeaderBufferingWebResponse.  And ... these wrapper classes do not
> provide an API to access the original wrapped response.  
> 
> 
> 
> How can I access HttpServletResponse?  I am using a third party library
> that requires the Java Servlet API request and response object.  Thanks.
> 
> 
> 
> 
> 

 




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: File upload with inner form and modal window

2010-12-07 Thread François Meillet
ublic void setFiles(List files) {
>  this.files = files;
>}
> 
>  }
> 
> }
> 
> *** UploadPanel.java
> public abstract class UploadPanel extends Panel {
> 
>  private final transient Logger logger = LoggerFactory.getLogger(getClass());
> 
>  public UploadPanel(String id) {
>super(id);
> 
>final FeedbackPanel feedbackPanel = new FeedbackPanel("feedback");
>add(feedbackPanel);
> 
>Form form = new Form("form");
>form.setMultiPart(true);
>add(form);
> 
>final FileUploadField uploadField = new
> FileUploadField("uploadField", new Model());
>form.add(uploadField);
> 
>form.add(new AjaxButton("submit") {
> 
>  @Override
>  protected void onSubmit(AjaxRequestTarget target,
> @SuppressWarnings("hiding") Form form) {
>FileUpload fileUpload = uploadField.getFileUpload();
>if (fileUpload != null) {
>  String fileName = fileUpload.getClientFileName();
>  logger.info("FILE: " + fileName);
>  UploadPanel.this.onSubmit(target, fileName);
>} else {
>  error("Unable to upload file.");
>  target.addComponent(feedbackPanel);
>}
>  }
> 
>  @Override
>  protected void onError(AjaxRequestTarget target,
> @SuppressWarnings("hiding") Form form) {
>target.addComponent(feedbackPanel);
>  }
> 
>});
> 
>  }
> 
>  protected abstract void onSubmit(AjaxRequestTarget target, String fileName);
> 
> }
> 
> 
> 
> 
> 
> 
> 2010/12/7 François Meillet :
>> it has to be in the main form afaik
>> François
>> 
>> Le 7 déc. 2010 à 20:27, Cédric Thiébault a écrit :
>> 
>>> I've done this in the modal window form... And I set it to false for
>>> the main form that is not used for uploading.
>>> The upload works well, it's when my modal is closed, the main form
>>> (not the one for the upload) throws an exception on submit.
>>> 
>>> Here is the code that I've attached to the Jira issue:
>>> http://dl.dropbox.com/u/2167784/wicket-modal-upload.zip
>>> 
>>> Cedric
>>> 
>>> 
>>> 2010/12/7 François Meillet :
>>>> just add
>>>> form.setMultiPart(true);
>>>> 
>>>> in your form
>>>> 
>>>> François
>>>> 
>>>> Le 7 déc. 2010 à 20:11, Cédric Thiébault a écrit :
>>>> 
>>>>> Hi,
>>>>> 
>>>>> I want to upload files with an Ajax form that is in a modal window
>>>>> (using a Panel, not a WebPage). The modal and its form are part of the
>>>>> main form:
>>>>> 
>>>>> main-page.html
>>>>> 
>>>>>  
>>>>>  
>>>>> 
>>>>> 
>>>>> upload-window.html
>>>>> 
>>>>>  
>>>>>  
>>>>> 
>>>>> 
>>>>> 
>>>>> I'm able to upload a file but once the modal is closed, when I submit
>>>>> the main form (not the one for uploading), I get an exception:
>>>>> 
>>>>> java.lang.IllegalStateException: ServletRequest does not contain
>>>>> multipart content. One possible solution is to explicitly call
>>>>> Form.setMultipart(true), Wicket tries its best to auto-detect
>>>>> multipart forms but there are certain situation where it cannot.
>>>>> at 
>>>>> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:113)
>>>>> at 
>>>>> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:83)
>>>>> at 
>>>>> org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:489)
>>>>> at 
>>>>> org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1708)
>>>>> at 
>>>>> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:886)
>>>>> at 
>>>>> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
>>>>> at 
>>>>> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
>>>>> at 
>>>>> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:300)
>&

Re: File upload with inner form and modal window

2010-12-07 Thread François Meillet
it has to be in the main form afaik
François

Le 7 déc. 2010 à 20:27, Cédric Thiébault a écrit :

> I've done this in the modal window form... And I set it to false for
> the main form that is not used for uploading.
> The upload works well, it's when my modal is closed, the main form
> (not the one for the upload) throws an exception on submit.
> 
> Here is the code that I've attached to the Jira issue:
> http://dl.dropbox.com/u/2167784/wicket-modal-upload.zip
> 
> Cedric
> 
> 
> 2010/12/7 François Meillet :
>> just add
>> form.setMultiPart(true);
>> 
>> in your form
>> 
>> François
>> 
>> Le 7 déc. 2010 à 20:11, Cédric Thiébault a écrit :
>> 
>>> Hi,
>>> 
>>> I want to upload files with an Ajax form that is in a modal window
>>> (using a Panel, not a WebPage). The modal and its form are part of the
>>> main form:
>>> 
>>> main-page.html
>>> 
>>>  
>>>  
>>> 
>>> 
>>> upload-window.html
>>> 
>>>  
>>>  
>>> 
>>> 
>>> 
>>> I'm able to upload a file but once the modal is closed, when I submit
>>> the main form (not the one for uploading), I get an exception:
>>> 
>>> java.lang.IllegalStateException: ServletRequest does not contain
>>> multipart content. One possible solution is to explicitly call
>>> Form.setMultipart(true), Wicket tries its best to auto-detect
>>> multipart forms but there are certain situation where it cannot.
>>> at 
>>> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:113)
>>> at 
>>> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:83)
>>> at 
>>> org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:489)
>>> at 
>>> org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1708)
>>> at 
>>> org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:886)
>>> at 
>>> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
>>> at 
>>> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
>>> at 
>>> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:300)
>>> at 
>>> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:142)
>>> at 
>>> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
>>> at 
>>> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
>>> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
>>> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
>>> at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
>>> at 
>>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
>>> at 
>>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
>>> 
>>> 
>>> I've created a JIRA issue with code example
>>> (https://issues.apache.org/jira/browse/WICKET-3236) but maybe I
>>> misunderstood something here...
>>> Any help would be appreciated ;-)
>>> 
>>> Thanks
>>> 
>>> Cedric
>>> 
>>> -
>>> 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
>> 
>> 
> 
> -
> 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: File upload with inner form and modal window

2010-12-07 Thread François Meillet
just add 
form.setMultiPart(true);

in your form

François

Le 7 déc. 2010 à 20:11, Cédric Thiébault a écrit :

> Hi,
> 
> I want to upload files with an Ajax form that is in a modal window
> (using a Panel, not a WebPage). The modal and its form are part of the
> main form:
> 
> main-page.html
> 
>  
>  
> 
> 
> upload-window.html
> 
>  
>  
> 
> 
> 
> I'm able to upload a file but once the modal is closed, when I submit
> the main form (not the one for uploading), I get an exception:
> 
> java.lang.IllegalStateException: ServletRequest does not contain
> multipart content. One possible solution is to explicitly call
> Form.setMultipart(true), Wicket tries its best to auto-detect
> multipart forms but there are certain situation where it cannot.
> at 
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:113)
> at 
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.(MultipartServletWebRequest.java:83)
> at 
> org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:489)
> at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1708)
> at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:886)
> at 
> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
> at 
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
> at 
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:300)
> at 
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:142)
> at 
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
> at 
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
> at 
> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
> at 
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
> 
> 
> I've created a JIRA issue with code example
> (https://issues.apache.org/jira/browse/WICKET-3236) but maybe I
> misunderstood something here...
> Any help would be appreciated ;-)
> 
> Thanks
> 
> Cedric
> 
> -
> 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



Scalability

2010-04-11 Thread François Meillet
Hi Wicketers,

1) I need to build a system which can perform
-6000 different users per day
and
-200 concurent users


The software used:

wicket
postgresql (mainly read operations)
hibernate
jms

At the beginning there will be 2 computers  (I prefer horizontal scalability).
What would be your advice for the hardware (hard drive will be 10.000 RPM).
-processor ?
-ram


2) Also I would appreciate your advice for the server:
I have the choice for the server: Tomcat + a JMS implementation like HornetQ, 
or Jboss Application Server. 
I hesitate between the 2 solutions, as I don't need EJBs, but we never know !!! 
. 

Have you any advice ?

Thanks 
François
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: ClassLoader (Serialization?) error

2010-03-12 Thread François Meillet
sounds like a classloading effect. 

Have a look to the classloader hierarchy

Here is a good doc:
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html

Especially this one : Resource Loading Order 
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html#wp1097288

François


Le 12 mars 2010 à 17:30, Igor Vaynberg a écrit :

> ive seen this once before on the list. also with weblogic i think.
> search the list.
> 
> -igor
> 
> On Fri, Mar 12, 2010 at 3:16 AM, Xavier López  wrote:
>> Hi,
>> 
>> From time to time I see the following error in my deployed application's
>> log. The application is running clustered on Weblogic 9.2 MP3.
>> 
>> It seems to be messing up with the classloading of class mypackage.MyClass
>> (this error comes up in many different classes). I can guess from the stack
>> trace that something is going wrong maybe serializing that page, it can be
>> seen that the class name is being messed with some content of the page (div
>> tags, text displayed in the page,...).
>> 
>> Has anyone been in this situation before ? Any tip on how to address the
>> issue ?
>> 
>> 2010-03-11 22:31:10,506 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for
>> queue: 'weblogic.kernel.Default (self-tuning)']
>> org.apache.wicket.request.target.resource.SharedResourceRequestTarget
>> 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133!
>> 1268343057...@192.168.131.142 - unable to lazily register shared resource
>> mypackage.MyClass%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id=
>> java.lang.ClassNotFoundException:
>> mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C
>>at
>> weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:289)
>>at
>> weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:262)
>>at
>> weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:54)
>>at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>>at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>>at
>> weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:161)
>>at
>> weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:35)
>>at
>> org.apache.wicket.application.DefaultClassResolver.resolveClass(DefaultClassResolver.java:103)
>>at
>> org.apache.wicket.request.target.resource.SharedResourceRequestTarget.respond(SharedResourceRequestTarget.java:149)
>>at
>> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
>>at
>> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1181)
>>at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
>>at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
>>at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
>>at
>> org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
>>at
>> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200)
>>at mypacakge.MyFilter.doFilter(ANetFilter.java:37)
>>at
>> weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
>>at
>> weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3242)
>>at
>> weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
>>at
>> weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
>>at
>> weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2010)
>>at
>> weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1916)
>>at
>> weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1366)
>>at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
>>at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
>> 2010-03-11 22:31:10,511 ERROR ap16_s1_IX_II [[ACTIVE] ExecuteThread: '2' for
>> queue: 'weblogic.kernel.Default (self-tuning)']
>> org.apache.wicket.request.target.resource.SharedResourceRequestTarget
>> 579910|vJS0LZhR01NKqxLWh6QbpWm77g3jHJ96Y4GYV6KB996NfHnHLb5t!-619140133!
>> 1268343057...@192.168.131.142 - shared resource
>> mypackage.MyClass-%20fi%20usuari%20--%3E%20%20%3C/div%3E%3Cdiv%20id= not
>> found
>> 
>> Thanks,
>> Xavier
>> 
> 
> -
> 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: Tomcat Deployment problem : adding CSS links have been modified ?

2010-02-22 Thread François Meillet
Hi Ashika,

have a look to 

http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html

François

Le 23 févr. 2010 à 07:47, Ashika Umanga Umagiliya a écrit :

> Hi friends,
> 
> Is there a way to configure this in Wicket?
> My client wants to add some static HTML pages by himself ,and it would be 
> difficult for him to add " "tag for every hyper-link.
> 
> thanks in advance.
> 
> 
>> Hi Ashika,
>> 
>> Give a try to this
>> 
>> 
>>  
>>  
>> 
>> 
>> 
>> 
>> François
>> 
>> Le 1 févr. 2010 à 05:59, Ashika Umanga Umagiliya a écrit :
>> 
>>  
>>> Greetings,
>>> 
>>> I've been developing my wicket application using maven+jetty and when I 
>>> deployed it in Tomcat , all the CSS styles were missing.
>>> I noticed that all the CSS links have been modified by the container(or 
>>> wicket?) and added the prefix "../"
>>> 
>>> Eg: In my pages I have:
>>> 
>>> 
>>> 
>>> 
>>> But in the page Tomcat serves ,it has:
>>> 
>>> 
>>> 
>>> 
>>> This works fine with Jetty ,what could be the problem?
>>> 
>>> thanks in advance
>>> 
>>> 
>>> -
>>> 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
>> 
>>  
> 

 




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Tomcat Deployment problem : adding CSS links have been modified ?

2010-01-31 Thread François Meillet
Hi Ashika,

Give a try to this








François

Le 1 févr. 2010 à 05:59, Ashika Umanga Umagiliya a écrit :

> Greetings,
> 
> I've been developing my wicket application using maven+jetty and when I 
> deployed it in Tomcat , all the CSS styles were missing.
> I noticed that all the CSS links have been modified by the container(or 
> wicket?) and added the prefix "../"
> 
> Eg: In my pages I have:
> 
> 
> 
> 
> But in the page Tomcat serves ,it has:
> 
> 
> 
> 
> This works fine with Jetty ,what could be the problem?
> 
> thanks in advance
> 
> 
> -
> 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: images not under the context root directory

2010-01-28 Thread François Meillet
ption e) {
>>> //TODO: do this properly
>>> return null;
>>> }
>>> }
>>> 
>>> public File getFolder() {
>>> return folder;
>>> }
>>> }
>>> /**
>>> * @return Folder from where images will be retrieved.
>>> */
>>> protected abstract Folder getFolder();
>>> /**
>>> * @return the URL to mount the dynamic WEB resource.e.g.
>>> */
>>> protected abstract String getMountPoint();
>>> public Image createImage(String id, final String imageName) {
>>> if(dynamicResource == null)
>>> dynamicResource = new ImageFromFolderWebResource(getFolder(),
>>> getMountPoint());
>>> return new Image(id) {
>>> private static final long serialVersionUID = 1L;
>>> 
>>> @Override
>>> protected void onBeforeRender() {
>>> String path = WebRequestCycle.get().getRequest().getURL();
>>> path = path.substring(0, path.indexOf('/'));
>>> add(new AttributeModifier("src",true, new
>>> Model("/"+path+"/"+getMountPoint()+"?name="+imageName)));
>>> super.onBeforeRender();
>>> }
>>> };
>>> }
>>> }
>>> 
>>> 2- Create a test page.
>>> 
>>> import org.apache.wicket.markup.html.WebPage;
>>> import org.apache.wicket.markup.html.image.Image;
>>> import org.apache.wicket.util.file.Folder;
>>> 
>>> /**
>>> * @author  Ernesto Reinaldo Barreiro (reier...@gmail.com)
>>> *
>>> */
>>> public class TestPage extends WebPage {
>>> 
>>> private static final MountedImageFactory IMAGE_FACTORY = new
>>> MountedImageFactory() {
>>> @Override
>>> protected Folder getFolder() {
>>> return new Folder("C:/temp/images");
>>> }
>>> @Override
>>> protected String getMountPoint() {
>>> return "test";
>>> }
>>> };
>>> /**
>>> *
>>> */
>>> public TestPage() {
>>> Image img = IMAGE_FACTORY.createImage("img", "test.png");
>>> add(img);
>>> }
>>> }
>>> 
>>> and the HTML markup
>>> 
>>> 
>>> 
>>> 
>>>   
>>> 
>>> 
>>> 
>>> 3- If you place a "test.png" on your "C:/temp/images" then you should be
>>> able to see the image when you hit the page.
>>> 
>>> Hope you can adapt this to your needs?
>>> 
>>> Regards,
>>> 
>>> Ernesto
>>> 
>>> 2010/1/27 François Meillet 
>>> 
>>>> Thank for yours posts.
>>>> I try the solutions, but  I can't figure out how to serve images as
>>> static
>>>> images.
>>>> F.
>>>> 
>>>> Le 27 janv. 2010 à 16:10, Thomas Kappler a écrit :
>>>> 
>>>>> On 01/27/10 15:57, Jonas wrote:
>>>>>> Have you tried the following:
>>>>>> 
>>>>>> WebComponent image = new WebComponent("someWicketId");
>>>>>> image.add(new SimpleAttributeModifier("src", "http://.jpg";));
>>>>>> add(image);
>>>>>> 
>>>>>> with markup
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> that should work just fine...
>>>>>> 
>>>>>> if you cannot hardcode the image url, you can use the following
>>>>>> instead of SimpleAttributeModifier
>>>>>> image.add(new AttributeModifier("src", true new
>>>>>> AbstractReadOnlyModel() {
>>>>>>public String getObject() {
>>>>>>String url = ... (fetch the image url from anywhere else)
>>>>>>// e.g. '/xxx//image893748.png'
>>>>>>return url;
>>>>>>}
>>>>>> ));
>>>>> 
>>>>> Or, maybe a bit nicer, encapsulate it into a component and let the
>> URI
>>>> come from a Model, as usual in Wicket:
>>>>> 
>>>>> class ExternalImageUri
>>>>> extends WebComponent
>>>>> {
>>>>>  public ExternalImageUri(String id, IModel uri)
>>>>>  {
>>>>>  super(id, uri);
>>>>>  add(ne

Re: images not under the context root directory

2010-01-27 Thread François Meillet
Thank for yours posts.
I try the solutions, but  I can't figure out how to serve images as static 
images.
F.

Le 27 janv. 2010 à 16:10, Thomas Kappler a écrit :

> On 01/27/10 15:57, Jonas wrote:
>> Have you tried the following:
>> 
>> WebComponent image = new WebComponent("someWicketId");
>> image.add(new SimpleAttributeModifier("src", "http://.jpg";));
>> add(image);
>> 
>> with markup
>> 
>> 
>> 
>> 
>> that should work just fine...
>> 
>> if you cannot hardcode the image url, you can use the following
>> instead of SimpleAttributeModifier
>> image.add(new AttributeModifier("src", true new
>> AbstractReadOnlyModel() {
>> public String getObject() {
>> String url = ... (fetch the image url from anywhere else)
>> // e.g. '/xxx//image893748.png'
>> return url;
>> }
>> ));
> 
> Or, maybe a bit nicer, encapsulate it into a component and let the URI come 
> from a Model, as usual in Wicket:
> 
> class ExternalImageUri
> extends WebComponent
> {
>   public ExternalImageUri(String id, IModel uri)
>   {
>   super(id, uri);
>   add(new AttributeModifier("src", true, uri));
>   }
>   
>   @Override
>   protected void onComponentTag(ComponentTag tag)
>   {
>   super.onComponentTag(tag);
>   checkComponentTag(tag, "img");
>   }
> }
> 
> 
> This in the Wiki at 
> http://cwiki.apache.org/WICKET/how-to-load-an-external-image.html.
> 
> 
> -- Thomas
> 
> 
>> 2010/1/27 François Meillet:
>>> Hi Wicketers,
>>> 
>>> I have a directory, /xxx/images with uploaded images, which is not under 
>>> the application context root directory.
>>> How can I serve them as static images ?
>>> 
>>> I tried the StaticImage class I found in the forum 
>>> (http://old.nabble.com/Plain-IMG-src-urls-td21547371.html#a21547543 )
>>> but it doesn't work for me. It just work if the image files are under the 
>>> context root directory.
>>> 
>>> Thanks for your help.
>>> 
>>> François
>>> 
>>> 
>>> 
>>> 
>>> -
>>> 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
>> 
> 
> 
> -- 
> -------
>  Thomas Kapplerthomas.kapp...@isb-sib.ch
>  Swiss Institute of Bioinformatics Tel: +41 22 379 51 89
>  CMU, rue Michel Servet 1
>  1211 Geneve 4
>  Switzerland  http://www.uniprot.org
> ---
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

François Meillet
fm...@meillet.com




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



images not under the context root directory

2010-01-27 Thread François Meillet
Hi Wicketers,

I have a directory, /xxx/images with uploaded images, which is not under the 
application context root directory.
How can I serve them as static images ?

I tried the StaticImage class I found in the forum 
(http://old.nabble.com/Plain-IMG-src-urls-td21547371.html#a21547543 )
but it doesn't work for me. It just work if the image files are under the 
context root directory.

Thanks for your help. 

François 




-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org