Re: How to configure Tomcat to suppress adding port to URL??????
You could use the proxyPort attribute in your http Connector in server.xml, for example: Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=8082 minProcessors=5 maxProcessors=75 enableLookups=true acceptCount=10 debug=0 connectionTimeout=2 proxyPort=80 useURIValidationHack=false / (The server will still run on port 8082 so you'll need to redirect from port 80 to 8082 by using a proxy or firewall rules) Rademacher Tobias wrote: Hi Folks, is it possible to configure Tomcat 4.0 to suppress the port into the url adress (URL rewriting etc)? If yes who and in which config file? I need this due to Tomcat should run into a specical security zone and the firewall maps a specific port to my tomcat server. Therefore I would like to force Tomat not returing the Port into the URL's. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: DTD for server.xml??
I'm doing it in my server.xml file this way: !DOCTYPE Server [ !ENTITY inc_vhosts SYSTEM /etc/tomcat4/vhosts.xml ] and somewhere in the Engine: inc_vhosts; Turner, John wrote: That makes sense. OK, next question, in a thread started yesterday, it was mentioned (correctly, I assume) that you could use XML entities to include external XML files into server.xml. So, this link came up on Google: http://tech.irt.org/articles/js212/#example_2 Which leads a person to believe that something like !ENTITY vhost SYSTEM /path/to/tomcat/conf/vhost1.xml Then towards the bottom: vhost1 would work in server.xml, but it doesn't. Error: Catalina.start: org.xml.sax.SAXParseException: The content beginning ! is not legal markup. Is this a futile path, or is it possible to include external XML into server.xml when server.xml is parsed? If so, how? Thanks! John -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
tomcat 4.1 displays a blank page when compiling a JSP with compilationerrors
On one of our Tomcat 4.1.12 servers, when someone requests a JSP page that has compilation errors, he gets a blank page instead of getting a tomcat generated page showing the compilation error. So we have to look in tomcat's logs to get the error message. That's nice for a production server, but I would like to have errors directly in the browser when developping. How can I enable error messages to be sent to the browser? Is hiding the error pages the normal default behavior? I have some Tomcat 4.1.12 servers (one per machine, development done on NT and production servers on linux) which have always sent jsp compilation error messages to the browser by default, while others only write the messages to logs. I tried the following: - set debug=1 to everything which has a debug parameter in server.xml - set jasper's logVerbosityLevel init-param to DEBUG (and left default values for other parameters) but still no error message shown in browser. Am I missing something in the documentation? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: tomcat 4.1 displays a blank page when compiling a JSP with compilationerrors
Nope, I tried making a very simple JSP with syntax errors: % test % which should give me an error message because test is not defined, but I still only get a blank page, and an error only in the logs Robin Lee (Tech Support) wrote: Hi Christos, Quick Question for you. Does your JSP page have an include in it? Example: Login.jsp This page includes another jsp page called LoginForm.jsp. Does your jsp page have this? If so, I've noticed that my pages will show up blank if there is an error, where there is an include. Is this your situation? If so... because you are developing, the easiest way would be to call the include jsp directly (http://localhost/xxx/LoginForm.jsp). This will then give you the error in the browser. I've noticed this in tomcat, as well as Java Web Server when i first used that ages ago... -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
apache+mod_jk: graceful restart of tomcat
I use Apache 1.3.27 connected to Tomcat 4.1.12 with mod_jk, using ajp13. When I restart Tomcat, if someone tries to access a jsp/servlet from Apache, he gets an error message from Apache (Internal Server Error - The server encountered an internal error or misconfiguration and was unable to complete your request.) until Tomcat has finished restarting. Is there a way to tell mod_jk to wait until Tomcat has finished restarting (retry connecting to the tomcat ajp port until it responds or until a certain timeout) and then serve the request? If that's not possible, can I display a different error message than the default? (I don't want to use the apache ErrorDocument directive because that would hide other unexpected errors too and give a misleading message) Another solution I considered is to use jk's load balancing: - Two tomcat servers with identical configuration (except port numbers) would run simultenaously on the same machine - When I need to restart tomcat (configuration change, new virtual host added), I would first restart only the first tomcat server (all requests would then be sent to the second server by mod_jk), and when the first one finishes starting, restart the second one Has anyone done something similar to this? Do you think it's a good idea or would I just be wasting memory/cpu time? Thanks -- To unsubscribe, e-mail: mailto:tomcat-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:tomcat-user-help;jakarta.apache.org
problem with jasper 2 using jikes
I am trying to use Jasper 2 with Jikes instead of the internal javac, but when I request a jsp file, I only get empty pages. I followed the instructions in the tomcat 4.1 jasper howto, deleted all files in the tomcat work dir and set the logVerbosityLevel param to DEBUG, and I get this in the context's log file when a jsp file is requested: 2002-10-10 11:08:39 Scratch dir for the JSP engine is: /usr/share/tomcat4/work/Standalone/localhost/_ 2002-10-10 11:08:39 IMPORTANT: Do not modify the generated servlets 2002-10-10 11:09:15 JspEngine -- /index.jsp 2002-10-10 11:09:15 ServletPath: /index.jsp 2002-10-10 11:09:15 PathInfo: null 2002-10-10 11:09:15 RealPath: /web/intranet/index.jsp 2002-10-10 11:09:15 RequestURI: /index.jsp 2002-10-10 11:09:15 QueryString: null 2002-10-10 11:09:15 Request Params: 2002-10-10 11:09:16 Compiler jikes 2002-10-10 11:09:18 null Is there anything else I could do to debug this? I use Tomcat version 4.1.12 and Jike 1.15 installed in /usr/bin. Ant should be able to find Jikes because it is in the system PATH, do I need to configure anything else? Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
load-on-startup's effect on tomcat startup time?
I use the load-on-startup tag in web.xml to call a servlet when its context is started. The servlet's init() reads a configuration file and stores the configuration as a singleton object in the ServletContext. I first thought this was a good idea, so that the user doesn't see the 2 or 3 seconds it takes to parse the file when a servlet is first called in the context. Now I use a similar method for 5 differents web apps, and it seems to have an effect on tomcat's startup time. If I understand the startup process correctly, this is what happens: - tomcat reads its server.xml - tomcat initializes all contexts defined in server.xml, loading any load-on-startup servlet for each context - then, only once all contexts are initialized, it opens connectors (HttpConnector, Ajp13Connector...) So now a user has to wait for ALL contexts to have been initialized before getting a response to a servlet call. If I remove the load-on-startup instruction in all the web.xml files, tomcat starts responding to requests much faster, but the first client to request a servlet on each context has a 2 seconds delay before his request is answered. Is my understanding of the startup process right? Would there be a way to avoid waiting for load-on-startup servlets to be loaded before opening an HttpConnector, but still having the servlet initialized before a clients makes a first request? -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: restarting Tomcat 4
It works fine if you wait long enough between calling the stop and start script, but not if you write a restart script which calls catalina.sh start and immediately after, catalina.sh stop, because then there's no delay between the two, and tomcat doesn't have the time to shutdown before you try (and fail) to restart it. In my case, I need to wait 10 seconds between doing a shutdown and a startup, but this varies depending on the number of webapps you have (in the case of the original poster, it's 40 seconds), so I agree with him there should be a more elegant way to restart the server. Thanh Duong wrote: Hi, to start tomcat in a separate window use $CATALINA_HOME/bin/catalina.sh start to stop tomcat use $CATALINA_HOME/bin/catalina.sh stop It works fine so you don't need to wait for ending the tomcat process. Bye Thanh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Donnerstag, 14. Februar 2002 16:02 To: [EMAIL PROTECTED] Subject: restarting Tomcat 4 Hi. I was wondering if anyone out there has a good way of restarting Tomcat 4...? In version 3, I used to just be able to do $TOMCAT_HOME/bin/shutdown.sh; $TOMCAT_HOME/bin/startup.sh. Now, in version 4 though, since the starting and stopping scripts seem to have been modified to be background processes, this no longer works since it won't wait for the first script to finish anymore before starting the second one. Now, my restart alias looks like this: $CATALINA_HOME/bin/shutdown.sh; sleep 40; $CATALINA_HOME/bin/startup.sh. Pretty lame, and I just arrived at the sleep value by trial and error (actually as I add more stuff in my server.xml file, I think the shutdown might even take longer, so I may need to bump this value up). Does anyone have any more elegant/exact ways of doing this? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
manager app: deploy new Host ?
I use the tomcat manager app to be able to modify existing sites without having to restart the Tomcat server. It works fine, but I'm hosting multiple sites on the same Tomcat server, and each site has its own virtual host. Each virtual host has a corresponding Host in server.xml, so when I want to deploy a whole new site, I have to add a new Host and restart the server. Is there a way to tell tomcat to reread the server.xml, without restarting the server? Thanks -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
configuring JNDI resources in web.xml
According to the Tomcat JNDI Resources HOWTO, if I want to use a JDBC connection pool, I need to add settings both in server.xml and WEB-INF/web.xml. Would it be possible to configure it entirely in web.xml? I would like to have something equivalent to the following example, but that would be stored in web.xml. That way my configuration would be independant of the servlet container, and it would make team development easier (where each developper has his own tomcat server) : Resource name=jdbc/EmployeeDB auth=Container type=javax.sql.DataSource/ ResourceParams name=jdbc/EmployeeDB parameter nameuser/name valuedbusername/value /parameter parameter namepassword/name valuedbpassword/value /parameter parameter namedriverClassName/name valueorg.hsql.jdbcDriver/value /parameter parameter namedriverName/name valuejdbc:HypersonicSQL:database/value /parameter /ResourceParams Is it possible? -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]