Jetty vs. Tomcat?

Hi,
I was wondering, is there any difference from programmer's point of view between Jetty and
Tomcat as servlet containers? We have an IIS server here, and that's not likely to change any time
soon, unless for major reasons. I've written servlets with Tomcat, but I don't know what is it like
to use Jetty - since it hasn't been installed yet. (As you might have guessed I don't hold the
needed administrative rights:)
So I'm just curious, how are these two different for me to use, as a programmer?
I didn't manage to find resources on this on the web, though there must be something, somewhere, no?
Is there some other servlet container I should consider?
Matilda
(greetings from Finland!)

Ok, thanks for your reply!
So the only visible difference is which API I can use. I found
a couple of discussions on their relative performance, and there
indeed seems to be plenty of opinions around. However there will
be only a couple of hundred hits on our servlets a month, so I would
imagine either would perform well enough.
Matilda

Similar Messages

  • Weblogic 10.0 Problems with stripes/struts

    When trying to deploy the sample application for the stripes framework on weblogic 10.0 I get the following error when deploying.
    <Dec 3, 2009 12:16:51 PM CET> <Error> <HTTP> <BEA-101165>
    <Could not load user defined filter in web.xml:
    net.sourceforge.stripes.controller.StripesFilter.net.sourceforge.stripes.exception.StripesRuntimeException:
    Problem instantiating default configuration objects.I actually had to switch to using the Sun JDK to get this error. JRockit does not report it, and just fails when I try to use the application. The problem appear to be weblogic 10.0 specific. No problems with jetty or tomcat, and I've heard reports that it is resolved in weblogic 10.3. Have ayone come accross similar problems when using stripes/struts on weblogic 10.0, and found a solution to this? Is there a patch available for 10.0 than fix this?
    Regards
    Morten
    PS: I have ommited the complete stack trace, since it is monstrously huge.

    Guess I was wrong in thinking that this was an isolated weblogic 10.0 problem. I just downloaded weblogic 10.3 and tried to deploy the same application there, and the same error happened.
    <03.des.2009 kl 15.12 CET> <Error> <HTTP> <BEA-101165>
    <Could not load user defined filter in web.xml:
    net.sourceforge.stripes.controller.StripesFilter.net.sourceforge.stripes.exception.StripesRuntimeException:
    Problem instantiating default configuration objects.
            at net.sourceforge.stripes.config.DefaultConfiguration.init(DefaultConfiguration.java:220)
            at net.sourceforge.stripes.config.RuntimeConfiguration.init(RuntimeConfiguration.java:272)
            at net.sourceforge.stripes.controller.StripesFilter.init(StripesFilter.java:125)
            at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:329)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
            Truncated. see log file for complete stacktrace
    java.lang.NullPointerException
            at java.io.FilterInputStream.read(FilterInputStream.java:116)
            at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
            at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
            at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
            at java.io.InputStreamReader.read(InputStreamReader.java:167)
            Truncated. see log file for complete stacktraceSo is there anyone out there with experience with struts/stripes, that can tell why this does not work? If you need to try this yourself, you can download the stripes sample application here:
    http://sourceforge.net/projects/stripes/files/stripes/Stripes%201.5.2/stripes-1.5.2.zip/download
    There is an example WAR called "stripes-examples.war" in the zip that is ready to be deployed.
    Regards
    Morten
    PS: you still need to start weblogic with Sun JDK rather than JRockit to get the error. With JRockit the application simply fails when used.

  • Axis2 Client encoding message problem

    Hi Experts,
    I developed an application (EAR + WEB + LIB) acting as a Webservice proxy for a healthcare service. Abap calls my proxyservice which then calls the other service. This application is developed as maven2 project with axis2 and dependent lib to be used in any servletcontainer.
    Deploying the proxyserver on a Jetty or Tomcat works fine, all the SOAP messages are transferred like expected (including Faults and Umlauts)
    Deploying the proxyserver an a Netweaver CE 7.1 system also works but there are two issues and i cannot find the reason:
    1.) When my proxyserver gets the answer from the healthcare service, the SOAP Response holds a correctly encoded UTF-8 String with german Umlaut (ÜÖÄ...), but my generated Webservice Stub always gets a "null" instead of the german Umlaut. Debugging into the generated Stub and even into the Axis Sourcecode shows me that the Soap request seems to be incorrect when it arraves at the axis sourcecode, so i think something between Axis and the CE 7.1 Server is doing wrong.
    I loked also in NetWeaver Administrator and can see that classloading works as expected.
    2.) When my proxyserver gets a SOAP Fault from the healthcare service it arrives without the Fault details.
    Both issues look to me as if there is a software layer between my Axis2 Servlet and the underlying Server doing something with my http requests/responses.
    Does anybody know how i could proceed?
    Regards
    Michael

    thanks for the response.
    I was using Axis2 1.2 and Rampart 1.2
    I got it partially working.
    I got rid of the Sign.xml and used Auth.xml only in my webservice.
    Axis2 was generating the wrong namespace for most of my parameter Bean classes...I had to modify those by hand. I was able to finally access about 90% of my webservice methods but a few still threw the error 'unable to parse incoming request'.
    I thought moving to Axis2 1.3 might fix the namespace issue but then that requires Rampart 1.3
    I gave up...Clientgen just works, without all of these problems. I would like to provide a client solution for my customers that is not dependent upon BEA weblogic.jar, but Axis2 does not work with WS-Policy enabled webservice running on BEA.

  • Mangled file downloads over http problem in 10g

    I have a web app running in an OC4J stand alone 10.1.3.3 and am having a problem with downloading files over http. Its a struts2 app whose file downloading impl is easy to use and standard code for writing to an http servlet response output stream.
    Using the firefox plugin for Live Headers I can see that the headers are correctly added to the servlet response and I do get the file I want. However the file has been mangled with binary output around the text. This is the case for txt, word, or any other file.
    This problem does not occur in Jetty or Tomcat. I've also ruled out file corruption while going in/out of the database since I can upload a file when running oc4j, turn off oc4j, start up my app in Jetty and retrieve the same file just fine.
    The mime types are all accounted for and the problem exists regardless if I use a specific content type or just application/download. My browsers (firefox and ie) also recognize all files from the content disposition value "attachment; filename=myfilename.ext". Its just the file content that some how has been wrecked on the way out of the container.
    Has anyone experienced this? I only found one or two unanswered posts elsewhere.
    How can this be mitigated?
    Thanks in advance.
    Andrew

    Figured it out when I realized it was in fact the data coming from the database that was corrupt. There were some older posts on the hibernate website that pointed to a single property that needs to go in the hibernate.properties file: hibernate.jdbc.use_streams_for_binary=true. Without it, Oracle returns the Blob locator consistently 86 bytes in length and therefore bad binary.

  • Compiling Enterprise JavaBeans and Its Interfaces

    I've downloaded j2sdk1.4.1_02 and can't compile any code that imports
    javax.servlet.* and javax.servlet.http.*
    The install ZIP file has a JAVAX directory but no SERVLET or SERVLET.HTTP subdirectory.
    What's the going on? Am I missing some isoteric point? Shouldn't the JAVAX contain SERVLET and SERVLET.HTTP stuff?

    That's just the base SDK. If you want J2EE, you either need to get the J2EE reference implementation or a J2EE-compliant container. Several have been suggested on this forum: Tomcat, JBoss (JETTY or Tomcat), Orion, etc.
    J2EE is not part of the default package.

  • Wanted: Recommendations for Oracle/Java Web Hosting

    I'd like to make some Java/JSTL servlets that access an oracle database.
    Can someone recommend a hosting service?
    I'm most familiar with the open source products like JBoss and Jetty and tomcat.
    Thanks
    Siegfried

    You know Oracle is wickedly expensive, right? Expect a yearly license fee of 5000 or even 80000 dollars just to be allowed to use it for commercial purposes, price depending on what you're going to do with it and on what kind of hardware it is going to run on.
    Other than that: nobody can recommend you where you should be throwing your money at. Perform research yourself and if you're stuck choosing between different options provide them here and perhaps someone will have an opinion on it (likely not though).

  • Javax.servlet.forward.request_uri

    Hi!
    I'm trying to track down reasons why I'm getting unexpected results for:
    HttpServletReqeust.getRequestURI()
    The results are different on Sun 7.0.3 compared with Jetty and Tomcat.
    Todd

    web server error log stack trace should point you with enough information as to why the behavior is different. also, if you are going to be developing with 7.0 , you could check out this feature -
    http://blogs.sun.com/kmeduri/entry/exception_stack_instead_of_server
    af course, if you can share a sample code which shows the change in behavior , we will be happy to chime in appropriately

  • Using the SAF client from the wlfullclient.jar in Tomcat or Jetty?

    I'm trying to use the SAF client in Tomcat and Jetty and if I use the wlfullclient.jar I get the following error when I start the application:
              java.lang.InternalError: error initializing kernel caused by: java.lang.AssertionError: Duplicate initialization of WorkManager
              If I use the "thin" client jars everything works fine. Unfortunately I need to be able to use the full client in some cases. Is there some way to get this to work or is there a conflict between the Weblogic classes and the other Servlet containers?
              Edited by mhellkamp at 08/30/2007 3:42 PM

    I believe the conflict here is with the Tomcat/Jetty WorkManager. I don't think the client was inteneded to run insides another container. That's why you're getting that error of duplicate initialization of WorkManager.
              Why not replace the Tomcat/Jetty with another WebLogic instance? :)

  • Tomcat doesn't send all data while Jetty does

    I am using the following code in a servlet to send data back to a J2ME application:
            data = myResp.serialize();
            response.setStatus(response.SC_OK);
            response.setContentLength(data.length);
            response.setContentType("application/octet-stream");
            OutputStream os = response.getOutputStream();
            os.write(data);
            os.flush();
            os.close();
                   .and the following input code on the J2ME side (simplified a bit):
            int len = (int)conn.getLength();
            in = conn.openInputStream();
            _data = new byte[len];
            while (total < len) {
              total += in.read(_data, total, len - total);
                   .Using Jetty as the servlet container, I am able to SEND and RECEIVE data without any problem. Using Tomcat, I usually get a -1 on the CLIENT side when trying to read the data. The CLIENT gets the length from the content header but there doesn't seem to be any data.
    Simply put, what is wrong ? Is there a setting in Tomcat that I should look at ? Why would Jetty work with this code and not Tomcat ? This seems like simple standard stuff.
    Thanks
    =Alan=

    You should never explicitly close the ServletOutputSteam. The J2EE container will do that for you. You can still do the flush, but try it without the close.

  • Ubunto with Tomcat, Jetty or Resin for BlazeDS?

    Tomcat, Jetty or Resin?
    I'm just getting started with BlazeDS and would kindly appreciate anyone's user experiences on the following:
    1. Choice of Linux: Ubuntu?
    2. Choice of Java App Server: Tomcat, Jetty or Resin? (I'm looking most of all for stability with BlazeDS, then Ease of Use for IDE such as NetBeans, and lastly but not least, free open source).
    Also, is MySQL the preferred standard in this case, or is PostgresSQL ?
    Thanks much,
    Robert

    I'm running BlazeDS happily on Ubuntu 9 (Intrepid) with stock Tomcat6. The only 'gotcha' currently is inability to use native Tomcat libs together with SSL - there is a bug in the lib which effectively causes Tomcat to hang on startup. It is already fixed in the next release AFAIK.
    Your choice of SQL server does not really matter as far as BlazeDS is concerned. We use Postgres and I would recommend it for any serious application.

  • Tomcat , Jetty , Glassfis deployment problem

    Hello
    I've deployed my app in those servers and i can get response from them if I use http://localhost:8080/test/test or http://127.0.0.1/test/test but i get a 404 http error when i try calling with my ip or my network name e.g. http://172.16.77.104/test/test or http://dan/test/test
    is there a configuration i;ve missed ?

    georgemc wrote:
    sabre150 wrote:
    jipada wrote:
    Hello
    I've deployed my app in those servers and i can get response from them if I use http://localhost:8080/test/test or http://127.0.0.1/test/test but i get a 404 http error when i try calling with my ip or my network name e.g. http://172.16.77.104/test/test or http://dan/test/test
    is there a configuration i;ve missed ?
    You seem to have missed the fact that you have configured the servers to respond to port 8080 and not port 80 (which is the assumed default if you don't specify a port in the URL). Though, it is difficult to see how both of these can work http://localhost:8080/test/test or http://127.0.0.1/test/test .
    That would result in a connection being refused, rather than a 404 thoughTrue. One needs clarification from the OP on the obvious 'port' problem.

  • Jetty not working on firefox

    I have a .js file that is part of a web-application. The web application is deployed on tomcat. This .js file in turn calls a .html file deployed on jetty. This .html file is responsible for starting the cometd service, but when i run my web-app, firefox throws an abort message for this particular request. Also this is the first request that im sending to jetty.
    Strangely enough, when i paste the URL of that particular .html file(or its parent servlet) on my address bar in a new session, the URL gets loaded and when i start my web-app, firefox throws a successful 200 on that page(on seeing from firebug).
    This is a one client operation, this behaviour(of successful 200 on that page) persists for that particular client as long as firefox is not re-installed. Therefore, my web app loads that very page successfully for the client that has loaded that url explicitly from the address bar and I do not have to load that page from the address bar again till i do not re-install my browser.
    Can anyone explain what information is passed to the client such that it stays for that client even on deleting temporary internet files/cookies/browser restart/system reboot but not on browser re-install?
    Also, if possible, can anyone suggest a proper approach to follow so that i do not have to perform this work-around to get that page loaded on every client that uses my web-app?

    I'm curious what you mean about Firefox throwing an abort message. This is not a time-out or error from the server, but Firefox is itself terminating the request?
    Is it a cross-domain request? Some users have discovered that offsite resources such as style sheets will not load until they have visited the server directly. This sounds like some kind of filtering, but in the threads I participated in, we didn't uncover the actual cause of it.

  • How can I build and Debug Tomcat 5.5 under Eclipse?

    http://jakarta.apache.org/tomcat/tomcat-5.5-doc/building.html
    I am doing some rearch on Tomcat and want to build and debug Tomcat5.5 under Eclipse. Originally tomcat is built with ANT, it downloads all components from different CVS and build them together.
    I'd like to import Tomcat Source code (only the core components, such as catalina and Coyota, Jasper) and build them with Eclipse Bilder, so I can debug it as a normal JAVA program under DEGUB-View.
    Who has such experience and help me? I havd built Jetty under Eclipse, but Tomcat is much more complex.

    Help

  • Jboss/tomcat mapping configuration error

    I can't even get the combination to serve a .jsp file or .html file. Regardless of the URL that I attempt, I only get a No Context configured to process this request error from tomcat and INFO [Engine] StandardHost[localhost]: MAPPING configuration error for request URI from JBoss. I've tried to access all of the various webapps under the catalina directory and can't get to any of them. I know that catalina is started because the log file shows
    <Service name="JBoss-Tomcat">
    <Engine name="MainEngine" defaultHost="localhost">
    <Logger className="org.jboss.web.catalina.Log4jLogger" verbosityLevel="trace" category="org.jboss.web.localhost.Engine" />
    <Host name="localhost">
    <Valve className="org.apache.catalina.valves.AccessLogValve" prefix="localhost_access" suffix=".log" pattern="common" directory="../server/default/log" />
    <DefaultContext cookies="true" crossContext="true" override="true" />
    </Host>
    </Engine>
    <!-- A HTTP Connector on port 8080 -->
    <Connector className="org.apache.catalina.connector.http.HttpConnector" port="8080" minProcessors="3" maxProcessors="10" enableLookups="true" acceptCount="10" debug="0" connectionTimeout="60000" />
    </Service>
    </Server> in jboss.web:service=EmbeddedCatalinaSX
    2002-06-12 23:29:44,760 INFO [org.jboss.web.catalina.EmbeddedCatalinaServiceSX] Creating
    2002-06-12 23:29:44,760 INFO [org.jboss.web.catalina.EmbeddedCatalinaServiceSX] Created
    2002-06-12 23:29:44,760 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying tomcat4-service.xml
    2002-06-12 23:29:44,760 DEBUG [org.jboss.deployment.MainDeployer] start step for deployment file:/D:/JBoss3.0/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/tomcat4-service.xml
    2002-06-12 23:29:44,760 DEBUG [org.jboss.deployment.SARDeployer] Deploying SAR, start step: url file:/D:/JBoss3.0/jboss-3.0.0_tomcat-4.0.3/server/default/deploy/tomcat4-service.xml
    2002-06-12 23:29:44,760 INFO [org.jboss.web.catalina.EmbeddedCatalinaServiceSX] Starting
    2002-06-12 23:29:44,760 INFO [org.jboss.deployment.MainDeployer] Adding deployer: org.jboss.web.catalina.EmbeddedCatalinaServiceSX@7dadcd
    2002-06-12 23:29:44,760 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaServiceSX] Setting catalina debug level to: 0
    2002-06-12 23:29:44,760 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaServiceSX] Setting catalina.home to: ../catalina
    2002-06-12 23:29:44,760 DEBUG [org.jboss.web.catalina.EmbeddedCatalinaServiceSX] Setting catalina.base to: ../catalina
    with no errors. I'm confused because I was able to consistently work with previous versions of JBoss with no problem. The configuration seems to have changed radically, is this some recent change that I just can't find a reference to? Thanks for any help.

    Hi
    For Tomcat 3.x you need to use one of the following options:
    (Note: this is with JBoss/Tomcat OR JBoss/Jetty)
    Place you .war files in the following location:
    C:\jboss-3.0.3\server\default\deploy and the app is automatically available.
    If my app's name is DavidOnline.war, when deployed, I can access it at
    http://localhost:8080/DavidOnline..
    OR
    Copy your entire development directory to the deploy direction above, RENAME your
    directory from say C:\JspApps to C:\JspApps.war and you can work from that location and see your changes immeadiatly.
    There is a file called jboss-service.xml that has some config options, also for the Tomcat bundle there is a file named tomcat-service.xml that has the standard server.xml section.. I suggest you check out the JBoss website, free docs and forums.. http://www.jboss.org.
    Thanks, Hope this helps.

  • Delay in AJP Connector jBoss/TomCat Solaris 10

    I have:
    - IIS 6, Windows 2003 Server on dual PIII with jk 1.2.15 installed and working
    - Solaris 10 on Sun E420R with Quad Processors with jBoss / Tomcat version 4.0.3SP1
    There is a significant delay in page loading that occurs randomly (every 10-20 clicks) which lasts for 10-18 or so seconds.
    I've traced it to the read method in ChannelSocket.java. The delay always occurs while receive() is reading the header portion of the message. The length of the header that the read is trying to read is 4 bytes. The call to BufferedInputStream will block until it gets these 4 bytes of the header (10-18 seconds). I've modified the code and put a call in to available() before and after the read. The before returns 0 and the after returns 1138 or so.
    I've tried every imaginable combination of configs on the IIS side to get around the problem ... and then some kernel TCP/IP configs on the Solaris side ... too many to list here.
    The problem seems to be isolated to Solaris ... because Linux, XP, Windows 2003 server all work without this problem.
    My question is this ... is there any thing that I can configure to have this read return faster? Changes to the Solaris kernel ... some config parameter ... ?? Anyone experience this before?
    I'll gladly list the things I've tried to get some idea of how to solve this.
    I think ultimately this is my problem: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4479751
    Thanks in advance!

    Hi
    For Tomcat 3.x you need to use one of the following options:
    (Note: this is with JBoss/Tomcat OR JBoss/Jetty)
    Place you .war files in the following location:
    C:\jboss-3.0.3\server\default\deploy and the app is automatically available.
    If my app's name is DavidOnline.war, when deployed, I can access it at
    http://localhost:8080/DavidOnline..
    OR
    Copy your entire development directory to the deploy direction above, RENAME your
    directory from say C:\JspApps to C:\JspApps.war and you can work from that location and see your changes immeadiatly.
    There is a file called jboss-service.xml that has some config options, also for the Tomcat bundle there is a file named tomcat-service.xml that has the standard server.xml section.. I suggest you check out the JBoss website, free docs and forums.. http://www.jboss.org.
    Thanks, Hope this helps.

Maybe you are looking for