PDA

View Full Version : Tomcat JAVA


lordmerlin
02-18-04, 04:42 AM
Hi

Has anyone used this technology? And can you suggest some good reading / feedback / pointers?

stdunbar
02-18-04, 10:37 AM
I use it to host about twenty virtual hosts on my dedicated server. The docs at http://jakarta.apache.org/tomcat/ are very well written. There are also books available about Tomcat - search amazon.com for them. However, the dead tree version of the documentation will be out of date before it ever even makes it to the store. The online docs will always be your best reference.

Hi

Has anyone used this technology? And can you suggest some good reading / feedback / pointers?

lordmerlin
02-18-04, 02:49 PM
Ok, would you mind pointing me into some direction then?

I host with another company, I and I kinde told them I could have a look at it, since their network admin was fired, and I need to get it up and running for a client of mine. On FTP, I have three folders, which are tomcat, cgi-bin, and web. In web I have my site, which I can access from www.thisismydomain.com (http://www.thisismydomain.com)
How, do I access the Tomcat pages then, once I have uploaded them? I also see I don't have upload permissions, but I got admin rights on the server, which is www.theirserver.com:8080/admin (http://www.theirserver.com:8080/admin). It's got an interface where I can add users / groups / database stuff / roles / and some other stuff. Does this make sense to you? Being a UNIX / PHP / MySQL / ASP / Access person this is a bit new to me, and it's more a case of I need to figure out how to get it working, than the coding of the pages itself. That won't be a problem to learn. Any suggestions?

stdunbar
02-18-04, 03:52 PM
I guess the first part is what is broken? Are you convinced that Tomcat isn't working? If you are accessing a URL that has .jsp in it then you are almost certainly using Tomcat. In some cases Tomcat is set up behind a module on top of Apache, conceptually similar to mod_php. This is called mod_jk (or mod_jk2 for the really adventurous). As you access Tomcat via port 8080 it sounds like you are not behind mod_jk.

Here is a very quick and dirty test. Save the following to a file, say blah.jsp

<html>
<head><title>Yep, we got it</title></head>
<body>

You are accessing the server <%= request.getServerName() %> <br>
from <%= request.getRemoteAddr() %>

</body>
</html>

This doesn't do a whole lot but it will show that you can run JSP's. Again, save it as some file that ends with .jsp and upload it to, I'd guess, the Tomcat directory. Try to access http://www.yourhostname.com/blah.jsp or http://www.yourhostname.com/tomcat/blah.jsp or, lastly, http://www.yourhostname.com/servlet/blah.jsp. The last is a common configuration but only when Tomcat is fronted by mod_jk/Apache.

Feel free to PM me if you need more help.



Ok, would you mind pointing me into some direction then?

I host with another company, I and I kinde told them I could have a look at it, since their network admin was fired, and I need to get it up and running for a client of mine. On FTP, I have three folders, which are tomcat, cgi-bin, and web. In web I have my site, which I can access from www.thisismydomain.com (http://www.thisismydomain.com)
How, do I access the Tomcat pages then, once I have uploaded them? I also see I don't have upload permissions, but I got admin rights on the server, which is www.theirserver.com:8080/admin (http://www.theirserver.com:8080/admin). It's got an interface where I can add users / groups / database stuff / roles / and some other stuff. Does this make sense to you? Being a UNIX / PHP / MySQL / ASP / Access person this is a bit new to me, and it's more a case of I need to figure out how to get it working, than the coding of the pages itself. That won't be a problem to learn. Any suggestions?