Re: [jetty-users] Jetty Block IP based on visits

2011-12-05 Thread Thomas Becker
Hi Cheney, jetty doesn't support this out of the box, no. But you can deal with it yourself by for example writing a custom handler (http://wiki.eclipse.org/Jetty/Howto/Write_Jetty_Handler) which counts the requests per IP per hour/day and respond with an error page if the configured limit

[jetty-users] Default error handling in jetty

2011-12-05 Thread Stefan Magnus Landrø
Hi there, Whenever webapps deployed to jetty fail, one gets the message from the exception set in the status line: stefan landro@mac-stefanl:~/tmp $ wget -S http://localhost:8080/test --2011-12-05 09:02:05-- http://localhost:8080/test Resolving localhost... 127.0.0.1, ::1, fe80::1 Connecting to

Re: [jetty-users] Jetty Block IP based on visits

2011-12-05 Thread Stefan Magnus Landrø
If you prefer servlet filters to jetty handlers, you could of course use that instead. Btw, users coming from behind an http proxy often use the same ip address. In addition, these same proxies often use several ip addresses. Cheers, Stefan On 5 December 2011 09:33, Thomas Becker

Re: [jetty-users] Jetty Block IP based on visits

2011-12-05 Thread Jan Bartel
Xin, You should start with Jetty's QosFilter (Quality of Service filter): http://wiki.eclipse.org/Jetty/Reference/QoSFilter regards Jan On 5 December 2011 17:57, Xin Chen xche...@allette.com.au wrote: Hi, Can you Jetty do this? Specifying the maximum request e.g. 1000 per day or per hour,

Re: [jetty-users] Jetty Block IP based on visits

2011-12-05 Thread Xin Chen
Hi Jan, Thanks for sharing this - didn't know Jetty can do so many things. I have a bit read and this is more suitable when servers can't handle big amount of requests and want to pick some for priority processing. In our case, is some IP consumed huge bandwidth from our server/datacenter,

[jetty-users] Using OpenJPA in embedded Jetty, cannot find persistence.xml

2011-12-05 Thread Amaltas
Hi, I am using embedded jetty and the directory structure of the executable jar file is: /com/myproject/frontend/FrontendMain.java /com/myproject/frontend/servlets/HelloServlet.java /WEB-INF/classes/META-INF/persistence.xml /libs/*.jar The Main-Class is com.myproject.frontend.FrontendMain. I set

Re: [jetty-users] Logging Custom Handlers JUL

2011-12-05 Thread Alan Williamson (aw2.0 cloud experts)
Joakim, i am trying to integrate the custom logger into jetty, but for some reason i can't get it to work. Let me give you where i am thus far. I have followed your instructions here. My custom handler does indeed get all the logging that Jetty itself kicks out. I am able to confirm

Re: [jetty-users] Using OpenJPA in embedded Jetty, cannot find persistence.xml

2011-12-05 Thread Jan Bartel
Amaltas, Jetty itself doesn't find or read the persistence.xml file, that's something that is done by the jpa. I think maybe the jpa is expecting to find the persistence file inside a jar file, so have you tried putting it inside a jar file in WEB-INF/lib? If that doesn't work, then you might