Do I need Tomcat and Apache ?

S

sl@my-rialto

If I have a GlassFish server, do I still need Tomcat and Apache ?

I must say I have not wriiten a single line of Java EE code yet. I have been
reading feverishly for the past 2 weeks. Pretty confused by so many Java
terminologies.

Thanks.
 
L

Lew

sl@my-rialto said:
If I have a GlassFish server, do I still need Tomcat and Apache ?

No, but the computer running GlassFish has to have sufficient horsepower to
handle it. It runs best on a multi-core machine with 2 or more GB RAM. I ran
it quite well on a four-core machine with 4 GB RAM (Linux).

Apache Web Server (httpd - Tomcat is also an Apache project) serves static
content. It's also very powerful for things like proxying, URL management and
a bunch of other things. It is not Java EE.

Apache Tomcat serves HTML also, as well as servlets, JSP, JSF and, with
appropriate JARs, certain other elements of the Java EE alphabet soup. You
can run Tomcat without httpd.

For EJBs, queues, BPEL and certain other heavyweight parts of Java EE you
either need to assemble individual libraries, like Apache OpenEJB, into a
container like Tomcat, or you need a full-blown application server like
GlassFish, JBoss or Apache Geronimo.

I wouldn't start with the big app servers. Since you're new to Java EE,
Tomcat is the easiest to administer while you're learning. You give up EJBs
(at first - OpenEJB cures that) and other, higher-end features, but that lets
you focus on more fundamental Java EE until you gain facility with that part.

I've found the Sun Java EE tutorial helpful:
I must say I have not wriiten a single line of Java EE code yet. I have been
reading feverishly for the past 2 weeks. Pretty confused by so many Java
terminologies.

It's a start. What part is confusing you?

Or do you really mean "overwhelming"? Just keep going a little at a time and
you should begin to conquer it.
 
C

ck

If I have a GlassFish server, do I still need Tomcat and Apache ?

Depends, if you have to work on JSP and servlets only Tomcat works
fine, the lone term "Apache" is not a server but an organization,
GlassFish is an application server, works for most of the things
involved in J2EE.
I must say I have not wriiten a single line of Java EE code yet. I have been
reading feverishly for the past 2 weeks. Pretty confused by so many Java
terminologies.

Of course Java world is confusing. Stick to any one tutorial or book.
Get your hands dirty as tutorial/chapter progresses. I personally
prefer tomcat, but once you get a hang of things, like, how to compile
and deploy your Java web application you can work on any servlet
container or application server like tomcat, jboss, glassfish etc.
I would suggest that you should start with Servlets and JSP, You can
try http://www.coreservlets.com/Apache-Tomcat-Tutorial/ if you want to
work with Tomcat.
I don't like official j2ee docs for practice (for beginners), I feel
its quite "terse".
 
S

sl@my-rialto

Thanks Lew and ck.

The word "overwhelm" is a more accurate word.

I shall follow the recommended trodden road, that would save some bumps
ahead.


If I have a GlassFish server, do I still need Tomcat and Apache ?

Depends, if you have to work on JSP and servlets only Tomcat works
fine, the lone term "Apache" is not a server but an organization,
GlassFish is an application server, works for most of the things
involved in J2EE.
I must say I have not wriiten a single line of Java EE code yet. I have
been
reading feverishly for the past 2 weeks. Pretty confused by so many Java
terminologies.

Of course Java world is confusing. Stick to any one tutorial or book.
Get your hands dirty as tutorial/chapter progresses. I personally
prefer tomcat, but once you get a hang of things, like, how to compile
and deploy your Java web application you can work on any servlet
container or application server like tomcat, jboss, glassfish etc.
I would suggest that you should start with Servlets and JSP, You can
try http://www.coreservlets.com/Apache-Tomcat-Tutorial/ if you want to
work with Tomcat.
I don't like official j2ee docs for practice (for beginners), I feel
its quite "terse".
 
L

Lew

sl@my-rialto said:
I shall follow the recommended trodden road, that would save some bumps
ahead.

Best of luck.

A side note on posting conventions for Usenet:

- When you quote other posts, set off the quoted material with a leading "> "
on each line. Good newsreaders will do this for you automatically.

- Quote only the parts of other posts that are relevant for your response.
("Trim your posts.")

- Don't top-post - that is, don't put your response at the top and the quoted
material underneath. Insert your responses in line with the quoted material.

