Re: tomcat JSP Servlet Apache JK2
Hello, mmm, I've compiled and linked and configured mod_jk with Apache 2.0 correctly, but I doesn't work correctly. Mmm, if I access to http://192.168.1.2 explorer continues show me the code of my JSP, but if I access to http://192.168.1.2/ecommerce/login.jsp it shows me correctly the JSP formatted or interpreted as simpe HTML file. I don't know What more Can I do. Can you say me what do I do wrong? jk.conf - JkWorkersFile /etc/apache2/properties/workers.properties JkLogFile /var/log/apache2/jk.log JkLogLevel debug workers.properties - # # List workers worker.list=treb # # Define work worker.treb.tomcat_home=$TOMCAT_HOME worker.treb.java_home=$JAVA_HOME worker.treb.port=8009 worker.treb.host=localhost worker.treb.type=ajp13 worker.treb.cachesize=10 worker.treb.cache_timeout=600 worker.treb.socket_timeout=300 worker.treb.lbfactor=1 And httpd.conf - ServerName 192.168.1.2 NameVirtualHost 192.168.1.2 VirtualHost 192.168.1.2 ServerName 192.168.1.2 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/tomcat/webapps/ecommerce ErrorLog /usr/local/tomcat/webapps/webshop/logs/error_log CustomLog /usr/local/tomcat/webapps/webshop/logs/access_log common LocationMatch .*WEB-INF.* AllowOverride None Deny from all /LocationMatch JkMount /*.jsp treb /VirtualHost -- View this message in context: http://www.nabble.com/tomcat-JSP-Servlet-Apache-JK2-tf2071029.html#a5724146 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat JSP Servlet Apache JK2
It's a difference of path. To Apache, the ecommerce webapp is the root of your site, but Tomcat does not see it that way. Tomcat only recognizes the ROOT webapp as the document root. Rename the ecommerce webapp to ROOT (notice the all caps), deleting the original ROOT directory under webapps and reconfigure Apache to use that as the document root. The point is that URL paths in Tomcat and HTTPd must sync. Your login.jsp can't be /ecommerce/login.jsp in tomcat and /login.jsp in Apache. --David jeusdi wrote: Hello, mmm, I've compiled and linked and configured mod_jk with Apache 2.0 correctly, but I doesn't work correctly. Mmm, if I access to http://192.168.1.2 explorer continues show me the code of my JSP, but if I access to http://192.168.1.2/ecommerce/login.jsp it shows me correctly the JSP formatted or interpreted as simpe HTML file. I don't know What more Can I do. Can you say me what do I do wrong? jk.conf - JkWorkersFile /etc/apache2/properties/workers.properties JkLogFile /var/log/apache2/jk.log JkLogLevel debug workers.properties - # # List workers worker.list=treb # # Define work worker.treb.tomcat_home=$TOMCAT_HOME worker.treb.java_home=$JAVA_HOME worker.treb.port=8009 worker.treb.host=localhost worker.treb.type=ajp13 worker.treb.cachesize=10 worker.treb.cache_timeout=600 worker.treb.socket_timeout=300 worker.treb.lbfactor=1 And httpd.conf - ServerName 192.168.1.2 NameVirtualHost 192.168.1.2 VirtualHost 192.168.1.2 ServerName 192.168.1.2 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/tomcat/webapps/ecommerce ErrorLog /usr/local/tomcat/webapps/webshop/logs/error_log CustomLog /usr/local/tomcat/webapps/webshop/logs/access_log common LocationMatch .*WEB-INF.* AllowOverride None Deny from all /LocationMatch JkMount /*.jsp treb /VirtualHost - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat JSP Servlet Apache JK2
So, What must I change in my configuration files. I want that I access to 192.168.1.2 appear my login.jsp. I'm very stressed. I have a feeling I do all right. I understant it. my login.jsp is located in /usr/local/tomcat/webapps/login.jsp -- View this message in context: http://www.nabble.com/tomcat-JSP-Servlet-Apache-JK2-tf2071029.html#a5726353 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat JSP Servlet Apache JK2
You can't place a jsp in /usr/local/tomcat/webapps. Tomcat does not make that location available to the client. You originally had a ecommerce webapp with a login.jsp file you wanted to access at the top level. I recommended you rename the webapp 'ecommerce' to 'ROOT' and reconfigure apache httpd to use that as the docroot instead of 'ecommerce'. Please read the tomcat docs and re-read my previous responses. --David PS: Please leave in the relevant parts of the message you are replying to. It's easier to answer when we don't have to dig back through the entire thread just to find out what's been said before. jeusdi wrote: So, What must I change in my configuration files. I want that I access to 192.168.1.2 appear my login.jsp. I'm very stressed. I have a feeling I do all right. I understant it. my login.jsp is located in /usr/local/tomcat/webapps/login.jsp - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat JSP Servlet Apache JK2
There are a lot of issues here, mostly having to do with how you've structured your virtual hosts. However, I think the following should get you up and running quickly. In your VirtualHost directive, add the following line: DirectoryIndex index.html index.html.var login.jsp That should bring up the login.jsp as a default index when someone just goes to the directory. Note, I have not tried this, but I do use this to serve up .pl and .php index files. I normally don't have a login.jsp page as the entry point into my web application. I normally put an index.html splash page with a note about the web application, and then on that page provide a link to the login page should the user want to log in. As I said above, there are a lot of potential issues with the way you've constructed virtual hosts, both with Apache and Tomcat. The Tomcat issues are certainly on topic for this mailing list, but the Apache issues are probably not. Hope this helps. /mde/ just my two cents . . . . --- jeusdi [EMAIL PROTECTED] wrote: Hello, mmm, I've compiled and linked and configured mod_jk with Apache 2.0 correctly, but I doesn't work correctly. Mmm, if I access to http://192.168.1.2 explorer continues show me the code of my JSP, but if I access to http://192.168.1.2/ecommerce/login.jsp it shows me correctly the JSP formatted or interpreted as simpe HTML file. I don't know What more Can I do. Can you say me what do I do wrong? jk.conf - JkWorkersFile /etc/apache2/properties/workers.properties JkLogFile /var/log/apache2/jk.log JkLogLevel debug workers.properties - # # List workers worker.list=treb # # Define work worker.treb.tomcat_home=$TOMCAT_HOME worker.treb.java_home=$JAVA_HOME worker.treb.port=8009 worker.treb.host=localhost worker.treb.type=ajp13 worker.treb.cachesize=10 worker.treb.cache_timeout=600 worker.treb.socket_timeout=300 worker.treb.lbfactor=1 And httpd.conf - ServerName 192.168.1.2 NameVirtualHost 192.168.1.2 VirtualHost 192.168.1.2 ServerName 192.168.1.2 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/tomcat/webapps/ecommerce ErrorLog /usr/local/tomcat/webapps/webshop/logs/error_log CustomLog /usr/local/tomcat/webapps/webshop/logs/access_log common LocationMatch .*WEB-INF.* AllowOverride None Deny from all /LocationMatch JkMount /*.jsp treb /VirtualHost -- View this message in context: http://www.nabble.com/tomcat-JSP-Servlet-Apache-JK2-tf2071029.html#a5724146 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat JSP Servlet Apache JK2
Typical cause is a config error in your mod_jk setup or your jsp file located in the wrong place. Please post details of your Apache, mod_jk, and tomcat setups for a more helpful answer. --David jeusdi wrote: Hello, I've configured Apache Web Server with mod_jk2 to communicate it with Apache Tomcat 5.5. Mmm, I've created a Web Application with one JSP (index.JSP) and one Servlet (it is performed form JSP). All is ok, but when I access to my web Application the result is the code of my JSP instead a simple HTML page. In other words, when I want to access to my web Application I view the code of JSP (the code isn't interpreted like HTML code. Do you know What must I do to solve it? Thanks in advanced. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat JSP Servlet Apache JK2
jk2.conf -- JkSet config.file /etc/apache2/properties/workers2.properties httpd.conf -- ServerName 192.168.1.2 NameVirtualHost 192.168.1.2:80 VirtualHost 192.168.1.2:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/tomcat/webapps/ecommerce ErrorLog /usr/local/tomcat/webapps/ecommerce/logs/error_log CustomLog /usr/local/tomcat/webapps/ecommerce/logs/access_log common LocationMatch .*WEB-INF.* AllowOverride None Deny from all /LocationMatch /VirtualHost And, workers2.conf -- # only at beginnin. In production uncomment it out [logger.apache2] level=DEBUG [shm] file=/var/log/apache2/shm.file size=1048576 # Example socket channel, override port and host. [channel.socket:localhost:8009] port=8009 host=127.0.0.1 # define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/*.jsp] context=/ecommerce I don't know Why it doesn't work correctly? Thanks. -- View this message in context: http://www.nabble.com/tomcat-JSP-Servlet-Apache-JK2-tf2071029.html#a5705067 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat JSP Servlet Apache JK2
jk2 has been deprecated quite some time ago. You might find some help for it on this list, but you should seriously consider migrating to mod_jk. The module mod_jk (*not* mod_jk2) is still being actively developed and most features of mod_jk2 have been backported to mod_jk in the meantime. I'm not saying, that your problem is a mod_jk2 problem, but you can assume to get easier help when using mod_jk. Please note, that the last released version of mod_jk is 1.2.18. Regards, Rainer jeusdi wrote: jk2.conf -- JkSet config.file /etc/apache2/properties/workers2.properties httpd.conf -- ServerName 192.168.1.2 NameVirtualHost 192.168.1.2:80 VirtualHost 192.168.1.2:80 ServerAdmin [EMAIL PROTECTED] DocumentRoot /usr/local/tomcat/webapps/ecommerce ErrorLog /usr/local/tomcat/webapps/ecommerce/logs/error_log CustomLog /usr/local/tomcat/webapps/ecommerce/logs/access_log common LocationMatch .*WEB-INF.* AllowOverride None Deny from all /LocationMatch /VirtualHost And, workers2.conf -- # only at beginnin. In production uncomment it out [logger.apache2] level=DEBUG [shm] file=/var/log/apache2/shm.file size=1048576 # Example socket channel, override port and host. [channel.socket:localhost:8009] port=8009 host=127.0.0.1 # define the worker [ajp13:localhost:8009] channel=channel.socket:localhost:8009 [uri:/*.jsp] context=/ecommerce I don't know Why it doesn't work correctly? Thanks. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat JSP Servlet Apache JK2
mmm, but if I configure workers2.properties to show me the ROOT Tomcat web application it show me index.jsp correctly!! If there is no choice can I use mod_jk in Apache2? I say it because I perform aptitude install mod_jk in my ubuntu Brezzy and it downloads apache1.3, but I want use Apache2 with mod_jk. Can I use mod_jk with Apache2? -- View this message in context: http://www.nabble.com/tomcat-JSP-Servlet-Apache-JK2-tf2071029.html#a5707357 Sent from the Tomcat - User forum at Nabble.com. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: tomcat JSP Servlet Apache JK2
jeusdi wrote: If there is no choice can I use mod_jk in Apache2? I say it because I perform aptitude install mod_jk in my ubuntu Brezzy and it downloads apache1.3, but I want use Apache2 with mod_jk. Can I use mod_jk with Apache2? Uaaah. mod_jk 1.2 works with Apache 1.3, 2.0 and 2.2. The differences between mod_jk and mod_jk2 have nothing to do with apache 1.3 vs. apache 2.0. But: The build results of mod_jk differ for Apache 1.3 and 2.0. So when building it, you have to decide, for which web sserver you build it. It's not possible to use a mod_jk binary built for 1.3 with Apache 2.0. - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]