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. :)

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?

  • 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.

  • 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.

  • 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.

  • Integrating Web server (eg Apache) with the application server

    I am thinking a project in which I use more static HTML files than JSPs. One way is to use an Apache server to display those HTML files (it should be faster), and deploy the JSPs into the J2EE server; another way is just simple to change the web container�s port to 80 (of the PE 8), and wrap all the files into a war file and deploy it into the application server.
    So can someone advise my which way is better? And if I use the first one, I�d like to know if it is the same way to integrate Apache with Tomcat.
    Thank you very much!

    In the past there has been a belief that the Apache web server serves static content faster than tomcat. Site managers would configure apache to deliver static content and integrate a web container to handle the dynamic content. I believe this argument is losing steam as tomcat gets better. I guess the only way you will know for sure is to deploy your application in PE 8.0 and then in an apache/web container configuration and do some benchmarking. I have no such benchmark data to compare and I base my comments on what I have read in newsgroups over the past months. Personally, I would opt for the app server only setup just to ease configuration. Others may have a different opinion.

  • Do we need appache and ssl work together with tomcat

    Hi all,
    I have experience use tomcate+ sql2000 +JDK to develop and web search site.  Now I hope somebody told me
    1) do I need add apache with tomcat?
    2) do I need to add SSL?
    thank you every much

    Hi all,
    I download mod_jk 1.2.5_2.0.47.dll from (http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/win32/) rname it as mod_jk.dll and put it down to apache modules, at this step I still get Syntax Ok when I try c:\apache|apache2\bin|Apache.exe -t. but when I add
    <Listener className="org.apache.ajp.tomcat5.config.ApacheConfig" modJk="c:/Apache/Apache2/modules/mod_jk.dll" /> just below the
    <Server port="8005" shutdown="SHUTDOWN" debug="0">
    I can't not star my tomcat.
    what is wrong??
    I have apache 2.0.50 and tomcat 5.0.25 on my Pc and before I add apache my tomcat work fine.
    Thank you

  • Problems configuring XSQL with Tomcat

    Having a lot of trouble getting this to work with tomcat standalone, apache with tomcat, and even apache with resin. (I have successfully gotten this to work with resin as both web and appserver.)
    I have tried to be meticulous in following the directions, but one thing that is throwing me is that I can't find the web.xml file in my xdk distribution (neither in xdk8i nor xdk9i); I've attempted to create the .xsql extension-to-servlet mapping myself in Tomcat's web.xml file, but maybe I got this wrong.
    The main symptom is that my xsql pages are basically being returned to me in the browser. Any help would be appreciated.

    Bacically you need to create yourself, and here is an example:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE web-app
    PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
    "http://java.sun.com/j2ee/dtds/web-app_2.2.dtd">
    <web-app>
    <servlet>
    <servlet-name>
    WebCounter
    </servlet-name>
    <servlet-class>
    FAQAnswerServlet
    </servlet-class>
    </servlet>
    <servlet>
    <servlet-name>
    oraclexsql
    </servlet-name>
    <servlet-class>
    oracle.xml.xsql.XSQLServlet
    </servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>
    oraclexsql
    </servlet-name>
    <url-pattern>
    *.xsql
    </url-pattern>
    </servlet-mapping>
    </web-app>
    null

  • Setting tomcat cluster with F5 device, not working

    Hi. I have 2 servers each with tomcat 5.0.28 on them, I am trying to set up a cluster but when i do as the instructions say in tomcat clustering references, the server which has the apache on it after i change the server.xml files you can't log onto the browser gives error 503 couldn't connect on port 80.
    I have left the server.xml files the same on each server as i thought it should be fine if 2 tomcats on different servers. Except i changed the mcastAddress to the same on both which is the IP of the main server. Is this right?
    So i am not sure if there is something preventing it from working on the F5 device? I have been at this co. for 3 months and nobody seems to know anything about this so i have to figure it all out myself.
    Please if anyone knows anything or why this might not be working please help!
    Thanks!

    I have WPA-Personal setup on my Linksys WRT54GS router and enter password normally when connecting to home network. It works just like connecting any pc to my home network.
    And it is really fast. Even walked out in the back yard and signal was still strong.
    thanks

  • Right problem with apache and tomcat

    Bonjour;
    I use a user login "apache" to stop/start Apache and tomcat. Because never launching apache et tomcat as root.
    But I have the following problem with apache (file error.log) :
    [Tue May  6 17:26:22 2003] [error] Connection "warpConnection" cannot connect
    [Tue May  6 17:26:22 2003] [error] Cannot open connection "warpConnection"
    [Tue May  6 17:27:01 2003] [error] Re-Trying to deploy connections
    As root the error msg does'nt exists (lost)
    Best regards;
    A+;

    Run it from the shell to see whats wrong:
    # httpd

  • Apache integrates with Tomcat

    Hi, we have Apache 1.3.19 intergrated with Tomcat 3.2.2 using mod_jk.
    When we checked with the mod_jk.log file, the file size is very large for just turning on it for 5 days. And the contents of this file are repeating the following two lines:
    [jk_uri_worker_map.c (185)]: In jk_uri_worker_map_t::uri_worker_map_free, NULL parameters
    [jk_uri_worker_map.c (335)]: jk_uri_worker_map_t::uri_worker_map_close, NULL parameter
    Can somebody tell me what this two lines mean? The whole file is full of this two lines, nothing else.
    Thanks so much in advance.

    It's just logging from the Apache module which handles the protocol between the web server and the servlet container. Chances are your mod_jk configuration has its logging set higher than you want it -- if it is set to "DEBUG", try turning it down (or off, if you desire).
    Good luck,
    -Derek

  • Client authentication with apache+mod_ssl+tomcat

    Hello.
    My question is a little bit off topic.
    I try to read client certificates with request.getAttribute("javax.servlet.request.X509Certificate"), but the result is always null.
    Probably it's null because I have nothing on the session. So my tomcat does not have the certificate. I use apache + mod_ssl + mod_jk + tomcat.
    And here is my question: how did you configured apache and tomcat so that tomcat has the client cert ?
    Thanks.

    usually u generate a keystore for client, and mention that in ur SSL connector of tomcat
    in apache, we need to configure things in ssl.conf

  • Apache with JServ or Tomcat?

    What�s your preferences in relation with JSP web server: Apache with JServ module (or another want you considerer better) or Jakarta-tomcat?
    I have used both, but I don�t know exactly which one I should use in my new job.
    Thank you everybody and good luck!

    JServ, while fine in its time, is now outdated and will not be updated. If you want to use any features added to the JSP or Servlet API's in recent years, you need to use Tomcat.

  • 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

  • Apache + 2 Tomcats session replication problem.

    Greetings everyone.
    Before stating the problem, let me explain how my environment is set.
    I have two machines. One (PC1) running Apache (HTTP server 2.0.58)
    and one instance of Tomcat (5.0.28) and another machine (PC2) with
    another instance of Tomcat(5.0.28).
    The Apache server
    It is configured to handle static content, to redirect dynamic content to a
    Tomcat instance through AJP 1.3 connector.
    This process is done through the mod_jk and the workers.properties
    The workers.properties file is configured to have sticky_session = True
    so it assigns a SESSION_ID to the same Tomcat it was first assigned.
    The workers.properties file is configured to have
    sticky_session_force = True so if the Tomcat the SESSION_ID was
    assigned is not available, the server answers with a 500 error.
    The Tomcat servers
    Both have only the AJP 1.3 connector enabled
    Both have the Cluster tag from the server.xml file uncommented
    and the useDirtyFlag flag set to false, for not to allow SESSION
    replication between Tomcats.
    The workers.properties file
    workers.apache_log=C:/Apache2/logs
    workers.tomcat_home=C:/Tomcat5
    workers.java_home=C:/j2sdk1.4.2_13
    ps=/
    #Defining workers -----------------------------
    worker.list=balancer,jkstatus
    #Defining balancer ---------------------------
    worker.balancer.type=lb
    worker.balancer.balance_workers=tel1, tel2
    worker.balancer.sticky_session=True
    worker.balancer.sticky_session_force=True
    worker.balancer.method=B
    worker.balancer.lock=O
    #Defining status -----------------------------
    worker.jkstatus.type=status
    worker.jkstatus.css=/jk_status/StatusCSS.css
    #Workers properties ---------------------------
    worker.tel1.type=ajp13
    worker.tel1.port=8009
    worker.tel1.host=127.0.0.1
    worker.tel1.lbfactor=1
    worker.tel1.socket_keepalive=False
    worker.tel1.socket_timeout=30
    worker.tel1.retries=20
    worker.tel1.connection_pool_timeout = 20
    #worker.tel1.redirect=tel2
    worker.tel1.disabled=False
    worker.tel2.type=ajp13
    worker.tel2.port=8009
    worker.tel2.host=199.147.52.181
    worker.tel2.lbfactor=1
    worker.tel2.socket_keepalive=False
    worker.tel2.socket_timeout=30
    worker.tel2.retries=20
    worker.tel2.connection_pool_timeout = 20
    #worker.tel2.redirect=tel1
    worker.tel2.disabled=False
    THE PROBLEM
    I open a browser in the jk-status page to see how the Tomcat instances are
    working, and both are working fine: Stat -> OK, now as the
    loadbalancing factor is 1 on both Tomcats, an even alternating session
    distribution is set.
    While this browser is open to keep an eye on the status, I open a new
    browser (B1)to connect to my Web Application, Apache answers
    correctly and gives me a SESSION_ID for Tomcat instance 1 [both
    instances are OK], if I make a simple refresh, my SESSION_ID is still the
    same so I'm assigned to Tomcat instance 1 but this time I get an
    ERROR 503 - Service unavailable but looking at the status of the
    Tomcat instances both instances are still OK, no-one is down. And it
    stays throwing this error for as many refreshes i do.
    Now, I open a new browser (B2)and do the same process as before,
    as expected, Apache now gives me a SESSION_ID for Tomcat instance 2,
    repeating the same refreshing process, the error is thrown again, but still at
    the jk-status page, both instances are fine.
    Without closing these windows, I make a new refresh try on B1 and
    even though the jk-status says both Tomcat instances are OK, the error
    is still thrown. I open a third one (B3), and Apache again, correctly
    gives me a new SESSION_ID for Tomcat instance 1 and answers
    correctly on the first call. But once again if i repeat the refreshing process, the
    error is thrown again.
    Note: Using a different resolution to always keep and eye on the
    instances status and using a refresh rate of 1 second for status, both
    servers always were OK.
    So the main problem is that somehow when the session is replicated
    to the same tomcat, Apache confuses and thinks it is not available, when
    asking it through the jk-status it tells it is OK
    I've been trying different configurations with both Apache and Tomcat,
    but there must be something missing since I don't get it to work correctly
    Thanks in advance for all your helping comments.
    - @alphazygma

    Whew... that was quite an answer... definitely is going to help him a lot. Yeah any n00b by now should know how to use google, but that's not the point in this forums, here we are to help each other. and wether you like it or not many of us deploy applications to tomcat and stumble on this. So dont try to be cool posting this kind of answers like google this or google that if you dont have an answer please dont comment you will appear to be more noobish than you aparently are.
    Well enough talking.
    I found the following useful: (it comes in the server.xml of the tomcat configuration)
    <!-- You should set jvmRoute to support load-balancing via JK/JK2 ie :
    <Engine name="Standalone" defaultHost="localhost" debug="0" jvmRoute="jvm1">
    -->
    Enabling that entry on both machines should be enough.
    Aparently the problem is not with apache. is with tomcat since it can't retain the session apache gives.
    more information in the Tomcat help at:
    http://tomcat.apache.org/tomcat-5.0-doc/balancer-howto.html#Using%20Apache%202%20with%20mod_proxy%20and%20mod_rewrite

Maybe you are looking for

  • Arraylist.add() problem

    Hi, I'm trying to read a CSV text file into an arraylist. I can read the text file fine, its just when it gets to the actual arraylist.add() part it just .. .. doesn't work. It can print the values from the CSV file no problem. I'm sure my syntax is

  • Edit in Photoshop CC (2014) not transferring back to Lightroom

    After uninstalling and reinstalling LR 5.5 AND Photoshop CC (2014) I was finally able to get images to go from LR to PS, but after editing the TIFs are not reimporting into Lightroom. The images save in the same folder. OS Windows 7 Pro 64-bit Lightr

  • Master database tables

    Hi All, Can you please let me know the master database tables for Project System.. Regards Anuj

  • How to restrict the decimal place of a floating point number?

    Hi, Here is my code: public void TwoDecimal(double u){      String w = Double.toString(u);      int c = w.length();      System.out.println(c);      if (c <= 5)         double a = Double.parseDouble(w);         System.out.println(a);      else       

  • Hyperlink in Forms possible???

    Is there any option in oracle 9i forms to create hyperlink. If yes how.? n if No. then any other option to fulfill the requirement. This is only for good Look n Feel.