How I'm invoking the mail example is by entering the following as the URL: http://localhost:8080/examples/jsp/mail/sendmail.jsp
If this were kwilliamsLinux (my machine name) instead of localhost, I'd definitely see that as the potential source of the problem (although I didn't think of that until I read your email). I searched the internet, and they all said to ensure that "127.0.0.1 localdomain.localhost localhost" was in my hosts file, which it was. What I had to add was the "127.0.0.1 kwilliamsLinux" I can't figure out why tomcat is needing that when running from a command line (and removing tomcat from the equation) doesn't. I think this issue is specific for linux as well. Kevin > My two cents follow. Make sure that your invoking your services > consistently. > Something like: > > localhost/MyWebApp/jsp_or_servlet > > or: > > 127.0.0.1/MyWebApp/jsp_or_servlet > > or: > > 128.43.10.19/MyWebApp/jsp_or_servlet > > Inconsistencies like these, can bring you headaches. > since the default session management specs bind sessions > to the url. If you change the url then you loose the session and > hence you get errors like the ones you listed below. > > Best, > -Francisco Bido > > > On Friday, February 14, 2003, at 12:41 PM, Kevin Williams wrote: > >> Hi all, >> >> I am hoping someone can tell me why this happens! When I installed >> Tomcat, my mail example did not work. I got the following error: >> >> java.lang.NullPointerException >> at java.net.InetAddress.cacheAddress(InetAddress.java:648) at >> java.net.InetAddress.cacheAddress(InetAddress.java:633) at >> java.net.InetAddress.getAddressFromNameService(InetAddress.java:1016) >> at java.net.InetAddress.getLocalHost(InetAddress.java:1125) at >> javax.mail.internet.InternetAddress.getLocalAddress(InternetAddress.jav >> a:474) >> >> >> When I run the EXACT same code from my client IDE as a test it works >> fine! >> To make it work from the web though, I had to add 127.0.0.1 >> <machineName> >> to my hosts file. My question is, WHY? Why does it work different >> from >> within Tomcat than straight from my test app? IS it looking up via >> machine name instead of localhost? What exactly is happening here? I >> am >> running on Redhat 8.0 and using JSDK 1.4.1. >> >> Thanks for any help on this strange phenomenon! >> >> Kevin >> >> >> >> --------------------------------------------------------------------- >> 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]
