Re: sending smtp mail failure
Easiest way is to setup a normal email program and see what the error messages are. If the machine doesnt have core mailing engines installed, it will probably tell you. If you on windows, try Outlook express, detailed messages will probably point you in right direction. Code should look something like this public boolean prepareConnection(String smtpHost){ this.smtpHost = smtpHost; fSessionInited = true; try{ java.util.Properties properties = System.getProperties(); properties.put(mail.smtp.host, smtpHost); session = Session.getInstance(properties,null); } catch(Exception e) { fSessionInited = false; } return fSessionInited; } - Original Message - From: Mighty Tornado [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Friday, April 06, 2007 7:30 AM Subject: sending smtp mail failure Hi, I set up a small web app and the servlet is supposed to send an email using JavaMail. But I am getting exceptions - Connection Timed out every time. I am using Gmail as an smtp server to bounce emails off. How can I avoid the Connection Timed out exception? Could it be because of my firewall? If so, which process should I permission? Thank you, MT - 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: Make Tomcat run slow
Thanks for this reply! Shankar Unni wrote: * Renice these make-work processes so that they are at the highest priority (not real-time, though, or you'll have to reboot your box :-); and renice the Tomcat so that it's at the lowest priority. Unfortunately this will not work: - I can not modify the code for my webservice - I need to slow down only my own implementation om Tomcat, and most definately not the entire machine! I am not by far the only user of this machine, my entire company depends on it :) Besides, I have no idea how to renice a process on a modern iSeries so that it runs unimaginably slow... Greetings, Lucas - 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 documentation suggestion - for installs and config, please also link to this web page.
It is possible to install, but not to follow the development processes in the tomcat page. I am a Tomcat newbie. Perhaps you can create the patched version? It will be a good contribution. - Anil --- Hassan Schroeder [EMAIL PROTECTED] wrote: On 4/6/07, Anil Philip [EMAIL PROTECTED] wrote: I was trying to install and run Tomcat 6, but could not proceed because the build.xml in the documentation over here was broken due to the new directory structure. It's perfectly possible (and typical) to install and run Tomcat without any reference to that build.xml file, so if you're having problems, that probably isn't one of them. :-) OTOH, if it's out of date, creating a patched version would be a good contribution -- better than pointing to some third-party site... IMHO! -- Hassan Schroeder [EMAIL PROTECTED] - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites to find flight and hotel bargains. http://farechase.yahoo.com/promo-generic-14795097 - 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: [OT] GET-then-redirect 'reload' behavior
Zitat der eMail vom 06.04.2007 um 12:41 Uhr: I recently discovered that a redirect-after-GET does not offer this protection. I have a link on one page that duplicates the current record, then does a redirect to the view record page displaying the new record. Any other ideas or thoughts? As far as I know, with this kind of action performed on a GET request, you always have the possibility of unintentionally duplicated records. I think the HTTP spec says that there should be _no_ change of status performed on a GET request - GET should alwasy be repeatable without danger. For actions like yours, that's what other HTTP commands like POST and PUT are for. Because of that, some browser or cache utility may always prefetch pages reachable per GET request - resulting in unwanted action on your side. Even search engines will trigger actions if such a page is public. Or think of someone setting up a local search engine also... Just keep that in mind or correct me if I'm wrong. Andreas signature.asc Description: PGP signature
Apache2 Tomcat5.5 auto mod_jk 1.2.18 only works localhost
I've been trying to get apache 2(running on port 80) to front end my tomcat instance(running port 8080) using this tutorial http://www.slholmes.org/journal/2006/7/15/apache-2-tomcat-5-mod_jk-xp.html I can get the following URL's to work just fine from localhost http://localhost:8080/servlest-examples (hitting tomcat directly) http://localhost/servlets-examples (hitting apache which is passing off to tomcat) The problem comes in when I attempt to have my home router redirect traffic(port forward) to the apache instance using a domain instead of localhost. This doesn't work for my tomcat apps. It will display the apache start page just fine but will show the following 404 when I try and request one of the apps deployed in tomcat. Here is the error I get when I try The requested URL /servlets-examples was not found on this server. Apache/2.0.59 (Unix) DAV/2 SVN/1.4.3 mod_jk/1.2.18 Server at www.**domainremoved**.com Port 80 I've atttached Apache's httpd.conf , Tomcats server.xml, and the auto generated mod_jk.conf I think these are the relevant pieces to the puzzle. Please let me know if there is something else I should focus on. Thanks in advance. Once I figure this out, I'll write up a how to in order to help the next person out. Thanks Mike !-- Example Server Configuration File -- !-- Note that component elements are nested corresponding to their parent-child relationships with each other -- !-- A Server is a singleton element that represents the entire JVM, which may contain one or more Service instances. The Server listens for a shutdown command on the indicated port. Note: A Server is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- Server port=8005 shutdown=SHUTDOWN !-- Comment these entries out to disable JMX MBeans support used for the administration web application -- Listener className=org.apache.catalina.core.AprLifecycleListener / Listener className=org.apache.catalina.mbeans.ServerLifecycleListener / Listener className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener / Listener className=org.apache.catalina.storeconfig.StoreConfigLifecycleListener/ !-- Global JNDI resources -- GlobalNamingResources !-- Test entry for demonstration purposes -- Environment name=simpleValue type=java.lang.Integer value=30/ !-- Editable user database that can also be used by UserDatabaseRealm to authenticate users -- Resource name=UserDatabase auth=Container type=org.apache.catalina.UserDatabase description=User database that can be updated and saved factory=org.apache.catalina.users.MemoryUserDatabaseFactory pathname=conf/tomcat-users.xml / /GlobalNamingResources !-- A Service is a collection of one or more Connectors that share a single Container (and therefore the web applications visible within that Container). Normally, that Container is an Engine, but this is not required. Note: A Service is not itself a Container, so you may not define subcomponents such as Valves or Loggers at this level. -- !-- Define the Tomcat Stand-Alone Service -- Service name=Catalina !-- A Connector represents an endpoint by which requests are received and responses are returned. Each Connector passes requests on to the associated Container (normally an Engine) for processing. By default, a non-SSL HTTP/1.1 Connector is established on port 8080. You can also enable an SSL HTTP/1.1 Connector on port 8443 by following the instructions below and uncommenting the second Connector entry. SSL support requires the following steps (see the SSL Config HOWTO in the Tomcat 5 documentation bundle for more detailed instructions): * If your JDK version 1.3 or prior, download and install JSSE 1.0.2 or later, and put the JAR files into $JAVA_HOME/jre/lib/ext. * Execute: %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows) $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix) with a password value of changeit for both the certificate and the keystore itself. By default, DNS lookups are enabled when a web application calls request.getRemoteHost(). This can have an adverse impact on performance, so you can disable it by setting the enableLookups attribute to false. When DNS lookups are disabled, request.getRemoteHost() will return the String version of the IP address of the remote client. -- !-- Define a non-SSL HTTP/1.1 Connector on port 8080 -- Connector port=8080 maxHttpHeaderSize=8192 maxThreads=150 minSpareThreads=25 maxSpareThreads=75 enableLookups=false redirectPort=8443 acceptCount=100
Re: Make Tomcat run slow
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lucas, L.W. van Braam van Vloten wrote: Unfortunately this will not work: - I can not modify the code for my webservice - I need to slow down only my own implementation om Tomcat, and most definately not the entire machine! I am not by far the only user of this machine, my entire company depends on it :) If you can't modify your webapp, and you can't modify the machine, then you basically can't do what you are trying to do. :( If you just need to simulate some network lag time, you could use a firewall to block traffic until you get a timeout. Presumably you can find a port to block that will stall your webapp... - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGF6eV9CaO5/Lv0PARAvkQAKCRivFiLBIPQjfKY2FTNFO6SupuFQCePW7x RBaXzVpZf02WLurphaUHI1w= =r30A -END PGP SIGNATURE- - 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: [OT] GET-then-redirect 'reload' behavior
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andreas, Andreas Prieß wrote: I think the HTTP spec says that there should be _no_ change of status performed on a GET request - GET should alwasy be repeatable without danger. While I think you're right, and agree in general, my UI makes the most sense with links in this case. It turns out that this really isn't happening. I must have been hallucinating. In any event, I may decide to switch to buttons. I dunno... For actions like yours, that's what other HTTP commands like POST and PUT are for. AFAIK, there's no way to instruct a browser to do a PUT request, especially not in a standard link. Even search engines will trigger actions if such a page is public. Or think of someone setting up a local search engine also... That's why these pages are neither public nor searchable ;) - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGF6h19CaO5/Lv0PARAsBkAKCMGjN1uX+6F6BKbMoFs3pvZPZ43gCgjZD0 vlfJoOFEITJ3iC/1E3Srw+Y= =xM4h -END PGP SIGNATURE- - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
what is java_opt parameter?
Hi Thank you for reading my post. Can some one please tell me what is java_opts and how does it works? is it some jvm_options? Thanks -- View this message in context: http://www.nabble.com/what-is-java_opt-parameter--tf3541017.html#a9884745 Sent from the Tomcat - User mailing list archive 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 documentation suggestion - for installs and config, please also link to this web page.
On 4/7/07, Anil Philip [EMAIL PROTECTED] wrote: It is possible to install, but not to follow the development processes in the tomcat page. I am a Tomcat newbie. Perhaps you can create the patched version? OK, here's a patch file -- totally untested, since I've never used this build.xml, and don't have the time right now to dig into it any further. Maybe you can test the patch and tell us if it works :-) (And if not, what /specific/ problem(s) you're seeing.) - *** *** 218,235 -- !-- Include all elements that Tomcat exposes to applications -- ! pathelement location=${catalina.home}/common/classes/ ! fileset dir=${catalina.home}/common/endorsed include name=*.jar/ /fileset - fileset dir=${catalina.home}/common/lib - include name=*.jar/ - /fileset - pathelement location=${catalina.home}/shared/classes/ - fileset dir=${catalina.home}/shared/lib - include name=*.jar/ - /fileset - /path --- 218,226 -- !-- Include all elements that Tomcat exposes to applications -- ! fileset dir=${catalina.home}/lib include name=*.jar/ /fileset /path - FWIW, -- Hassan Schroeder [EMAIL PROTECTED] - 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: what is java_opt parameter?
Hi... I'm often wrong... The one is a command line option the other is an environment variable. ie tomcat5 ++JvmOptions=blah blah On windows those params will get stuck in the registry which immediately asks the question what happens on linux I dont know, but it makes me think that JvmOptions has a lot to do with a windows service. Inside a Java program one can get at parameters with java.util.Properties properties = System.getProperties(); And these can be set in a number of ways... Either from another program... in code ie setProperty(blah blah) or java -Dfile.encoding=utf-8 -jar MyProgram.jarie on the command line or set (export) JAVA_OPTS=-Dname1=value1 -Dname2=value2 ... ie from environment variables for tomcat. If given a choice, I would use JAVA_OPTS... its Java, and definitely ports to linux. For example type java -X it will give you all the options for setting memory in jre All those parameters can be set in JAVA_OPTS but I'm not sure if they make sense on the command line with JvmOptions and even then I think all that happens is the service program reads it from the windows registry and sets JAVA_OPTS. Maybe that helps Maybe Turk can give us more info... I think he wrote the windows service module... Regards - Original Message - From: legolas [EMAIL PROTECTED] To: users@tomcat.apache.org Sent: Saturday, April 07, 2007 4:59 PM Subject: what is java_opt parameter? Hi Thank you for reading my post. Can some one please tell me what is java_opts and how does it works? is it some jvm_options? Thanks -- View this message in context: http://www.nabble.com/what-is-java_opt-parameter--tf3541017.html#a9884745 Sent from the Tomcat - User mailing list archive 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] - 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: Apache2 Tomcat5.5 auto mod_jk 1.2.18 only works localhost
Try this Add this to your server.xml Host name=Your Host Name appBase=webapps unpackWARs=true autoDeploy=true xmlValidation=false xmlNamespaceAware=false !-- USE THIS FOR AUTO GEN OF JK MOD for Apache Forwarding to tomcat -- Listener className=org.apache.jk.config.ApacheConfig append=true forwardAll=false modJk=D:/DEV/Apache2.2/modules/mod_jk.so/ /Host Then have a look at conf\auto\mod_jk.so and map Apache to that file. What this stuff does is generate the file (WHEN TOMCAT STARTS) needed by Apache automatically... nice! Enjoy... - Original Message - From: Shoe To: users@tomcat.apache.org Sent: Saturday, April 07, 2007 4:09 PM Subject: Apache2 Tomcat5.5 auto mod_jk 1.2.18 only works localhost I've been trying to get apache 2(running on port 80) to front end my tomcat instance(running port 8080) using this tutorial http://www.slholmes.org/journal/2006/7/15/apache-2-tomcat-5-mod_jk-xp.html I can get the following URL's to work just fine from localhost http://localhost:8080/servlest-examples (hitting tomcat directly) http://localhost/servlets-examples (hitting apache which is passing off to tomcat) The problem comes in when I attempt to have my home router redirect traffic(port forward) to the apache instance using a domain instead of localhost. This doesn't work for my tomcat apps. It will display the apache start page just fine but will show the following 404 when I try and request one of the apps deployed in tomcat. Here is the error I get when I try The requested URL /servlets-examples was not found on this server. Apache/2.0.59 (Unix) DAV/2 SVN/1.4.3 mod_jk/1.2.18 Server at www.**domainremoved**.com Port 80 I've atttached Apache's httpd.conf , Tomcats server.xml, and the auto generated mod_jk.conf I think these are the relevant pieces to the puzzle. Please let me know if there is something else I should focus on. Thanks in advance. Once I figure this out, I'll write up a how to in order to help the next person out. Thanks Mike -- - 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: How does one configure Plain host domain url to run web app?
Folks, I found the solution and it was embarrassingly simple.. (an often occurrence..) All I had to do was set the DocumentRoot to where I wanted the index.html to be run from. (I found it when I was deleting all of the various test settings, Directory tags, Aliaes, redirects and left the DocumentRoot setting just for grins. I then tested the site to see if the webapps were still working but quickly tried the domain root.. what the heck.. it worked..!!!) So.. there you go.. John... - 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: Lots of JspRuntimeContext threads
Adam Rabung wrote: Any advice would be much appreciated. Had the contexts been reloaded at any point? If so, is there a rough correlation between the number of threads per context and the number of reloads? Mark - 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: Unable to view list of deployed services
Aneez Backer wrote: Am trying to deploy Kandula1 on Axis server using Tomcat. After deploying, I am able to view the list of services, but NOT the WSDL of any of the service. The error given in LOG file of Tomcat is at the end of mail. This looks like a configuration error. I'd try the axis users list or the support for your application. Mark - 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: Question about 5.0.x
gb1071nx wrote: I can't see the vote. did it ever happen? No. There was an issue, I can't remember what, that meant we decided to leave it as Beta. Also, what about 5.0.31 and 5.0.32, which are in the changelog, but I can't find any reference to in the archives (well, except this one): http://marc.info/?l=tomcat-devm=112861070526107w=2 So, are either 5.0.31 or 5.0.32 an 'official' release, alpha/beta or otherwise? No. There isn't even a tag for them in svn. The references to 5.0.31 will be stuff that was fixed post the 5.0.30 release and 5.0.32 is an error - it should be 5.0.31. For the record, there are no plans for any 5.0.x releases beyond 5.0.30. Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANN] Apache Tomcat 4.1.36 stable is released
The Apache Tomcat team is proud to announce the immediate availability of Tomcat 4.1.36 stable. This build contains numerous library updates, a small number of bug fixes and two important security fixes. Apache Tomcat is an implementation of the Java Server Pages 1.2 and Java Servlet 2.3 specifications. Please refer to the release notes for a complete list of changes. Downloads: http://tomcat.apache.org/download-41.cgi Security information: http://tomcat.apache.org/security-4.html The Apache Tomcat Team - 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: Deactivating XML-validation
Stefan Günther wrote: Which Tomcat version and which JDK? tomcat5-5.5.9-1jpp_5rh OK. I don't see this. 5.5.9 starts within a few seconds for me with or without internet access. java-1.5.0-ibm Try with a Sun jvm. It could be related to the parser implementation. Do you see this with a clean install? Mark - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Fwd: Re: Make Tomcat run slow
If you only want to slow down the network connection to test how your application would behave on a slow link, I can recommend Charles reverse proxy. It's an inexpensive Java tool I use in debugging my web applications. Among other amazing things, it can slow down or throttle your connection, making your application appear slow to the client without slowing down the whole machine. Take a look at http://www.xk72.com/charles/wiki/bandwidth_throttle ps. I am not affiliated, just a happy user. -- Forwarded Message -- Subject: Re: Make Tomcat run slow Date: Saturday 07 April 2007 08:52 From: L.W. van Braam van Vloten [EMAIL PROTECTED] To: Tomcat Users List users@tomcat.apache.org Thanks for this reply! Shankar Unni wrote: * Renice these make-work processes so that they are at the highest priority (not real-time, though, or you'll have to reboot your box :-); and renice the Tomcat so that it's at the lowest priority. Unfortunately this will not work: - I can not modify the code for my webservice - I need to slow down only my own implementation om Tomcat, and most definately not the entire machine! I am not by far the only user of this machine, my entire company depends on it :) Besides, I have no idea how to renice a process on a modern iSeries so that it runs unimaginably slow... Greetings, Lucas --- -- Nicholas Sushkin, Senior Software Engineer Open Finance, Chelsea Piers Pier 62 Suite 316, New York NY 10011 Tel +1 646 723 2790 Fax +1 646 723 2789 [EMAIL PROTECTED] smime.p7s Description: S/MIME cryptographic signature
Re: [OT] GET-then-redirect 'reload' behavior
These 2 articles talk about how to properly prevent idempotent data from being manipulated (deleted, saved etc) more than once. http://www.javaranch.com/journal/200603/frontman.html http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost I tested this on Tomcat 6.0.x, and found that regardless of which method was used (GET or POST) , if an HTTP Forward (which returns status code 200) was performed then the forms data was being saved twice. package test68.servlet; import javax.servlet.http.*; import javax.servlet.*; import java.io.IOException; public class TestPostGetServlet extends HttpServlet { public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { String testInputField = request.getParameter(testInputField); System.out.println(testInputField: + testInputField); //rd.forward is HTTP Forward sends a 200ok status and retains the original Http Request data. //In this case when the Refresh button is pressed on the original JSP page, the form's data gets //RePOSTed //RequestDispatcher rd = getServletContext().getRequestDispatcher(/p/test68/formMethodPost.jsp); //rd.forward(request,response); //response.sendRedirect is HTTP Redirect sends a 302 Temporarily Moved status and does not retain //the original Http Request data. In this case when the Refresh button is pressed on the original //JSP page, the form's data doesn't get RePOSTed response.sendRedirect(/p/test68/formMethodPost.jsp); } public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { String testInputField = request.getParameter(testInputField); System.out.println(testInputField: + testInputField); //HTTP Forward and HTTP Redirect , behave in a similar manner to doPost above. //RequestDispatcher rd = getServletContext().getRequestDispatcher(/p/test68/formMethodGet.jsp); //rd.forward(request,response); response.sendRedirect(/p/test68/formMethodGet.jsp); } } -Rashmi - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
mod_jk + SSL
I haven't really found any documentation on getting mod_jk to work together. I have managed to get my apache server to provide an https connection to my tomcat's server regular HTTP 8080. Is this the correct way to do it? Or can I connect to my tomcat server on port 8443? I can live with this configuration for now, but I'd like to know if I'm doing it the right way. Thanks! -Cameron - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]