These conventions make posts much easier to read and understand.
 
D

Donkey Hottie

Lew said:
Best of luck.

A side note on posting conventions for Usenet:

- When you quote other posts, set off the quoted material
with a leading "> " on each line. Good newsreaders will
do this for you automatically.
- Quote only the parts of other posts that are relevant
for your response. ("Trim your posts.")

- Don't top-post - that is, don't put your response at
the top and the quoted material underneath. Insert your
responses in line with the quoted material.
These conventions make posts much easier to read and
understand.

And as the OP posts with Microsoft Outlook Express, I will provide a link to
a 3rd party add-on which makes that newsreader as "Good" as possible.

The Outlook Express QuoteFix:
http://home.in.tum.de/~jain/software/oe-quotefix/

Just install it, and remove all Icons of Outlook Express from your Windows,
and use the Outlook with OE QuoteFix icons instead. It does not modify your
OE installation anyway, but launches a co-process with manipulates all email
and news so that they follow conventions. It has options for that, but I use
the defaults and they are quite good.
 
A

Arne Vajhøj

sl@my-rialto said:
If I have a GlassFish server, do I still need Tomcat and Apache ?

I must say I have not wriiten a single line of Java EE code yet. I have been
reading feverishly for the past 2 weeks. Pretty confused by so many Java
terminologies.

No.

Glassfish can everything Tomcat can plus some additional things.

In a production environment you may want to put Apache HTTPD in
front of Glassfish, but that is not relevant for development
environment.

Depending on what part of Java EE you want to start with, then
Tomcat may be sufficient to start with.

Java EE is pretty big, so I think it is essential that you focus
on just a few topics to start with.

Arne
 
M

markspace

sl@my-rialto said:
If I have a GlassFish server, do I still need Tomcat and Apache ?

I must say I have not wriiten a single line of Java EE code yet. I have been
reading feverishly for the past 2 weeks. Pretty confused by so many Java
terminologies.


If you use NetBeans, it comes with everything you need, including
Glassfish. It's an easy one click to deploy an app and test it's
functions. I can't speak to other IDEs, but NetBeans does a remarkable
of making servlets easy.
 
D

David Segall

sl@my-rialto said:
If I have a GlassFish server, do I still need Tomcat and Apache ?

No. Tomcat can do all the tasks that an Apache web server can do. A
GlassFish server can do all the tasks that Tomcat can do.

Before I am shot down in flames for the above assertions I should
state that I am assuming you are asking the question because you are
studying Java EE and you are not concerned about optimising
performance.
 
S

sl@my-rialto

No. Tomcat can do all the tasks that an Apache web server can do. A
GlassFish server can do all the tasks that Tomcat can do.

Before I am shot down in flames for the above assertions I should
state that I am assuming you are asking the question because you are
studying Java EE and you are not concerned about optimising
performance.

Correct.

What is the best setup in real-life/production environment ? Thanks.
 
C

ck

Correct.

What is the best setup in real-life/production environment ? Thanks.

As someone already said, depends on what you want to begin with. As
suggested earlier, you can use "netbeans" and get rid of making a
choice. If you use glassfish you can be assured that you would be able
to work with "most" of the things involved in J2EE. Although I would
insist you should begin with Servlets and JSP.
 
M

markspace

sl@my-rialto said:
What is the best setup in real-life/production environment ? Thanks.


I doubt there is one single best setup, but I believe all the best ones
would be fronted by Apache. I've seen Tomcat running production code,
and JBoss seems popular as well. You might try doing a jobs search, to
see which products get mentioned the most. That should give you an idea
of general trends.
 
R

Roedy Green

No, but the computer running GlassFish has to have sufficient horsepower to
handle it. It runs best on a multi-core machine with 2 or more GB RAM. I ran
it quite well on a four-core machine with 4 GB RAM (Linux).

Apache Web Server (httpd - Tomcat is also an Apache project) serves static
content. It's also very powerful for things like proxying, URL management and
a bunch of other things. It is not Java EE.

Apache Tomcat serves HTML also, as well as servlets, JSP, JSF and, with
appropriate JARs, certain other elements of the Java EE alphabet soup. You
can run Tomcat without httpd.

For EJBs, queues, BPEL and certain other heavyweight parts of Java EE you
either need to assemble individual libraries, like Apache OpenEJB, into a
container like Tomcat, or you need a full-blown application server like
GlassFish, JBoss or Apache Geronimo.

