Search Results

Search found 367 results on 15 pages for 'jetty'.

Page 5/15 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Connection reset SQLException with jetty

    - by robinmag
    Hi, I've switched my webserver from tomcat to jetty and encounter a "java.sql.SQLException: Io exception: Connection reset" when back from idle time (eg. i go out for a while) :( This issue doesn't appear when i use tomcat. Does it come from jetty or i've done something wrong ? Thank you!

    Read the article

  • Webdevelopment with Jetty & Maven

    - by Phuong Nguyen de ManCity fan
    I find it very frustrating doing web development with Maven & Jetty using Eclipse, compare with what I did using Visual Studio. Everytime I make a change, even a minor change in my view file, (*.jsp, for example), then I have to re-package the whole web - waiting for jetty to reload everything before I can see the change. Is there any better way to do that, some thing like an automatically plugin that will picked that changed files and deploy the changed files to web server?

    Read the article

  • Jetty: How to write to access logs

    - by mdemmitt
    Hi all, In my Java servlet code, I want to be able to programatically write to the jetty access log. I am aware that jetty will automatically log every incoming HTTP request to the access log. However, my servlet needs to occasionally append it's own line to the access log. Has anyone here done something similar? Thanks!

    Read the article

  • Jetty embedded: How to run the same config as with `mvn jetty:run-exploded`?

    - by Ondra Žižka
    Hi, I'd like to have the same Jetty server configuration, created programatically. When I run mvn jetty:run-exploded, my app works fine. When I run it from my code, the static content is not loaded. I know that I have to add a static content Servlet, so I tried: Server server = new Server(8080); Context ctx = new Context( server, "/", Context.SESSIONS ); DefaultServlet defaultServlet = new DefaultServlet(); ServletHolder defaultSH = new ServletHolder( defaultServlet ); defaultSH.setInitParameter( "resourceBase", "./"); ctx.addServlet( defaultSH, "/img" ); ctx.addServlet( defaultSH, "/css" ); ctx.addServlet( defaultSH, "/js" ); I am assuming that the pwd is in the webapp's "root", i.e. where the WEB-INF dir is. This does not work. Anyway. Is somewhere a clean block of pure Java code which will give me the exact same server config as the mvn jetty:run-explodeds default? Thanks for help, Ondra

    Read the article

  • Jetty 6 - QueuedThreadPool versus ThreadPool

    - by Walter White
    Hi all, I am using Jetty 6 and was wondering when the QueuedThreadPool should be used over the ThreadPool? By default, Jetty 6 comes configured with the QueuedThreadPool. My server has Java 6 installed so I was thinking that I should use the ThreadPool: <New class="org.mortbay.thread.QueuedThreadPool"> <Set name="minThreads">10</Set> <Set name="maxThreads">200</Set> <Set name="lowThreads">20</Set> <Set name="SpawnOrShrinkAt">2</Set> </New> <New class="org.mortbay.thread.concurrent.ThreadPool"> <Set name="corePoolSize">50</Set> <Set name="maximumPoolSize">50</Set> </New> Thanks, Walter

    Read the article

  • Wicket app in embedded Jetty causes UnsupportedClassVersionError

    - by Ondra Žižka
    I've tried to run a Wicket app in an embedded Jetty, using this code: public static void main( String[] args ){ Server server = new Server(8080); Context root = new Context( server, "/", Context.SESSIONS ); FilterHolder filterHolder = new FilterHolder( new WicketFilter() ); filterHolder.getInitParameters().put("applicationClassName", cz.dw.test.WicketApplication.class.getName() ); root.addFilter( filterHolder, "/*" , Handler.ALL ); try { server.start(); } catch (Exception ex) { ex.printStackTrace(); } } But I got java.lang.UnsupportedClassVersionError: Bad version number in .class file. Switching the target class version for my app (1.6 - 1.5) did not help. I use Sun JDK 1.6.0_17, Wicket 1.4.8, Jetty 6.1.24. I tried to debug, but the JRE classes have no debug data. The stacktrace is of no use as it happens when loading the classes into JVM. Any ideas what could be wrong? How can I find which class is causing this? Thanks, Ondra

    Read the article

  • Jetty with a custom JUL logger

    - by Alan Williamson
    I feel this should be easier, or I am missing something obvious. I am trying to use our custom JUL logging library with Jetty. No matter where I put the JAR file for the custom logger, it is not found. I have tried the usual suspects; /lib/, /lib/ext/, /WEB-INF/lib/ and even manually added it to the classpath. 2011-06-29 15:27:34.518::INFO: Started [email protected]:8080 Can't load log handler "net.aw20.logshot.client.LogShotHandler" java.lang.ClassNotFoundException: net.aw20.logshot.client.LogShotHandler java.lang.ClassNotFoundException: net.aw20.logshot.client.LogShotHandler at java.net.URLClassLoader$1.run(URLClassLoader.java:217) I am starting up Jetty using "-jar start.jar" technique. Searching around, I have spotted a couple of threads that talk about this problem, but with no resolution. Or if there was, they didn't answer with their solution. Can anyone help on this front? Thanks

    Read the article

  • Setup Jetty 7 with JSP engine

    - by Justin
    I've been trying to get Jetty to run my web app via a custom launcher (embedded). I am trying to figure out how to tell Jetty which java compiler to use for JSPs. I want to do what java -jar start.jar -OPTIONS=jsp does, but without using start.jar. Here is what shows on the console: Javac exception, Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK Do I need to put the javac libraries into my classpath?

    Read the article

  • Jetty and Access Denied

    - by Laurent
    Hello, I am using several libraries in a maven project and one of these libraries is Jetty (6.1.18). It is a mandatory dependency for an another library. If I run my application from eclipse, with the eclipse classpath which is set by the maven eclipse plugin, all works. However, if I generate a one jar with dependencies and then I run my application from this jar, I get the following exception : Exception in thread "main" java.lang.ExceptionInInitializerError at org.mortbay.jetty.nio.SelectChannelConnector.<init>(SelectChannelConnector.java:70) ... Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission org.mortbay.io.nio.JVMBUG_THRESHHOLD read) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323) at java.security.AccessController.checkPermission(AccessController.java:546) at java.lang.SecurityManager.checkPermission(SecurityManager.java:532) at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285) at java.lang.System.getProperty(System.java:650) at java.lang.Integer.getInteger(Integer.java:865) at java.lang.Integer.getInteger(Integer.java:823) at org.mortbay.io.nio.SelectorManager.<clinit>(SelectorManager.java:47) ... 27 more I think it is due to a file which is overridden by an another with the same name when the one jar is built but I have no idea where to look for. Does someone has an idea ?

    Read the article

  • maven dependencies and jetty - avoiding deploy

    - by James Cooper
    Hi, I have a project with 3 artifacts: common - entities, business logic. no UI code webapp-a - a public web app webapp-b - an admin web app webapp-a and webapp-b depend on common. common is configured to deploy to a local maven repo. so far so good. I have IntelliJ configured so that each artifact is a separate module. Module dependencies are configured properly. I can add a new method to a class in common and immediately use that method in a class in a webapp. However, when I run mvn jetty:run it uses the currently deployed common snapshot in my repository. It does not use my local classes. If I add a method to a class in common, it compiles fine, but blows up at runtime. So is it possible to either: a) Convince jetty:run to use my local common build output or b) Deploy my common output to my local ~/.m2/repo while I'm testing locally before I want to commit/deploy or c) some other solution? thank you! -- James

    Read the article

  • Google AppEngine + Local JUnit Tests + Jersey framework + Embedded Jetty

    - by xamde
    I use Google Appengine for Java (GAE/J). On top, I use the Jersey REST-framework. Now i want to run local JUnit tests. The test sets up the local GAE development environment ( http://code.google.com/appengine/docs/java/tools/localunittesting.html ), launches an embedded Jetty server, and then fires requests to the server via HTTP and checks responses. Unfortunately, the Jersey/Jetty combo spawns new threads. GAE expects only one thread to run. In the end, I end up having either no datstore inside the Jersey-resources or multiple, having different datastore. As a workaround I initialise the GAE local env only once, put it in a static variable and inside the GAE resource I add many checks (This threads has no dev env? Re-use the static one). And these checks should of course only run inside JUnit tests.. (which I asked before: "How can I find out if code is running inside a JUnit test or not?" - I'm not allowed to post the link directly here :-|)

    Read the article

  • Using HTTP Pipelining with Jetty HTTPClient

    - by jrogi
    I'm trying to figure out how to use HTTPClient (org.eclipse.jetty.client.HttpClient) so it will pipeline HTTP Request. I've tried to create some HttpExchange instances and applying the send() method for each, in an asynchronous mode, but each HTTP request has waited for it response before the next request was sent. Can you please supply a code snippet for this case?

    Read the article

  • Installation of Jetty into Eclipse

    - by Claus Jørgensen
    Hi I've had Jetty recommended as a good container for fast and simple development, in my case, Java Server Faces. I wish to use it with my Eclipse IDE (Version: 3.4.1), but quite frankly, can't figure out how. I've tried various outdated plugins, only with large amounts of errors in return, so I'm hoping someone could guide me from downloading the right version to installing it, and being able to press "RUN", and see a simple Hello World in JSP/JSF work. Cheers.

    Read the article

  • Deploy a jar in Jetty

    - by Dimitri
    Hi guys, I was wondering if is it possible to deploy a jar file in Jetty? If not, are there applications servers who can do so? I am beginner. I am asking this question because all the docs that i have found, it seems that we can only deploy war archive in application servers. Is that true?

    Read the article

  • JSP page is not getting reflected in Jetty

    - by [email protected]
    I am using Jetty web server, and while loading JSP page, its getting loaded from cache and not from the server. my updated jsp page is not getting reflected. I was deleted my file and checked out from CVS also. There is no use, the same result came again. What will be the reason ? Thanks in advance.

    Read the article

  • Spring MVC and Jetty: Prevent jsessionid from being used in RedirectView on redirect to external sit

    - by Moritz Both
    In Spring MVC 2.5 with Jetty - probably with any servlet container -, I want to redirect to an external site using RedirectView via the magic "redirect:" prefix for the view name in ModelAndView. Unfortunately, RedirectView uses response.encodeURL(), so my (otherwiese wanted) session id is appended to the URL. It is not only a security risk to carry the session id to the external site, the ";jsessionid=gagnbaba" string may also be interpreted as part of the ContextPath/PathInfo on the other site, resulting in a bad URL. Any "springish" options other than implement my own ExternalRedirectView... and also hack the ViewResolver to interpret a "externalRedirect:" prefix? (Requiring cookies is not an option.) Moritz

    Read the article

  • JBoss Seam - Jetty - Virtualhosting

    - by Walter White
    Hi all, I am trying to cutback on the memory usage of my server and would like to optimize the architecture. I currently deploy 2 separate web applications to Jetty 6.1.22 that correspond to different virtualhosts. They have pretty much the same application stack except one has fewer components and are styled differently (content, images, css, etc.). If I change my design pattern over to EJB / EAR + 2 WARS embedded, will that lower the memory consumption? Will that give me a single instance of JBoss Seam, Quartz, and all of my components? They must use a different datasource. Thanks, Walter

    Read the article

  • Grails 1.2.1 with Spring 3.0.0 dependency problem under Jetty

    - by archer
    Just moved to Grails 1.2.1 (used 1.1.1 before). Changed application.properties, ran grails upgrade, fixed BuildConfig and Bootstrap - everything works just fine from grails console. However, getting a problem when deploy packaged war under jetty 6.1.22: 1581 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NoSuchMethodError: org.codehaus.groovy.grails.commons.spring.ReloadAwareAutowireCapableBeanFactory.setParameterNameDiscoverer(Lorg/springframework/core/ParameterNameDiscoverer;)V My project is built with maven2. I researched the war dependencies and see that both spring 2.5.6 and 3.0.0.RELEASE are used there. I then tried to suppress use of spring 2.5.6 and got a problem with Acegi plugin (using version 0.5.1): 2010-03-10 21:06:56.440:WARN::Nested in org.springframework.beans.factory.access.BootstrapException: Error executing bootstraps; nested exception is java.lang.NoSuchMethodError: org.springframework.web.context.ConfigurableWebApplicationContext.setId(Ljava/lang/String;)V Any help would be greatly appreciated.

    Read the article

  • Get MAC address from Jetty HTTPServletRequest

    - by Chris Thompson
    Hi all, Does anybody know if there is a way to get the sender's MAC address from an HTTPServletRequest in Jetty? (Note: by sender, I mean immediate sender aka the last hop before my server). If there isn't a direct way, does anybody know a way to translate an IP address to a MAC address in Java? Other note: I completely realize that MAC addresses do not leave the local subnet, and that's the intended functionality. I know this seems like an odd question, but trust me, I know what I'm doing :-) If you're curious, I'd be happy to explain why I want this. Thanks, Chris

    Read the article

  • Find hosted directories Jetty/Apache

    - by Paul Creasey
    Hi, Let say I have a directory which is being hosted by Jetty or Apache (i'd like an answer for both), i know the URL including the port and i can log into the server. How can i find the directory that is being hosted by a certain port? I'd also like to go the other way, i have a folder on the server, which i know if being hosted, but i don't know the port so i can't find it in a web browser. How can i find a list of directories that are being hosted? This has been bugging me for ages but i've never bothered to ask before! Thanks.

    Read the article

  • In Jetty, can NCSARequestLog be configured to auto-detect the time zone?

    - by David Moles
    It looks as though in 2003 or so NCSARequestLog would pick up the system time zone using TimeZone.getDefault().getID(), but in more recent versions it seems as though it's hard-coded to GMT, unless you override it in jetty.xml or programmatically. If true, this kind of annoying, since it means if you don't want GMT logging you have to edit jetty.xml for every installation (not to mention twice a year for daylight saving time). Is there a workaround that will let Jetty pick the time zone up from the system? (X-posted to Stack Overflow.)

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >