RE: server options
Sergey, The -server option is not used in Windows. Instead, you copy the jre\bin\server folder from the JDK into your JRE installation folder and select that JVM in your service configuration. Fritz -Original Message- From: Sergey Livanov [mailto:[EMAIL PROTECTED] Sent: Thursday, May 19, 2005 1:15 PM To: Tomcat users Subject: server options Could you, please, give me a peace of advice? I want to set Xmx parameter. When I enter the line -server -Xmx256m on the console in the Java Options Tab , the server does not start. [2005-05-19 20:38:54] [418 javajni.c] [error] CreateJavaVM Failed [2005-05-19 20:38:54] [903 prunsrv.c] [error] Failed initializing java C:\Apache\Tomcat\bin\bootstrap.jar [2005-05-19 20:38:54] [1131 prunsrv.c] [error] ServiceStart returned 2 When I enter the line -Xmx256m - the server starts. If the line -Xmx256m is stayed, will it be correct ? Thanks in advance, regards, Sergey mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: server options
It's platform dependant, AFAIK. -Original Message- From: Jim Henderson [mailto:[EMAIL PROTECTED] Sent: Thursday, May 19, 2005 3:11 PM To: Tomcat Users List Subject: RE: server options That is a new change with Java in 1.5. 1.4 allowed the runtime -server option. Right? -Original Message- From: Fritz Schneider [mailto:[EMAIL PROTECTED] Sent: Thursday, May 19, 2005 5:06 PM To: 'Tomcat Users List'; 'Sergey Livanov' Subject: RE: server options Sergey, The -server option is not used in Windows. Instead, you copy the jre\bin\server folder from the JDK into your JRE installation folder and select that JVM in your service configuration. Fritz -Original Message- From: Sergey Livanov [mailto:[EMAIL PROTECTED] Sent: Thursday, May 19, 2005 1:15 PM To: Tomcat users Subject: server options Could you, please, give me a peace of advice? I want to set Xmx parameter. When I enter the line -server -Xmx256m on the console in the Java Options Tab , the server does not start. [2005-05-19 20:38:54] [418 javajni.c] [error] CreateJavaVM Failed [2005-05-19 20:38:54] [903 prunsrv.c] [error] Failed initializing java C:\Apache\Tomcat\bin\bootstrap.jar [2005-05-19 20:38:54] [1131 prunsrv.c] [error] ServiceStart returned 2 When I enter the line -Xmx256m - the server starts. If the line -Xmx256m is stayed, will it be correct ? Thanks in advance, regards, Sergey mailto:[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 404 redirection question
Wade, Browsers don't display the error page for missing GIF or JPEG elements in a page, only when the entire requested URL gets a 404. If you have hyperlinks to images, as opposed to HTML pages with images embedded, then what you are looking for can be accomplished. You could create a JSP which does the following to get the original URI: // If this is an error page, get the original URI String missingURI = (String) req.getAttribute( javax.servlet.forward.request_uri); if (missingURI == null) missingURI =req.getRequestURI(); Fritz -Original Message- From: Wade Billings [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 18, 2005 8:10 AM To: tomcat-user@jakarta.apache.org Subject: ***SPAM*** 404 redirection question I have the need to redirect visitors to my site to different error pages depending on the type of element missing. For example, if the element that is missing is an image file (e.g. *.jpg, *.gif), then I want to present them with a custom 404 error page. If the missing element is an entire page, then I want to present them with a completely different 404 error page. I know that I can set Tomcat to catch the 404 errors and present a custom page, but what I need to know is can I get as granular as I need to get using the configuration, or do I have to put this in an jsp file and solve it programmatically? Thanks, Q. Wade Billings - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat vs Apache
Chris, Earlier versions of Tomcat were quite a bit slower than Apache when delivering static pages. For high volume work the preferred solution was to have Apache listening on port 80, and when it received a request for a page from in a J2EE context, to forward it to Tomcat, listening on 8080. A similar connector is used for Microsoft IIS. Tomcat had a major rewrite for Tomcat 5, and the performance difference on static pages is now minor. An Apache-to-Tomcat connector is now used for the following reasons (and probably a few more): 1) History. We started out that way, and there's no reason to change. 2) Expansion. We have been running Apache (or IIS) and we need to add a J2EE container. 3) Load balancing. We have too many requests for a single server, so we have Apache take the incoming requests and dole them out to three or four Tomcat servers. 4) Management. We have a lot of customers. Some need CGI, some need PHP, and some need J2EE. I hope this helps, Fritz -Original Message- From: Chris [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 18, 2005 9:39 AM To: Tomcat Users List Subject: Re: Tomcat vs Apache Apache is not a J2EE container - you are off-roading on this one ;-) Thanks. That was pretty much what I wanted to find out. BTW, I keep hearing of people using Apache and Tomcat in conjunction. How does that work? Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 404 redirection question
By having a page that is essentially: htmlhead/body img src=images/xxx.jpg/ /body/html -Original Message- From: David Wall [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 18, 2005 11:01 AM To: Tomcat Users List Subject: Re: 404 redirection question Fritz Schneider wrote: If you have hyperlinks to images, as opposed to HTML pages with images embedded, How would you embed images inside the HTML rather than using hyperlinks to the image? David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: 404 redirection question
David, I'm differentiating between a link as in src= and a hyperlink as in href=. For a link, the browser does indeed do another HTTP GET to retrieve it, but if the result is a 404, the rest of the response is discarded and the image is rendered as a small box with a red x in it. On the other hand, if the image was the target of a hyperlink and it got a 404, the error page would be displayed (unless the IE friendly option were selected). Example: http://peacham.homeip.net/notthere.jpg. Fritz -Original Message- From: David Wall [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 18, 2005 2:11 PM To: Tomcat Users List Subject: Re: 404 redirection question Fritz, Well, that's a hyperlink to the image, not embedded. In the case below, the image is not embedded in the HTML but is simply a link to the image that requires an HTTP(S) GET to retrieve. With a relative URL like you used, it just constructs the complete URL by appending the current page's URL to the front, so images/xxx.jpg becomes something like http(s)://www.host.com/app/images/xxx.jpg assuming the HTML is located at http(s)://www.host.com/app. David Fritz Schneider wrote: By having a page that is essentially: htmlhead/body img src=images/xxx.jpg/ /body/html Fritz Schneider wrote: If you have hyperlinks to images, as opposed to HTML pages with images embedded, How would you embed images inside the HTML rather than using hyperlinks to the image? David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat and PHP?
Try this: http://tools.herberlin.de/phpservlet/index.shtml Fritz -Original Message- From: Chris Holden [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 18, 2005 3:52 PM To: tomcat-user@jakarta.apache.org Subject: Tomcat and PHP? Hi, I was wondering if anyone knows if it's possible to configure Tomcat to run PHP 5? I have Tomcat 5.5.9 installed and it's all running fine with my MySQL etc, but I'd really like to be able to test just a few php pages without having to install Apache to handle php seperately (everything else is JSP and servlets). I have various extension modules in php (php_java.dll and jar files and the like) and I have read the php documentation on their site regarding java, but I'm unsure how to mesh the two without ruining my set up. If anyone has any foolproof instructions or has done this before I'd really appreciate some tips/help! Cheers, Chris - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: JRE vs. JDK for Tomcat
Iannis, Tomcat used to require javac (the Java compiler from the SDK) in order to compile the java code generated from the jsps. Tomcat 5 now comes packaged with the jasper compiler, so all you need is the Java 5.0 JRE. fRITZ -Original Message- From: Iannis Hanen [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 18, 2005 6:59 PM To: tomcat-user@jakarta.apache.org Cc: [EMAIL PROTECTED] Subject: JRE vs. JDK for Tomcat Hi, It seems that tomcat requires a JDK (and not only a JRE) to be present on the physical machine in order to run properly. I am a bit surprised that a JDK is also required. Is there a way to run Tomcat on top of a JRE only? How do I setup this? Thanks, Iannis - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: No such list! s An explanation
In general list servers have at least two e-mail addresses on which to receive mail. The most heavily used one is the main list address which accepts submissions and broadcasts them to all members of the list. In our case it's [EMAIL PROTECTED] There is also one or more list management addresses such as [EMAIL PROTECTED] It's obvious that some child has found a way to subscribe one of the management interfaces at New Atlanta to our list. Each message that we send gets forwarded to that address. Since the message is not a valid list management message, the New Atlanta server replies with an error message. That error message then gets broadcast. We should consider ourselves lucky that the New Atlanta list server ignores messages which seem to come from itself. If it didn't we would have an infinite loop. What can we do about it? 1) Wait patiently for our list owner to delete the offending subscription. 2) Add a mail filter to discard messages with newatlanta in the header. 3) Stop sending messages. 4) [EMAIL PROTECTED] Fritz -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 17, 2005 11:11 AM To: Tomcat Users List Subject: Re: No such list! s (AM I THE ONLY ONE GETTING THIS SPAM)? No you are not. This is absolutely the noisiest list I have ever subscribed to: each post generates more than one of those bad list or bad list command spams. On Tue, 17 May 2005 08:46:54 +0300 Guy Katz [EMAIL PROTECTED] wrote: am i the only one getting this annoying spam from the tomcat lisy? -Original Message- From: s [mailto:[EMAIL PROTECTED] Sent: Monday, May 16, 2005 10:32 PM To: tomcat-user@jakarta.apache.org Subject: No such list! s Valid Lists New Atlanta List Server --- There is no list by that name on this server. Available lists are: bluedragon-interest servletexec-interest jturbo-interest - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: tomcat and virtual hosts
Bagus, Each virtual host is a host element in server.xml. The service (e.g. Catalina) has connectors to the ports for incoming requests. The engine in that service sorts out the requests for a particular virtual host based on the name attribute of the hosts. Any which don't match go to the defaultHost (e.g. localhost). Each host can have its own appBase as well as logs, root context, etc. Fritz -Original Message- From: Bagus [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 11, 2005 3:53 PM To: Tomcat Users List Subject: tomcat and virtual hosts Here's a more general question about Tomcat. I'm used to using apache to set up virtual hosts, but when Tomcat installed, http://localhost/ now goes to my tomcat installation. So how does one set up multiple virtual hosts with Tomcat? Is it in the server.xml file or something? Or do I somehow now modify my apache configuration to be able to use tomcat and the jsp files? Thanks, Bagus - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Error Redirection
Steve, Have you tried a custom error page for error 500? error-page error-code500/error-code location/_error/500.html/location /error-page Fritz -Original Message- From: Steve Vanspall [mailto:[EMAIL PROTECTED] Sent: Sunday, May 01, 2005 6:33 PM To: Tomcat User List Subject: Error Redirection Hi there, This is probably an obvious question, but if a JSP or some other error occurs that would usually make tomcat do a printStackTrace() into HTML and display it on the browser. [snip...] is there a way to make it forward to a clean error page when on a production system? Regards Steve - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Virtual Hosts and SSL Certificates
I am running TC 5.5.8 standalone under Windows XP Pro. I have two domains coming in to the same IP address, one for production and one for testing. There are two host elements in my engine. I have a CA created SSL certificate for the production domain, but I want to add a self-signed certificate for the test domain. My question is: if I import my test certificate with alias tomcat, will that overwrite my production certificate? Can I import it with a different alias? If so, how does the SSL Connector find it? Thanks, Fritz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie Question: conext.xml
Bob, Welcome, fellow newbie! I struggled with this one also. It turns out that the context element for a root directory MUST be nested inside the host element in server.xml. The relevant documentation reads: You may define as many Context elements as you wish. Each such Context MUST have a unique context path, which is defined by the path attribute. In addition, you MUST define a Context with a context path equal to a zero-length string. This Context becomes the default web application for this virtual host, and is used to process all requests that do not match any other Context's context path. Fritz -Original Message- From: Bob Bronson [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 26, 2005 12:14 PM To: tomcat-user@jakarta.apache.org Subject: Newbie Question: conext.xml Hello everyone, [snip...] Let me explain what I want to do. I'm hoping someone could tell me where I'm going wrong, in a polite way. :) I'm trying to use TC 5.5.9 on Win 2k. I want the document base directory (the Context's docBase) for my default web application to be something other than ROOT. Please don't ask, why?, this is a simplification of a different but equivalent problem. [snip...] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Tomcat SSI variables missing?
I am running Tomcat 5.5.8 standalone under Windows XP. I have created a custom error page for 404 errors. Part of it is: pI'm sorry, stronghttp://!--#echo var=HTTP_HOST --!--#echo var=REQUEST_URI --/strong, the page you requested, cannot be found. It may have been removed, had its name changed, or is temporarily unavailable./p But it displays as: I'm sorry, http://(none)(none), the page you requested, cannot be found. It may have been removed, had its name changed, or is temporarily unavailable. Does the Tomcat SSI Servlet only support a subset of the CGI variables? Fritz
RE: Virtual hosts
Dola, The simplest way is to have a welcome page such as index.html that redirects the request. It would look like this: html head META http-equiv=refresh content=0;URL=http://www.mysite.com/myapp; titleRedirect to Myapp/title /head body/ /html Fritz -Original Message- From: Dola Woolfe [mailto:[EMAIL PROTECTED] Sent: Monday, April 25, 2005 2:31 PM To: Tom Cat Subject: Virtual hosts Hi, Running TC5.5 as a stand-alone. I've been reading about the HOST element, and i see that it can make mysite.com and www.mysite.com go to the same place. I apologize if I put it in a simplistic way. But can it make www.mysite.com be forwarded to www.mysite.com/myapp? Many thanks in advance! Dola __ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tomcat SSI variables missing?
Mark, Would it be more productive to patch bug 33106 (http://issues.apache.org/bugzilla/show_bug.cgi?id=33106)? Fritz -Original Message- From: Mark Thomas [mailto:[EMAIL PROTECTED] Sent: Monday, April 25, 2005 12:18 PM To: Tomcat Users List Subject: Re: Tomcat SSI variables missing? Fritz, Please forgive the format. I just cut'n'pasted stuff from the source). The currently supported variables are: AUTH_TYPE, CONTENT_LENGTH, CONTENT_TYPE, DOCUMENT_NAME, DOCUMENT_URI, GATEWAY_INTERFACE, PATH_INFO, PATH_TRANSLATED, QUERY_STRING, QUERY_STRING_UNESCAPED, REMOTE_ADDR, REMOTE_HOST, REMOTE_USER, REQUEST_METHOD, SCRIPT_NAME, SERVER_NAME, SERVER_PORT, SERVER_PROTOCOL, SERVER_SOFTWARE DATE_GMT, DATE_LOCAL, LAST_MODIFIED HTH, Patches to add support for additional ones are always welcome. Mark Fritz Schneider wrote: I am running Tomcat 5.5.8 standalone under Windows XP. I have created a custom error page for 404 errors. Part of it is: pI'm sorry, stronghttp://!--#echo var=HTTP_HOST --!--#echo var=REQUEST_URI --/strong, the page you requested, cannot be found. It may have been removed, had its name changed, or is temporarily unavailable./p But it displays as: I'm sorry, http://(none)(none), the page you requested, cannot be found. It may have been removed, had its name changed, or is temporarily unavailable. Does the Tomcat SSI Servlet only support a subset of the CGI variables? Fritz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Tips regarding security and configuration
Mbneto, Security is necessary, virtual hosting is neat. If you were a bit more specific, we could be also. Fritz -Original Message- From: mbneto [mailto:[EMAIL PROTECTED] Sent: Thursday, April 21, 2005 7:09 AM To: tomcat-user@jakarta.apache.org Subject: Tips regarding security and configuration hi, I have a fedora core 2 system with the standard tomcat/jakarta/mod_jk2 rpms installed. I am looking for tips regarding the configuration, specially with security and virtual hosting practices. regards. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: localhost Context files and path = /
Joe, Have you tried adding that context element to your host element in server.xml? Also I think you need path= in order to specify the root of the server. Fritz -Original Message- From: Joe Bautista [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 20, 2005 5:02 PM To: Tomcat Users List Subject: localhost Context files and path = / Hi all, I've been trying to deploy Sakai 1.5 on my Tomcat 5.5.7. One of the Contexts, sakai-dispatch, is supposed to replace the ROOT Context. My CATALINA_HOME/conf/catalina/localhost/sakai-dispatch.xml file contains the following code: Context path=/ docBase=f:/usr/local/sakai/sakai-dispatch crossContext=true Realm className=org.sakaiproject.dav.DavRealm / /Context When I move this code into my CATALINA_HOME/conf/server.xml file, Sakai works. At first I thought sakai-dispatch.xml is not being read, so I added some garbage to sakai-dispatch.xml, but upon running CATALINA_HOME/bin/startup.bat the output window gave me some error messages based on the Digester. My conclusion is this: sakai-dispatch.xml is working, but for some reason it's not letting me set the path to /. Any ideas? Joe Bautista Fuller Seminary Programmer/Analyst - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need help exporting contexts not under webapps/
Guru, Earl isn't the only one trying to do this. Here are the details for my attempts which may or may not be similar to his: - Running TC 5.5.8, JVM 1.5.0_02-b09 under Win XP Pro SP2 - I have a set of static pages (starting with index.htm) stored at C:\www\aegean - C:\www\agean\WEB-INF\web.xml contains web-app/ - I wish to access them as http://www.peacham.com/aegean - aegean is just one of many such directories. - It works if I copy it to {TOMCAT_BASE}\webapps\aegean but that creates maintenance headaches by coupling the TC directory structure to the web site directory structure. - I have tried building a webapps/aegean directory with just WEB-INF and adding aegean.xml to {TOMCAT-BASE}\conf\Catalina\localhost containing: ?xml version=1.0 encoding=UTF-8? Context path=/aegean docbase=c:/www/aegean reloadable=true WatchedResourceWEB-INF/web.xml/WatchedResource /Context but all I get is 404 errors and no hint of other errors in the logs. I have tried a couple of variations with equally poor results. Thanks for any help you can give Fritz -Original Message- From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 19, 2005 1:10 AM To: 'Tomcat Users List' Subject: RE: Need help exporting contexts not under webapps/ Not clear what you want. Send me the details Where is your static document ( The directory ) How do want to access it ? ( the URL ) Which version of TOMCAT YOU ARE USING Send me your server.xml Regards Guru -Original Message- From: J. Ryan Earl [mailto:[EMAIL PROTECTED] Sent: 18 April 2005 19:16 To: tomcat-user@jakarta.apache.org Subject: Need help exporting contexts not under webapps/ Hello, I'm in the process of bringing an in-house application up under Tomcat. Previously we were using Jetty as the servlet container, but for various reason I'm trying to get said application running with Tomcat 5.5.9 and Java 1.5.0. The problem I'm having is that there are two directories with a large amount of static files (pictures, videos, documents, and other forms of media) that are mounted outside of the webapps/ home. Under Jetty, there is a configuration directive that I can use to export these directories under a URL path. I'm trying to do that in Tomcat, and the documentation has been somewhat confusing. What I've gathered is that this type of configuration should be put under ${CATALINA_HOME}/conf/context.xml however I have been able to do this successfully. I've tried putting the following in context.xml but it gives me errors: Context path=/DOCS docBase=/mnt/CMFiles/DOCS debug=0 /Context So my question is, in short, given a directory structure of static files, how do you get Tomcat to serve said static content off of an arbitrary URI? Ideas? Thanks in advance, -ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Need help exporting contexts not under webapps/
Guru, I got it! Forget about aegean.xml! The key us server.xml! I was able to move my ROOT directory by adding the following to my Host container in server.xml: Context path= docBase=c:/www reloadable=true WatchedResourceWEB-INF/web.xml/WatchedResource /Context Then all of my subdirectories under c:\www showed up on the server, including aegean. Other contexts continue to be recognized as deployed apps. Fritz -Original Message- From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 19, 2005 5:45 AM To: 'Tomcat Users List' Subject: RE: Need help exporting contexts not under webapps/ Hello, In your aegean.xml try ?xml version=1.0 encoding=UTF-8? Context path=/aegean docbase=c:\www\aegean reloadable=true WatchedResourceWEB-INF/web.xml/WatchedResource /Context and then stop and start tocmat. Go to the manager application and see if you can see the application started ? if not try to start it. If yes then try the link http://www.peacham.com/aegean If it does not look into the logs Regards Guru -Original Message- From: Fritz Schneider [mailto:[EMAIL PROTECTED] Sent: 19 April 2005 13:25 To: 'Tomcat Users List' Subject: RE: Need help exporting contexts not under webapps/ Guru, Earl isn't the only one trying to do this. Here are the details for my attempts which may or may not be similar to his: - Running TC 5.5.8, JVM 1.5.0_02-b09 under Win XP Pro SP2 - I have a set of static pages (starting with index.htm) stored at C:\www\aegean - C:\www\agean\WEB-INF\web.xml contains web-app/ - I wish to access them as http://www.peacham.com/aegean - aegean is just one of many such directories. - It works if I copy it to {TOMCAT_BASE}\webapps\aegean but that creates maintenance headaches by coupling the TC directory structure to the web site directory structure. - I have tried building a webapps/aegean directory with just WEB-INF and adding aegean.xml to {TOMCAT-BASE}\conf\Catalina\localhost containing: ?xml version=1.0 encoding=UTF-8? Context path=/aegean docbase=c:/www/aegean reloadable=true WatchedResourceWEB-INF/web.xml/WatchedResource /Context but all I get is 404 errors and no hint of other errors in the logs. I have tried a couple of variations with equally poor results. Thanks for any help you can give Fritz -Original Message- From: Raghupathy,Gurumoorthy [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 19, 2005 1:10 AM To: 'Tomcat Users List' Subject: RE: Need help exporting contexts not under webapps/ Not clear what you want. Send me the details Where is your static document ( The directory ) How do want to access it ? ( the URL ) Which version of TOMCAT YOU ARE USING Send me your server.xml Regards Guru -Original Message- From: J. Ryan Earl [mailto:[EMAIL PROTECTED] Sent: 18 April 2005 19:16 To: tomcat-user@jakarta.apache.org Subject: Need help exporting contexts not under webapps/ Hello, I'm in the process of bringing an in-house application up under Tomcat. Previously we were using Jetty as the servlet container, but for various reason I'm trying to get said application running with Tomcat 5.5.9 and Java 1.5.0. The problem I'm having is that there are two directories with a large amount of static files (pictures, videos, documents, and other forms of media) that are mounted outside of the webapps/ home. Under Jetty, there is a configuration directive that I can use to export these directories under a URL path. I'm trying to do that in Tomcat, and the documentation has been somewhat confusing. What I've gathered is that this type of configuration should be put under ${CATALINA_HOME}/conf/context.xml however I have been able to do this successfully. I've tried putting the following in context.xml but it gives me errors: Context path=/DOCS docBase=/mnt/CMFiles/DOCS debug=0 /Context So my question is, in short, given a directory structure of static files, how do you get Tomcat to serve said static content off of an arbitrary URI? Ideas? Thanks in advance, -ryan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying Sakai 1.5.0 with Tomcat 5.5.7
Joe, Do you also have a deployed application at TOMCAT_HOME/webapps/sakai-dispatch? If so, what does its web.xml look like? Fritz -Original Message- From: Joe Bautista [mailto:[EMAIL PROTECTED] Sent: Monday, April 18, 2005 1:59 PM To: tomcat-user@jakarta.apache.org Subject: Deploying Sakai 1.5.0 with Tomcat 5.5.7 Hi everyone, I'm trying to deploy Sakai 1.5.0 with Tomcat 5.5.7. I've received several emails from people on the sakai user group telling me that Sakai 1.5.0 hasn't been proven to run with Tomcat 5.5.7, but I wanted to learn a little bit on my own, so I'm trying to make it work. Part of the sakai build process involves dropping several .xml files into the TOMCAT_HOME/conf/Catalina/localhost. One of the files, sakai-dispatch.xml, is supposed to redirect the base path of Tomcat with the following line: Context path=/ docBase=f:/usr/local/sakai/sakai-dispatch crossContext=true The problem is that when I type in http://localhost:80/; into the URL (my port is 80 by default, not 8080), nothing comes up. I know that the base path hasn't been changed to / because the index.html file in F:/user/local/sakai/sakai-dispatch is supposed to a redirect, but that's not happening. My question is this: What process/program/class is responsible for reading and acting on the directives in sakai-dispatch.xml? Doesn't it look like this isn't being done? Thanks in advance, Joe Bautista - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Deploying Sakai 1.5.0 with Tomcat 5.5.7
Joe, The question also is asking if F:/usr/local is TOMCAT_HOME. I am not sure that the context.xml is used if there is no directory for the context under webapps. You quoted me a web.xml from what would appear to be a different directory. Fritz -Original Message- From: Joe Bautista [mailto:[EMAIL PROTECTED] Sent: Monday, April 18, 2005 3:38 PM To: Tomcat Users List Subject: RE: Deploying Sakai 1.5.0 with Tomcat 5.5.7 Fritz, When you ask whether I also have a deployed application at TOMCAT_HOME/webapps/sakai-dispatch, I think what you're asking is whether or not everything looks kosher in that directory. If that's the case, then the answer is yes. I see the META-INF and WEB-INF directories. WEB-INF\lib has a jar file called sakai-tunnel-sakai.1.5.0.jar. As far as what the xml file looks like I've attached it in case you wanted to take a look at the whole thing, but the pertinent entries in F:/usr/local/sakai/sakai-dispatch/WEB-INF/web.xml are as follows: !-- dispatch for /portal -- servlet servlet-name dispatch-portal /servlet-name servlet-class org.sakaiproject.tunnel.TunnelServlet /servlet-class init-param param-nameredirect-context/param-name param-value/sakai-portal/param-value /init-param init-param param-nameredirect-path/param-name param-value/varuna/portal/param-value /init-param init-param param-namelog/param-name param-valuefalse/param-value /init-param load-on-startup1/load-on-startup /servlet ... servlet-mapping servlet-name dispatch-portal /servlet-name url-pattern /portal/* /url-pattern /servlet-mapping Thanks Fritz, Joe -Original Message- From: Fritz Schneider [mailto:[EMAIL PROTECTED] Sent: Monday, April 18, 2005 2:11 PM To: 'Tomcat Users List' Subject: RE: Deploying Sakai 1.5.0 with Tomcat 5.5.7 Joe, Do you also have a deployed application at TOMCAT_HOME/webapps/sakai-dispatch? If so, what does its web.xml look like? Fritz -Original Message- From: Joe Bautista [mailto:[EMAIL PROTECTED] Sent: Monday, April 18, 2005 1:59 PM To: tomcat-user@jakarta.apache.org Subject: Deploying Sakai 1.5.0 with Tomcat 5.5.7 Hi everyone, I'm trying to deploy Sakai 1.5.0 with Tomcat 5.5.7. I've received several emails from people on the sakai user group telling me that Sakai 1.5.0 hasn't been proven to run with Tomcat 5.5.7, but I wanted to learn a little bit on my own, so I'm trying to make it work. Part of the sakai build process involves dropping several .xml files into the TOMCAT_HOME/conf/Catalina/localhost. One of the files, sakai-dispatch.xml, is supposed to redirect the base path of Tomcat with the following line: Context path=/ docBase=f:/usr/local/sakai/sakai-dispatch crossContext=true The problem is that when I type in http://localhost:80/; into the URL (my port is 80 by default, not 8080), nothing comes up. I know that the base path hasn't been changed to / because the index.html file in F:/user/local/sakai/sakai-dispatch is supposed to a redirect, but that's not happening. My question is this: What process/program/class is responsible for reading and acting on the directives in sakai-dispatch.xml? Doesn't it look like this isn't being done? Thanks in advance, Joe Bautista - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple tomcat instances
Another option which uses fewer resources but doesn't provide quite the same degree of isolation is to run two hosts in the same Catalina service. If your DNS maps www.mydomain.com and test.mydomain.com to the same IP address, they can share the same ports. Each one can have its own logs, Servlet mappings, and set of apps. Fritz -Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 2:55 AM To: Tomcat Users List Subject: RE: Multiple tomcat instances From: Kelly, Steve [mailto:[EMAIL PROTECTED] Is it possible to run multiple instances of tomcat on the same server, for example to support production and test environments ? Yes. I run up to four on this machine - two (one 4.1, one 5.0) are running as I type this. Here's a Windows script that works (give or take the HOME path) for Tomcat 4 and 5.0 - untested on 5.5, but I can't see why it should fail. The UNIX equivalent is pretty obvious. Check out CATALINA_HOME - where Tomcat is installed - versus CATALINA_BASE - where this instance stores its files. Note the JAVA_OPTS for increased stack and heap sizes, too; this line is optional. C:\cattery is where I store the data for the four instances. -- snip -- set CATALINA_HOME=C:\Program Files\Apache Group\Tomcat 4.1 set CATALINA_BASE=c:\cattery\instance1 set JAVA_OPTS=-Xms64m -Xmx256m cd %CATALINA_HOME%\bin startup -- snip -- Under CATALINA_BASE for each instance, you'll need conf, logs, temp, webapps, and work directories. The easiest way to create these is to copy them from CATALINA_HOME. You'll then need to modify conf/server.xml to make sure each instance is running on its own ports - don't forget to change the shutdown port! Good luck, yell if you have any problems getting this to work. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multiple tomcat instances
Steve, In the Host definition you specify an appBase for the applications directory (which will have a new ROOT under it), a Valve for the AccessLog, and whatever else you want to split off. The applications in the appBase directory will have their own WEB-INFO where you specify Servlet mappings, etc. The only restriction that I can think of is that the servlets in WEB-INF/web.xml must have different Servlet-names from those in conf/web.xml Fritz -Original Message- From: Kelly, Steve [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 7:41 AM To: Tomcat Users List Subject: RE: Multiple tomcat instances Can you expand a bit more how this would work. I understand how you can have two domains pointing to the same ip address but how do I split my logs, servlet mapping and web apps. Steve. -Original Message- From: Fritz Schneider [mailto:[EMAIL PROTECTED] Sent: 15 April 2005 12:10 To: 'Tomcat Users List' Subject: RE: Multiple tomcat instances Another option which uses fewer resources but doesn't provide quite the same degree of isolation is to run two hosts in the same Catalina service. If your DNS maps www.mydomain.com and test.mydomain.com to the same IP address, they can share the same ports. Each one can have its own logs, Servlet mappings, and set of apps. Fritz -Original Message- From: Peter Crowther [mailto:[EMAIL PROTECTED] Sent: Friday, April 15, 2005 2:55 AM To: Tomcat Users List Subject: RE: Multiple tomcat instances From: Kelly, Steve [mailto:[EMAIL PROTECTED] Is it possible to run multiple instances of tomcat on the same server, for example to support production and test environments ? Yes. I run up to four on this machine - two (one 4.1, one 5.0) are running as I type this. Here's a Windows script that works (give or take the HOME path) for Tomcat 4 and 5.0 - untested on 5.5, but I can't see why it should fail. The UNIX equivalent is pretty obvious. Check out CATALINA_HOME - where Tomcat is installed - versus CATALINA_BASE - where this instance stores its files. Note the JAVA_OPTS for increased stack and heap sizes, too; this line is optional. C:\cattery is where I store the data for the four instances. -- snip -- set CATALINA_HOME=C:\Program Files\Apache Group\Tomcat 4.1 set CATALINA_BASE=c:\cattery\instance1 set JAVA_OPTS=-Xms64m -Xmx256m cd %CATALINA_HOME%\bin startup -- snip -- Under CATALINA_BASE for each instance, you'll need conf, logs, temp, webapps, and work directories. The easiest way to create these is to copy them from CATALINA_HOME. You'll then need to modify conf/server.xml to make sure each instance is running on its own ports - don't forget to change the shutdown port! Good luck, yell if you have any problems getting this to work. - Peter - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do I restrict access to webapps applications from browser users?
Ike. You need to complete your security-constraint with authorization, login, and role information. Here is what works for me: !-- Define a Security Constraint on this Application -- security-constraint web-resource-collection web-resource-nameRestricted Files/web-resource-name url-pattern/*/url-pattern /web-resource-collection auth-constraint !-- NOTE: This role is not present in the default users file -- role-nameapp1/role-name /auth-constraint /security-constraint !-- Define the Login Configuration for this Application -- login-config auth-methodBASIC/auth-method realm-nameMy Application/realm-name /login-config !-- Security roles referenced by this web application -- security-role description The role that is required to log in to the application /description role-nameapp1/role-name /security-role You might also want to check out the single login valve. Fritz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How do I restrict access to webapps applications from browser users?
Ike, All I'm saying is Here is what works for me. But it seems that you must have some form of authentication as well as a statement of the required role if you want to restrict access to certain users. Fritz -Original Message- From: Ikonne, Ike [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 13, 2005 9:30 AM To: Tomcat Users List Subject: RE: How do I restrict access to webapps applications from browser users? Hi Fritz, So, are you saying that I have to have basic authentication enabled in order to restrict access to certain directories? Thanks, Ike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Help needed with Tomcat 5.5.7 admin app (MBeanServer is not available)
Simon, I had the same problem. Then I discovered that the admin app had to be installed under ${Catalina.home}/server/webapps rather than just ${Catalina.home}/webapps. Once I moved the directory to where the Context docBase said it was supposed to be, it started working. Fritz _ From: Simon Watson [EMAIL PROTECTED] Subject: Help needed with Tomcat 5.5.7 admin app (MBeanServer is not available) Date: Sun, 06 Feb 2005 16:18:49 GMT _ Hi there, I've just installed Tomcat 5.5.7 (using the .exe installer on WinXP) and, whilst the server and manager app work fine, I'm having problems with the optional admin webapp. I downloaded the admin zip file and extracted the files to the appropriate locations. The admin app starts ok and I can log in, but when I click on Environmental Entries (or try to add a datasource), I get a 500 response with the message MBeanServer is not available (stack trace from stdout log below).