I wouldn't start with the big app servers. Since you're new to Java EE,
Tomcat is the easiest to administer while you're learning. You give up EJBs
(at first - OpenEJB cures that) and other, higher-end features, but that lets
you focus on more fundamental Java EE until you gain facility with that part.

I've found the Sun Java EE tutorial helpful:


It's a start. What part is confusing you?

Or do you really mean "overwhelming"? Just keep going a little at a time and
you should begin to conquer it.

That was a great post Lew!, perhaps your best ever. You drew from
your extensive experience to give a helpful, easy-to-understand, and
encouraging response. Not only did you answer the question literally,
you gave additional information that would be useful. Beautifully
done!

--
Roedy Green Canadian Mind Products
http://mindprod.com

I advocate that super programmers who can juggle vastly more complex balls than average guys can, should be banned, by management, from dragging the average crowd into system complexity zones where the whole team will start to drown.
~ Jan V.
 
L

Lew

sl@my-rialto said:
What is the best setup in real-life/production environment ?

That is a difficult question to answer because it depends on what the
real-life production system needs to do.

By analogy, consider the question, "What is the best dessert?" You
have to consider what meal you're having - lunch? dinner? late-night
aperitif? What is being served for the main course(s)? Red meat?
Poultry? Vegetarian? Do you need to keep kosher? Are you serving
folks with special dietary needs, such as diabetics or people with
food allergies, such as to chocolate or peanuts? Is it a formal,
seven-course dinner with diplomats and movie stars in attendance, or a
casual gathering to watch football? Will there be alcoholic
beverages? How well can you cook? What is your budget? How many
people will be in attendance? Do you have room in your refrigerator,
or even an operational refrigerator? Do you even own a crème brûlée
torch?

There is a similar panoply of considerations in deciding on the "best"
application server. Without identification of and answers for those
considerations, it's impossible to say.
 
L

Lew

ck said:
As suggested earlier, you can use "netbeans" [sic]
and get rid of making a choice.

I don't understand how you reach the conclusion that NetBeans (NB)
absolves one of making a choice.

The standard distribution of NB includes Tomcat and Glassfish, but is
perfectly capable of working with other application servers. Even the
standard distribution forces you to choose.

I use NetBeans. On a machine with only one gigabyte of RAM, you
cannot effectively run NB, GlassFish and a database system at the same
time. You might say that removes the choice. However, many machines
are sold these days with 3 GB of RAM standard, and that is sufficient
to run a full environment. If you use more than one machine for
development, you can push the application server and database off onto
the powerful unit and run NB on a somewhat less powerful workstation,
and your ability to choose is restored.

Regardless, NetBeans itself does not "get rid of making a choice."
 
T

Tom Anderson

That is a difficult question to answer because it depends on what the
real-life production system needs to do.

By analogy, consider the question, "What is the best dessert?"

Angel Delight. Specifically, butterscotch.

NEXT.

tom
 
A

Arne Vajhøj

David said:
No. Tomcat can do all the tasks that an Apache web server can do. A
GlassFish server can do all the tasks that Tomcat can do.

Before I am shot down in flames for the above assertions I should
state that I am assuming you are asking the question because you are
studying Java EE and you are not concerned about optimising
performance.

That is at the high level, which is probably what is relevant
for the original poster.

At the more detailed level I don't think Tomcat support all
the functionality that are in the mod_xxx that ships with
Apache HTTPD.

Arne
 
A

Arne Vajhøj

markspace said:
I doubt there is one single best setup, but I believe all the best ones
would be fronted by Apache.

For internet yes. For intranet not necesarrily.
I've seen Tomcat running production code,
and JBoss seems popular as well. You might try doing a jobs search, to
see which products get mentioned the most. That should give you an idea
of general trends.

dice.com gives:

Websphere - 1814
Weblogic - 1497
Tomcat - 1037
JBoss - 791
Oracle Application Server + OC4J - 167
Glassfish - 43
Resin - 23
Geronimo - 5

Arne
 
L

Lew

Kenneth said:
NetBeans used to have a very nice plugin that would help you fill in the
gaps in your documentation.. autocomment? Maybe that was what it was
called. I haven't seen it in the last couple of versions. Do you know
if such a thing still exists? Is there an alternative too?

It's not a plugin but a core feature.

Menu: _T_ools / _A_nalyze Javadoc. It's been there for at least the 6.x
series of NetBeans.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top