justhost
05-17-2004, 07:06 PM
I have a client who is wanting to host a site using jsp, javabeans and javamail. What do I need on my server to run these?
Is Tomcat enough?
Is Tomcat enough?
![]() | View Full Version : JSP, javabeans, javamail? justhost 05-17-2004, 07:06 PM I have a client who is wanting to host a site using jsp, javabeans and javamail. What do I need on my server to run these? Is Tomcat enough? stftk 05-17-2004, 07:10 PM Yes, tomcat is all you need, and if you have cpanel you can simply get the installer at http://layer1.cpanel.net . justhost 05-17-2004, 07:34 PM Ok here is another question. Should I be hosting jsp, javabeans and javamail? Are they bad CPU pigs? How is jsp on server resources? vselvara 05-18-2004, 05:03 AM The Java Virtual Machine (JVM) will require a lot of RAM. Make sure you have enough. justhost 05-18-2004, 07:15 AM How much is alot? The machine I would like to run it on is a Celeron 1.7 with 1.0Gb RAM. There are currently about 100 simple html sites on the server. labahost 05-18-2004, 04:56 PM On Windows 1GB RAM might be enough, but on Linux JDK is little more hungry :) labahost 05-18-2004, 05:04 PM Originally posted by DynamoHost Yes, tomcat is all you need, and if you have cpanel you can simply get the installer at http://layer1.cpanel.net . There are two 2 years old tomcat versions and both unsuported. stdunbar 05-18-2004, 07:13 PM Originally posted by labahost On Windows 1GB RAM might be enough, but on Linux JDK is little more hungry :) Alot of it depends on what you're doing. One large advantage is that the memory can be bounded on the command line. If you don't want the process taking more than, say 64MB of memory then tell the JVM so with the -Xmx option. It isn't perfect (top may show more or less) but it gives you a bounded limit on the amount of memory resources dedicated to the JVM (Java virtual machine). stftk 05-18-2004, 07:16 PM They may be old but they work fine and integrate with cpanel seemlessly. You shouldnt have an issue on your server as it has 1GB ram, but the scripts will use a lot of CPU cycles. I would only host those scripts on a few sites on the server if you can to save your self some high load pains. justhost 05-18-2004, 07:18 PM Excellent, thanks for the input guys. Really appreciate it. pnorilsk 05-18-2004, 10:14 PM I don't know what to say. Guys, please stop this nonsense. I cannot hold it anymore. Without any exceptions, all answers and/or statements in this thread are very, very wrong. No offense, but level of your Java knowledge is simply appalling. Sorry. Peter. justhost 05-18-2004, 10:19 PM pnorilsk If this is the case....please give us your input...more than simply saying they are wrong. pnorilsk 05-19-2004, 12:52 AM Originally posted by justhost pnorilsk If this is the case....please give us your input...more than simply saying they are wrong. Frankly I don't know where to start. First of all, the formulation of an original case needs to be clarified. The artifacts mentioned in the beginning (JSP, JavaBeans and JavaMail) don't belong to the common group. JSP and JavaBeans are what we called "components" of J2EE, also referred as "Web clients". There are few other artifacts from the "components" definition, they are servlets (BTW, JSP services requests as a servlet.) and Enterprise Java Beans (EJB). These components are the server side components. The client side components include applets and application clients based on Swing or AWT API. The JavaMail in turn technically has nothing to do with J2EE. JavaMail API is an optional package (standard extensions) for reading, composing, and sending electronic messages in Java. And obviously it could be used in J2EE application. Do I need to continue? Peter. justhost 05-19-2004, 07:25 AM Please do. pnorilsk 05-19-2004, 08:36 AM Originally posted by justhost Please do. The topic is quite big. I will not be able to tackle it in one posting. I will split it in a few logical interconnected parts. If your client has no intention to use EJB (EJB container) then your best and only recommended choice is the Jakarta Tomcat. Now you need to make an educated decision in a selection of software parts. Your decision must be centered around the following inputs, - type of application (commercial, number of concurrent users, availability factor, etc) - needs for specific servlet/JSP release (Tomcat 4.x doesn't support servlet 2.4 and JSP 2.0) - you need ask your client and explain that change later would be very difficult. - shared or not shared hosting - need to have an Apache HTTP server in front - based on selection of Tomcat release and needs for EJB we should select correct J2SE or J2EE. Try to get all answers and we will continue. Regards, Peter Kinev stdunbar 05-19-2004, 11:51 AM Originally posted by pnorilsk The JavaMail in turn technically has nothing to do with J2EE. JavaMail API is an optional package (standard extensions) for reading, composing, and sending electronic messages in Java. And obviously it could be used in J2EE application. Peter, The JavaMail package use to to be an optional package. Since J2EE 1.3 it is a required package. As 1.3 was finalized in 2001 perhaps you should visit http://java.sun.com/ when you get a chance. As unlikely as it seems that we agree, I too would recommend Tomcat (http://jakarta.apache.org/tomcat/). However, it should be noted that there are other choices. Tomcat is just one of the simpler and better supported choices. Tomcat has chosen to implement part of the J2EE specification. All of the original things that justhost mentioned are supported in the out of the box configuration of Tomcat. Additionally Tomcat supports some other parts of the "Web Container" portion of the spec like naming (JNDI) but not others like JMS (a messaging layer, conceptually similar to the IBM MQSeries software). Tomcat, fronted by Apache httpd with the mod_jk connector, is fairly simple to setup and maintain. As the only tool I use to maintain my server is "vi" I am not familiar with any of the administrative front ends (cpanel, etc) and I can't tell justhost how best to manage the configuration. I do it all through ssh and vi. I maintain about 30 virtual hosts, fronted with Apache httpd, that are all JSP and servlet based on a 1GB machine. They all interact with a PostgreSQL database. Some of these sites are pretty slow, other's pretty busy. I do have a 2.4Ghz machine so that does play into it. justhost - you do need to find out a little more from your customers regarding what they intend to do. Do you offer a database too? Are you going to allow your customers to access this database from their java code? These factors play into your decision as to what to do. You can easily host more than one user on a Tomcat instance and allow each of them the ability to control their own environment (stop and restart their web applications) through a control panel-like interface. Like PHP, cgi, or even shtml, it is important to try to understand just what the customer would like to do before just installing it. A simple "sign up for our newsletter" type of thing will not be noticible in terms of memory, I/O, or CPU. A Java-based forum with 10,000 posts/hour will. pnorilsk 05-19-2004, 12:59 PM Originally posted by stdunbar Peter, The JavaMail package use to to be an optional package. Since J2EE 1.3 it is a required package. As 1.3 was finalized in 2001 perhaps you should visit http://java.sun.com/ when you get a chance. JavaMail continue to be an optional package for J2SE even for the most recent release as well as for another Java platform - J2ME and you will find about it if you visit the Java site recommended by you. You know (it's not apparent) that for Tomcat full blown J2EE is not a recommended choice. You didn't give me chance to illuminated this point. And as I said, the J2SE (what Tomcat needs) doesn't have JavaMail package! Probably, I should make it clear in my posting early. But the original point I was trying to stress that there is a distinct difference between Java components and Java packages. In context of a discussion it was completely irrelevant “optional” or not , and you should know better. As unlikely as it seems that we agree, [/B] This is very unprofessional, offensive and disingenuous statement. The rest of the context in this posting indicates that author has some experience with Java and Tomcat. It could be said better and more exact, in some cases like with a “fronted” Apache should be more specific. But, more or less apparently author can contribute to discussion. If justhost will respond on this and stdunbar (about database requirements) postings, I will be compelled to answer. Peter. stdunbar 05-19-2004, 01:49 PM Originally posted by pnorilsk JavaMail continue to be an optional package for J2SE even for the most recent release as well as for another Java platform You said, and I quote, "The JavaMail in turn technically has nothing to do with J2EE". You mentioned J2EE twice in that paragraph. JavaMail is part of J2EE. It is an optional package to J2SE. Your statement was factually incorrect. Period. Tomcat includes an implementation of the JavaMail spec along with the JAF it requires. These are mostly just from the Sun RI. This is very unprofessional, offensive and disingenuous statement. I was, and remain, frustrated with anyone who states in a thread (paraphrased, then quoted) [list=1] You are all idiots. ("I don't know what to say. Guys, please stop this nonsense. I cannot hold it anymore. Without any exceptions, all answers and/or statements in this thread are very, very wrong. No offense, but level of your Java knowledge is simply appalling") I am too busy and do not respect you enough to post a professional, intelligent response as I'm just too good ("I will not be able to tackle it in one posting", "But, more or less apparently author can contribute to discussion.", and "I will be compelled to answer") [/list=1] However, while you and I may seriously disagree on communication style, I too will do what I can to assist justhost. dnn 05-19-2004, 02:14 PM I saw this faq at java.sun: http://java.sun.com/products/javamail/FAQ.html#1 Q: What is the JavaMail API? A: The JavaMail API is a set of abstract APIs that model a mail system. The API provides a platform independent and protocol independent framework to build Java technology based email client applications. The JavaMail API provides facilities for reading and sending email. Service providers implement particular protocols. Several service providers are included with the JavaMail API package; others are available separately. The JavaMail API is implemented as a Java optional package that can be used on JDK 1.1.6 and later on any operating system. The JavaMail API is also a required part of the Java 2 Platform, Enterprise Edition (J2EE). Sone here states this "The JavaMail in turn technically has nothing to do with J2EE. " I know know he is right, or Sun is right ? pnorilsk 05-19-2004, 02:30 PM Originally posted by dnn I saw this faq at java.sun: http://java.sun.com/products/javamail/FAQ.html#1 Q: What is the JavaMail API? A: The JavaMail API is a set of abstract APIs that model a mail system. The API provides a platform independent and protocol independent framework to build Java technology based email client applications. The JavaMail API provides facilities for reading and sending email. Service providers implement particular protocols. Several service providers are included with the JavaMail API package; others are available separately. The JavaMail API is implemented as a Java optional package that can be used on JDK 1.1.6 and later on any operating system. The JavaMail API is also a required part of the Java 2 Platform, Enterprise Edition (J2EE). Sone here states this "The JavaMail in turn technically has nothing to do with J2EE. " I know know he is right, or Sun is right ? I apparently was not correct when I mentioned J2EE without clarification. But, I was correct in a substance - in context of discussion separating of issues ((Tomact + (JSP + Java Beans)) + JavaMail) was a better approach. Peter. dnn 05-19-2004, 02:37 PM By the way, I believe javamail need JAF to work. Jaf info: http://java.sun.com/products/javabeans/glasgow/jaf.html justhost 05-19-2004, 02:38 PM Wow guys, I am lost in all of this. My client is not 100% sure what exactly he will be doing. He posed the question to me to ask if I was capable of doing this. So I do not have specifics to his requirements at this time. But from reading all this I dont know if I want to dip my toes into this pool or not. If definitely does not look like something that would be basic to install or maintain. stdunbar 05-19-2004, 03:05 PM Originally posted by justhost Wow guys, I am lost in all of this. My client is not 100% sure what exactly he will be doing. He posed the question to me to ask if I was capable of doing this. So I do not have specifics to his requirements at this time. But from reading all this I dont know if I want to dip my toes into this pool or not. If definitely does not look like something that would be basic to install or maintain. That is certainly the opposite of what I would want. Our bickering over symantics and specifications really brought the discussion the wrong direction. I was partly responsible for that and I apologize. Tomcat is pretty simple to install and maintain. If they only want something small this should be very easy and you might be able to charge them a little more. Even if they just want to experiment setting this up for them does not involve much effort. justhost 05-19-2004, 03:08 PM Oh ok....I am sure he is not looking for something complicated. I do not think he has the skills for that. As soon as I know if he will need it I will update this post. Thanks alot guys. telnettro 05-19-2004, 06:37 PM there's no way you have the admin skills to run any sort of jsp/servlet container. I can't imagine cpanel will do it for you, since there's not a big enough need for a control panel to take care of jsp since most jsp/servlet needing people are neednig it because they are running real web apps that require a full server's resources (or more) and have the money to admin it themselves. It's not worth your time and trouble for one account that's worth a few bucks. Talk to a jsp host and see if you can get a referral reward. I work a lot with tomcat and java related stuff, and it's a headache for me and I've been coding for 6 years and tomcatting since 3 came out. There's no way I could offer any sort of reasonable level of service to someone who wanted me to write a web app in php and mysql (i do java | cf + oracle). coding in php is to me as hosting in jsp/servlets is to you. Kay ima finish up my repetative rambling and say refer him somehere else, get the fee, and let everyone live happily ever after rather than spend hours installing tomcat, hours figuring out why it doesn't work, hours figuring out how to set up his appbase... Disregard this whole thing if anyone thinks cpanel can reliably admin tomcat. I wouldn't know; i've never used it. stftk 05-19-2004, 06:59 PM In my experience cPanel can reliably run tomcat, its just it wont install things such as javabeans and javamail. You would need to install those on your own. Your hardware can handle tomcat, but I would probably recommend that you dont host him to save yourself a lot of headaches in solving java related problems. justhost 05-19-2004, 07:47 PM I really appreciate everyone's input. I believe I will do eaxctly that and refer him to another host. Thank you. |