RE: Problem with mime types, nobody answers?
At 18:57 26/03/02, you wrote: You question isn't clear to me. Tomcat 3.2.x still includes a conf/web.xml, in the binary distribution, but it is no longer used for establishing web application default settings. I'm not sure at which point it stopped being used. As a result, the default settings a web application gets are minimal and includes no mime mappings. You will need to add any mime mappings you need to your web application's WEB-INF/web.xml file. For portability, this is the correct location to specify this. And how can I put this mime types in the file? I tried but I don't know the syntax of the xml file. Where can I get this information? Thanks. - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (Ivie) C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain) Tfno.: +34 - 963190050 / +34 - 963930816 Fax.: +34 - 963190055 / +34 - 963930856 e-mail: [EMAIL PROTECTED] -- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Problem with mime types, nobody answers?
Hello all, I have tomcat 3.2.2 running in a debian potato 2.2.l9. I have a problem with mime types. When I get a page with extension .css I see that the mime type that the server returns to me is text/plain. I find a file under the conf directory that is web.xml that there are lines with this: mime-mapping extension wrl /extension mime-type x-world/x-vrml /mime-type /mime-mapping I think that here is where I can put my extensions and I put the following lines: mime-mapping extension css /extension mime-type text/css /mime-type /mime-mapping mime-mapping extension js /extension mime-type application/x-javascript /mime-type /mime-mapping But when I restart the tomcat server and I get the file http://localhost:8080/estilos.css, the mime type is still text/plain, and not text/css. What am I making wrong? Thanks. - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (Ivie) C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain) Tfno.: +34 - 963190050 / +34 - 963930816 Fax.: +34 - 963190055 / +34 - 963930856 e-mail: [EMAIL PROTECTED] -- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Problem with mime types, nobody answers?
At 18:32 26/03/02, you wrote: The conf/web.xml file is no longer read by Tomcat 3.2.x. You will need to add these entries to the WEB-INF/web.xml in each web application that needs them. But, there would be a default file with the mime types. Or not? - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (Ivie) C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain) Tfno.: +34 - 963190050 / +34 - 963930816 Fax.: +34 - 963190055 / +34 - 963930856 e-mail: [EMAIL PROTECTED] -- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Problem with mime types
Hello all, I have tomcat 3.2.2 running in a debian potato 2.2.l9. I have a problem with mime types. When I get a page with extension .css I see that the mime type that the server returns to me is text/plain. I find a file under the conf directory that is web.xml that there are lines with this: mime-mapping extension wrl /extension mime-type x-world/x-vrml /mime-type /mime-mapping I think that here is where I can put my extensions and I put the following lines: mime-mapping extension css /extension mime-type text/css /mime-type /mime-mapping mime-mapping extension js /extension mime-type application/x-javascript /mime-type /mime-mapping But when I restart the tomcat server and I get the file http://linux.ivie.es:8080/estilos.css, the mime type is still text/html, and not text/css. What am I making wrong? Thanks. - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (Ivie) C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain) Tfno.: +34 - 963190050 / +34 - 963930816 Fax.: +34 - 963190055 / +34 - 963930856 e-mail: [EMAIL PROTECTED] -- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Problem with mime types
Hello all, I have tomcat 3.2.2 running in a debian potato 2.2.l9. I have a problem with mime types. When I get a page with extension .css I see that the mime type that the server returns to me is text/plain. I find a file under the conf directory that is web.xml that there are lines with this: mime-mapping extension wrl /extension mime-type x-world/x-vrml /mime-type /mime-mapping I think that here is where I can put my extensions and I put the following lines: mime-mapping extension css /extension mime-type text/css /mime-type /mime-mapping mime-mapping extension js /extension mime-type application/x-javascript /mime-type /mime-mapping But when I restart the tomcat server and I get the file http://localhost:8080/estilos.css, the mime type is still text/plain, and not text/css. What am I making wrong? Thanks. - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (Ivie) C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain) Tfno.: +34 - 963190050 / +34 - 963930816 Fax.: +34 - 963190055 / +34 - 963930856 e-mail: [EMAIL PROTECTED] -- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED] - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (Ivie) C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain) Tfno.: +34 - 963190050 / +34 - 963930816 Fax.: +34 - 963190055 / +34 - 963930856 e-mail: [EMAIL PROTECTED] -- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Unload a servlet in tomcat
Hello everybody, I'm using tomcat 3.22 + apache to serve servlets in a web. Normally, when I modify a servlet and I recompile it, the servlet in memory is substituted by the new servlet, but sometimes the old servlet remains in the server memory. Anybody knows some way to unload the servlet from memory without shutting down and starting up tomcat? Thanks. - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (Ivie) C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain) Tfno.: +34 - 963190050 / +34 - 963930816 Fax.: +34 - 963190055 / +34 - 963930856 e-mail: [EMAIL PROTECTED] -- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Unload a servlet in tomcat
Hello everybody, I'm using tomcat 3.22 + apache to serve servlets in a web. Normally, when I modify a servlet and I recompile it, the servlet in memory is substituted by the new servlet, but sometimes the old servlet remains in the server memory. Anybody knows some way to unload the servlet from memory without shutting down and starting up tomcat? Thanks. - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (Ivie) C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain) Tfno.: +34 - 963190050 / +34 - 963930816 Fax.: +34 - 963190055 / +34 - 963930856 e-mail: [EMAIL PROTECTED] -- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Unload a servlet in tomcat
Hello everybody, I'm using tomcat 3.22 + apache to serve servlets in a web. Normally, when I modify a servlet and I recompile it, the servlet in memory is substituted by the new servlet, but sometimes the old servlet remains in the server memory. Anybody knows some way to unload the servlet from memory without shutting down and starting up tomcat? Thanks. - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (Ivie) C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain) Tfno.: +34 - 963190050 / +34 - 963930816 Fax.: +34 - 963190055 / +34 - 963930856 e-mail: [EMAIL PROTECTED] -- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Change the default error message
At 08:08 11/01/02 -0600, you wrote: Oh the dangers of modifying code without first testing it! I modified that from a plain 'Exception', because I thought I was being clever. Catch either the exact specific Exceptions that may be thrown (eg: NullPointer, IO) or just catch 'Exception', as I was originally doing. Well, I can catch Exception, but know it doesn't works the sendRedirect method that you has write. I put the following: protected void sendErrorRedirect(HttpServletRequest request, HttpServletResponse response, String errorPageURL, Throwable e) { try { //request.setAttribute (javax.servlet.jsp.jspException, e); getServletConfig().getServletContext().getRequestDispatcher(errorPageURL).forward(request, response); } catch (Exception ex) { log(getServletName() + .sendErrorRedirect , ex); } } And in the catch part: } catch (Exception ex) { sendErrorRedirect(req, resp, http://hgarcia/error.html;, ex); } How can I redirect an html page, not a jsp page? Thanks. - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (Ivie) C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain) Tfno.: +34 - 963190050 / +34 - 963930816 Fax.: +34 - 963190055 / +34 - 963930856 e-mail: [EMAIL PROTECTED] -- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Change the default error message
Hello all, This is the first time I write to this page, and I send a salutation to all people. Well, this is my question. I have installed jakarta tomcat 3.2.2 in a linux machine. All works fine but I want change one thing and I don't know how can I make it. When occurs some error in a servlet, the servlet engine sends a response like this: Error: 500 Localizacion: /examples/servlet/EnbreveServlet Error interno del servlet: java.lang.NullPointerException at EnbreveServlet.doGet(EnbreveServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) Can I change this information to a default html page? Thanks. PS: Could be this is a FAQ, but I have searching in the FAQ-o-matic and in the archive list and I can't find answer to my question. - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (Ivie) C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain) Tfno.: +34 - 963190050 / +34 - 963930816 Fax.: +34 - 963190055 / +34 - 963930856 e-mail: [EMAIL PROTECTED] -- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: Change the default error message
At 07:16 11/01/02 -0600, you wrote: You could use a JSP error page from a servlet. Catch any ServletException errors, and do a redirect to your JSP error page. Here's short snips from one of my servlets: try { //sending email from the servlet... } catch (ServletException ex) { log(Failure to send email, ex); sendErrorRedirect(req, res, /error.jsp, ex); } protected void sendErrorRedirect(HttpServletRequest request, HttpServletResponse response, String errorPageURL, Throwable e) { try { request.setAttribute (javax.servlet.jsp.jspException, e); getServletConfig().getServletContext().getRequestDispatcher(errorPageURL).fo rward(request, response); } catch (Exception ex) { log(getServletName() + .sendErrorRedirect , ex); } } Hope that helps... But, I can't catch ServletException. When I try to catch I get the following message: EnbreveServlet.java:102: exception javax.servlet.ServletException is never thrown in body of corresponding try statement } catch (ServletException se ) { ^ - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (Ivie) C/ Guardia Civil, 22 esc-2 1º 46020 - Valencia (Spain) Tfno.: +34 - 963190050 / +34 - 963930816 Fax.: +34 - 963190055 / +34 - 963930856 e-mail: [EMAIL PROTECTED] -- -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
Problem in solaris
Hello list, I'm using tomcat 3.2.3 with apache in a solaris 2.7. I have downloaded the source code of tomcat 3.2.3 and compile it in the solaris 2.7. I have other computer with tomcat in a debian linux. The version of tomcat is the binary file of the 3.2.2. The problem is that I have a servlet that gets information from an oracle database and returns a table with the results. When I run this servlet in the linux machine there isn't any problem, but when I run it in the solaris the conexion to the oracle database downs after aproximately one hour (I don't know exactly the time). Why happens this? Is possible that the dispose of the servlet in the solaris doesn't work fine? Any help? Thanks. - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (IVIE) C/ Guardia Civil, 22 esc-2 primero 46020 - Valencia ( Spain ) Tfno.: +34 - 963930816 Fax.: +34 - 963930856 e-mail: [EMAIL PROTECTED] --
Problem in solaris
Hello list, I'm using tomcat 3.2.3 with apache in a solaris 2.7. I have downloaded the source code of tomcat 3.2.3 and compile it in the solaris 2.7. I have other computer with tomcat in a debian linux. The version of tomcat is the binary file of the 3.2.2. The problem is that I have a servlet that gets information from an oracle database and returns a table with the results. When I run this servlet in the linux machine there isn't any problem, but when I run it in the solaris the conexion to the oracle database downs after aproximately one hour (I don't know exactly the time). Why happens this? Is possible that the dispose of the servlet in the solaris doesn't work fine? Any help? Thanks. - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (IVIE) C/ Guardia Civil, 22 esc-2 primero 46020 - Valencia ( Spain ) Tfno.: +34 - 963930816 Fax.: +34 - 963930856 e-mail: [EMAIL PROTECTED] --
Re: Problem in solaris
At 14:26 04/10/01 +0200, you wrote: Hello Hector Is the database running on the same machine as the tomcat engine? If they are not on the same machine are the two machines on the same network? Many routers/gateways etc.. will cut a tcp connection that has been inactive for a period of time. Oracle may also have a timeout for a connection but I am not sure about that. Maybe you should try opening/closing the connection each time you use it or at least checking to see if it is still there before using it. The database is running in a third database and there are in the same network. Is there any way to say oracle that the connexion is still active? - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (IVIE) C/ Guardia Civil, 22 esc-2 primero 46020 - Valencia ( Spain ) Tfno.: +34 - 963930816 Fax.: +34 - 963930856 e-mail: [EMAIL PROTECTED] --
Re: Problem in solaris
At 16:17 04/10/01 +0200, you wrote: Oracle probably has a connection time limit. Maybe you should shut the db connection when you are finished with it and reopen it when you need it again. If you are worried about performance then you should be using a database pool. Tomcat 4 comes with tyrex which can do that for you. And, could be for any compilation parameter? Maybe the tomcat engine doesn't run the destroy method of the servlet at time. Maybe the oracle timeout occurs before that the tomcat runs the destroy method. - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (IVIE) C/ Guardia Civil, 22 esc-2 primero 46020 - Valencia ( Spain ) Tfno.: +34 - 963930816 Fax.: +34 - 963930856 e-mail: [EMAIL PROTECTED] --
Re: Changing Tomcat Port 8080
At 13:16 04/10/01 -0400, you wrote: There is a confliced between programs on port 8080. I need to change Tomcat to listen to another port other than 8080. The other aplication requires Apache to use port 8080. Can anyone tell me how to change the port number that Tomcat uses? Look at the server.xml file in $TOMCAT_HOME/conf - Héctor Garcia Peris Dpto. Informática Instituto Valenciano de Investigaciones Económicas S.A. (IVIE) C/ Guardia Civil, 22 esc-2 primero 46020 - Valencia ( Spain ) Tfno.: +34 - 963930816 Fax.: +34 - 963930856 e-mail: [EMAIL PROTECTED] --