Adv. of using apache with tomcat??

can anyone pl tell me the advantages of using Apache with Tomcat in comarison to other web servers?
Thanks

The biggest advantages are that they are open source, so you don't have to pay a huge licence fee, and they are very stable. I don't know how they compare for speed - I know Apache is lightning when it comes to serving flat pages, there are no benchmarks yet for the new Tomcat because it was only released last monday. You can run them on linux or another unix variant, so they are more likely to be secure (windows servers are horrendously open to attack) and stable.

Similar Messages

  • Integrating Apache with Tomcat?

    Anyone have a guide to integrating Apache with Tomcat using mod_jk?
    I followed some guides online, but they all seem really dated with some obscure references. This seems like it should be on the top of the list....

    Hi Alan.
    I've discovered the exact same problem.... 0.0.0.0 instead of 127.0.0.1
    You've obviously not had any replys here, but di you end up working it out on your own?

  • Apache with Tomcat cluster

    Hi, I integrated Apache with Tomcat Cluster on Windows 2000. I instalated mod_jk2.dll, created workers2.properties and configurated server.xml in Tomcat instances. If I try to reach my .jsp file, e.g. http://localhost/root/main.jsp, I get follow message from Tomcat: source root/main.jsp is not available. What�s wrong? Can anybody help me? Apache version: 2.0.47, Tomcat: 1.4.27

    Well, the first order of business is to determine exactly where main.jsp is located. If it is at <CATALINA_HOME>/webapps/main.jsp, then it should be at http://localhost:8080/main.jsp. Bypass Apache and verify that you can get to the Tomcat specific pages first.
    Basically, we're trying to determine a) the correct URL and b) whether the problem is with Tomcat itself, or with the connections between Apache and Tomcat.
    Essentially, we can't tell you where your configuration is incorrect until you tell us what your configuration is. :)

  • Apache with Tomcat and dispatcher class.

    I have a MVC design set up with a controller and dispatcher class. I am trynig to forward the results to a specific JSP. If I run the design completely within Tomcat, then everything works great. I have a tomcat site set up called /jsp. My servlet is within the jsp site. So if I do http://localhost:8080/jsp/mypage.jsp it will bring up the page fine. I then submit to and action of /myservlet?action=test. The servlet/dispatcher classes process and forward the request to "/jsp/mypage_result.jsp". All is fine and dandy.
    However, when I try to run this through Apache first let the MOD_JK2 send the JSP/servlet requests to Tomcat the dispatcher doesn't work. I alway get the ERROR 404 page within tomcat (see note 1 below). Even if I use a "./mypage_result.jsp", because the pages are in the same directory, I still the get the error. Can anyone help?
    What I think is happening is that when I make the inital request of http://localhost/jsp/mypage.jsp the request gets sent to Tomcat from Apache. Tomcat processes the jsp page and displays the result to the client. The user submits the data to the servlet (through Apache which pushes it to Tomcat). The servlet/dispatcher code runs and then gets ready to forward the request on. Where I get confused or I am completely guessing is that when the forward method gets called. Does it forward the request on as a HTTP request or as a request within Tomcat? I would guess it is an http request and the request comes in through Apache which (depending on the worker2.properties file) will or will not forward the request to Tomcat. This is where the problem happens. On this forward in the dispatcher class.
    Please help.
    NOTE 1:
    HTTP Status 404 - /mypage_result.jsp
    type Status report
    message /mypage_result.jsp
    description The requested resource (/mypage_result.jsp) is not available.
    Apache Tomcat/4.1.24

    After reading the documentation for the getRequestDispatcher method it seems that the file you are forwarding to must be in the same context. Well if it is in the same context within Tomcat, does it mean it is the same when I am trying to use Apache?
    Anyone out there go this to work?
    Thank you in advance for reading my post.

  • Tomcat vs Apache with Tomcat connectors (mod/jk)

    Is there any advantage (security, performance etc.) of running a Java web application on Apache HTTP Server with Tomcat Connectors (mod/jk) rather than directly running it on Tomcat.

    This question is already answered, see here:
    http://tomcat.apache.org/faq/connectors.html
    Also for Tomcat/ Apache related questions, post them to the relevant mailing lists.

  • How to use JMS with tomcat and Axis

    Hello
    I'm new in ii, so i'm still a little bit lost. I have been implementing web services with tomcat and Axis. However, these services are synchronous and I would like that some services were asynchronous.
    I've been reading about the topic and I've found that JMS is a good solution for it. I have already downloaded JMS in my computer but now I don't know what else to do. I've been trying to run the SimpleQueueSender.java example but I get the error:
    JNDI API lookup failed: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    But I have attached all .jar from F:\Sun\MessageQueue\lib
    In addition to this, for my first webservices I used the Java2WSDL, WSDL2Java and AdminClient (axis tool) to create my web services bindings, stubs and skeletons and to deploy the web service on the server. Do I have to use them now with JMS? or now the deployment must be performed in a different way?
    Thank you in advanced,

    The error means that you have to specify the type and location of your jndi store. You could create a jndi.properties file and put two properties in it:
    java.naming.provider.url=file\\\:////var/jndi
    java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
    for a file based jndi store. Then you have to make sure your jndi.properties file is in your CLASSPATH. Then you have to use something like imqadmin to create your jndi store and store in it your administrative objects like Queues and QueueConnectionFactories.

  • Using Eclipse with Tomcat

    I'm trying to get eclipse to work correctly with tomcat server. but when i create a project it creates it in my workspace folder and i can't run it on the server.
    I assume it has to create the project in the tomcat root directory in order for it to run properly but i don't know how to get eclipse to do this.
    Any help would be appreciated.

    What I use to do is
    File -> Export -> War File and it generates a war file. You set that war file in the webapps directory of tomcat and it self extracts the files in order to be used from the navigator

  • Is it possible to use Apache with load-balancer ?

    Hello,
    I'd like to know if it's possible to set up a load-balancing solution made of: Apache Web Server + Hardware Load Balancer+ Cluster of Weblogic Nodes.
    In the documents I see Apache server is used only with the HTTP Proxy plugin. But I'd like to use the hardware load balancer to ditribute load to Weblogic nodes.
    Is it possible to do it ?
    Thanks
    Francesco

    Hi,
    The configuration you are talking about is possible. All the information is here http://edocs.bea.com/wls/docs81/cluster/load_balancing.html#1026240 , and here http://edocs.bea.com/wls/docs81/cluster/bigip.html#618892
    Regards,
    LG

  • Use JSTL with Tomcat 4.1.x

    Hi,
    I've had a look at various tutorials and documentation and must be missing something obvious.
    I haven't been using them before so what do I need to add to Tomcat to make it work.
    So far I've put a JSP file in with this:
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <c:redirect url="welcome.html"/>
    When I run it I get this error:
    org.apache.jasper.JasperException: This absolute uri (http://java.sun.com/jstl/core) cannot be resolved in either web.xml or the jar files deployed with this application
    I expect I have to put a JAR or a TLD file somewhere. If so, could someone tell me what and where.
    Thanks

    Download the source from the link that you got the jar from. The tld's are in there. What I do is put the tld's in a tld folder in WEB-INF. Then I change the web.xml file to reflect this.
    <taglib>
        <taglib-uri>/tags/core</taglib-uri>
        <taglib-location>/WEB-INF/tld/c.tld</taglib-location>
    </taglib>Then I change the uri to point to the tld's on my server instead of sun's server in my jsp, like this:
    <%@ taglib uri="/tags/core" prefix="c" %>it points to the uri in my web xml

  • Using Apache with WebLogic Portal

    Hi,
    I had a small test WebLogic system working, and just started configuring an Apache server to frontend it, using the WebLogic Apache plugin to connect the two machines.
    I did the httpd.conf configurations indicated in BEA's documentation, including the <Location /weblogic>, etc., and I was finally able to get it all working. But, to do this, I found that I had to copy the /features and /images directories from the WebLogic machine to under the /htdocs directory on my Apache machine, and I was wondering if this was "normal" (i.e., was that the correct thing to do)?
    Thanks in advance,
    Jim

    hoos,
    When I read your msg, I wasn't sure 'where' you meant to try the "/app.portal*".
    The Plugin documentation doesn't mention using a wildcard ("*") at all, but I figured I'd try it, and VOILA, it now works.
    FYI, here's what I have in my httpd.conf:
    # Re-route all /weblogic URLs to the WebLogic Portal via the Apache Plugin
    <Location /weblogic>
    SetHandler weblogic-handler
    PathTrim /weblogic
    </Location>
    # Re-route all /app.portal* URLs (all URLs that start with '/app.portal' or '/app.portal...') to the WebLogic Portal via the Apache Plugin
    <Location /app.portal*>
    SetHandler weblogic-handler
    </Location>
    The URL I use to get to my portal initially is:
    https://jim.foo.com/weblogic
    Thanks for your help! I'll be posting this in the other thread, just for completeness.
    Jim

  • ClassCastException using HttpsURLConnection with Tomcat 4.1.27

    Hi,
    I try to open an SSL connection using HttpsURLConnection that works fine with a standalone application (see code fragment):
    import javax.net.ssl.HttpsURLConnection;
    import java.net.*;
    import java.io.*;
    URL website = new URL( "https://aSampleSSLSite" );
    HttpsURLConnection connection = ( HttpsURLConnection ) website.openConnection();
    Using the same code in Tomcat 4.1.27 and Struts 1.1 throws a java.lang.ClassCastException while trying to use website.openConnection().
    What is the difference?

    Hi,
    I'm using JDK 1.4.2 and haven't installed JSSE separately at all. Actually I really use javax.net.ssl.HttpsURLConnection. However, I tried com.sun.net.ssl.HttpsURLConnection as well and got a 'java.net.SocketException: Default SSL context init failed' instead of.
    Oddly enough the code works fine in a standalone application.

  • Using ADF with Tomcat - A total beginner, lost

    Hi all,
    I am a complete beginner in Java using jDevaloper and java for web. I have being a desktop programmer. So I followed the jdeveloper tutorial Developing Rich Web Applications With Oracle ADF up to here . The small deference in my project is that it uses a mySQL database. When I tried to Run the project the Java SE crashed and the weblogic domain was not built. I tried many methods mentioned in the web but the Java keeps on crashing. I tried using both bundled JDK and JDK avilable in my machine but the crash continuous. So I decided to use tomcat.
    So I have came up to creating the .war file. But when I started the tomcat I got this error;
    SEVERE: Error configuring application listener of class oracle.adf.mbean.share.config.ADFConfigLifeCycleCallBack
    I have gone out of choices. How should I correct this.
    Thanks [Dana Singleterry|https://blogs.oracle.com/dana/entry/how_to_deploy_a_11g_adf_applic_1] , [Terry Cho|http://javamaster.wordpress.com/category/java-programming/] and many others for their knowledge sharing.

    hi manjulapra
    manjulapra wrote:
    ... So I decided to use tomcat. ...The "Application Servers " section of the "Certification and Support Matrix " for "Oracle JDeveloper and Application Development Framework 11g Release 2 "
    at http://www.oracle.com/technetwork/developer-tools/jdev/jdev11gr2-cert-405181.html#Application_Servers
    currently has for "Tomcat 6 " and "ADF " the value "Not Supported ".
    regards
    Jan Vervecken

  • Problem when using Logger with Tomcat and eclipse

    Hi, Iam using Tomcat 5.5.7 and my IDE is eclipse.Iam using java.util.logging.Logger class for logging.Iam putting the properties file in Appname/WEB-INF directory.The properties file is not identified.The error Iam getting is Error initialising log file java.lang.NullPointerException and java.io.FileNot FoundException
    The content of my logging.properties file is
    java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level=SEVERE java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
    java.util.logging.FileHandler.level=ALL java.util.logging.FileHandler.pattern=%h/javalogs%u.log java.util.logging.FileHandler.append=true java.util.logging.FileHandler.count=1
    My servlet is
    import java.io.*;
    import java.util.logging.*;
    import java.util.logging.Logger;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorldServlet extends HttpServlet
          public void init(ServletConfig config) throws ServletException
               try
                         String file=getServletConfig().getInitParameter("java.util.logging.config.file");
                        InputStream is = getServletContext().getResourceAsStream(file);
                        LogManager.getLogManager().reset();
                          LogManager.getLogManager().readConfiguration(is);
               catch(Exception e)
                    System.out.println("Error initialising log file"+e);
          public void doGet (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException 
                   final Logger fLogger =
                 Logger.getLogger(HelloWorldServlet.class.getName());
                 PrintWriter  out; 
                 String title = "Simple Servlet Output";
                // set content type and other response header fields first                                   
                // then write the data of the response
                 response.setContentType("text/html");
                 fLogger.finest("this is finest");
                 fLogger.finer("this is finer");
                 fLogger.fine("this is fine");
                 fLogger.config("this is config");
                 fLogger.info("this is info");
                 fLogger.warning("this is a warning");
                 fLogger.severe("this is severe");
                 out = response.getWriter();
                out.println("<P>This is output from SimpleServlet!!!!!!!!.");  
    }My web.xml file is
    <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
      <servlet>
        <init-param>
         <param-name>java.util.logging.config.file</param-name>
         <param-value>/WEB-INF/classes/logging1.properties</param-value>
        </init-param>
        <servlet-name>HelloServlet</servlet-name>
        <servlet-class>HelloWorldServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>HelloServlet</servlet-name>
        <url-pattern>/hello</url-pattern>
      </servlet-mapping>
    </web-app>Can anybody help me out.

    Hi, Iam using Tomcat 5.5.7 and my IDE is eclipse.Iam using java.util.logging.Logger class for logging.Iam putting the properties file in Appname/WEB-INF directory.The properties file is not identified.The error Iam getting is Error initialising log file java.lang.NullPointerException and java.io.FileNot FoundException
    The content of my logging.properties file is
    java.util.logging.ConsoleHandler java.util.logging.ConsoleHandler.level=SEVERE java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter
    java.util.logging.FileHandler.level=ALL java.util.logging.FileHandler.pattern=%h/javalogs%u.log java.util.logging.FileHandler.append=true java.util.logging.FileHandler.count=1
    My servlet is
    import java.io.*;
    import java.util.logging.*;
    import java.util.logging.Logger;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorldServlet extends HttpServlet
          public void init(ServletConfig config) throws ServletException
               try
                         String file=getServletConfig().getInitParameter("java.util.logging.config.file");
                        InputStream is = getServletContext().getResourceAsStream(file);
                        LogManager.getLogManager().reset();
                          LogManager.getLogManager().readConfiguration(is);
               catch(Exception e)
                    System.out.println("Error initialising log file"+e);
          public void doGet (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException 
                   final Logger fLogger =
                 Logger.getLogger(HelloWorldServlet.class.getName());
                 PrintWriter  out; 
                 String title = "Simple Servlet Output";
                // set content type and other response header fields first                                   
                // then write the data of the response
                 response.setContentType("text/html");
                 fLogger.finest("this is finest");
                 fLogger.finer("this is finer");
                 fLogger.fine("this is fine");
                 fLogger.config("this is config");
                 fLogger.info("this is info");
                 fLogger.warning("this is a warning");
                 fLogger.severe("this is severe");
                 out = response.getWriter();
                out.println("<P>This is output from SimpleServlet!!!!!!!!.");  
    }My web.xml file is
    <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
      "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
      <servlet>
        <init-param>
         <param-name>java.util.logging.config.file</param-name>
         <param-value>/WEB-INF/classes/logging1.properties</param-value>
        </init-param>
        <servlet-name>HelloServlet</servlet-name>
        <servlet-class>HelloWorldServlet</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>HelloServlet</servlet-name>
        <url-pattern>/hello</url-pattern>
      </servlet-mapping>
    </web-app>Can anybody help me out.

  • Using JavaMail with Tomcat and JNDI

    I have a web application and I want to make use of JNDI Mail Sessions for sending email in my Web Appln.
    I am using Tomcat4.0.1
    In my server.xml file I declared a resource as follows:
    <Resource name="mail/Session" auth="Container" type="javax.mail.Session"/>
    <ResourceParams name="mail/Session">
         <parameter>
         <name>mail.smtp.host</name>
         <value>mail.abc.com</value>
         </parameter>
    </ResourceParams>
    Now Inside my jsp/servlet code i can use something like this:=
    // Acquire our JavaMail session object
    Context initCtx = new InitialContext();
    Context envCtx = (Context) initCtx.lookup("java:comp/env");
    Session session = (Session) envCtx.lookup("mail/Session");
    // Prepare our mail message
    Message message = new MimeMessage(session);
    message.setFrom(new InternetAddress(from));
    InternetAddress dests[] = new InternetAddress[]
    { new InternetAddress(to) };
    message.setRecipients(Message.RecipientType.TO, dests);
    message.setSubject(subject);
    message.setContent(content, "text/plain");
    // Send our mail message
    Transport.send(message);
    But my smtp mail provider uses Authentication.
    So I am looking of some way wherein I can provide the user and password information in the server.xml file itself along with smtp provider.
    My Query is How to do this as i dont see any references for using JavaMail sessions using Authentication
    Any Help highly appreciated
    Thanks
    Raj

    Isnt there anyone who can answer this question or its not a question worthwile
    Awaiting reply
    ...

  • Discussion on Apache with Apaphe Tomcat

    I am doing some research on the pros and cons of
    either using Apache with Apaphe Tomcat on a live production server
    or
    Apaphe Tomcat on its own on a live server.
    Anyone knows any urls to some documentation on the subject
    Con (Apache with Apaphe Tomcat)
    I personally feel that Apaphe Tomcat on its own is a better sollution
    because the OS will use more memory to run both application (Apache with Apaphe Tomcat) simultanuesly.

    I've heard on many occasions that Apache can serve static content (html) faster than Tomcat. So if you are not concerned with Java the you'd be better off with just Apache. Tomcats main focus is to serve dynamic Java content, it just so happens that it can serve static content as well.
    here is one link,
    http://www.theserverside.com/discussions/thread.tss?thread_id=38472

Maybe you are looking for

  • Problems printing with OS X10.4.8 Intel on Xerox 7300N

    Hi, I'm Andrea from Italy, I'm new on this forum and I hope someone could help me to resolve this problem. My iMac Core 2 Duo doesn't print on my Xerox 7300N (and on other printer as Xeikon or Ricoh) from all sw of Adobe CS2, from Macromedia Freehand

  • TS1381 t, y, u, i and o keys stopped working..

    However they work at random times.. Studdenly they work then get stuck again and refuse to work.. is it a hardware issue?

  • How to turn off Open Directory?

    How do I turn off Open Directory? In Server Admin.app, if I uncheck the Open Directory service and click 'save', it re-checks itself on.

  • PSD to Jpeg

    I had a saved PSD file and I opened it to edit it. I flattened it and hit save by mistake. How can I go back to PSD if all the "step back" is not going all the way back to PSD? Thanks

  • Creating separate online shop layouts for mobile

    Is there any way to create separate shop layouts (catalogue.html, small_product.html, large_product.html, etc) for use on a mobile site. I want to limit some of the information posted to the mobile site--e.g., eliminate custom tags used in large prod