• Post Reply Bookmark Topic Watch Topic
  • New Topic

When to use App Server or Only JDK?  RSS feed

 
Elle Atechsy
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I've been kind of coding/learning Java on the fly due to work assignments. Which means that I'm learning things out of order. In my attempt to understand more, can anyone explain how to know when a server requires ONLY a JDK vs. an application server? Technically, are they one in the same? For example, if I have an Apache Tomcat "web" server, and would like to create some JSP pages, is having the JDK installed enough? Or, do I need an application server?

Thanks in advance for any responses.

Lulu
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an Apache Tomcat "web" server, and would like to create some JSP pages, is having the JDK installed enough?

Yes

The term "application server" is general, open ended and not very precise.

Bill
 
Elle Atechsy
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, thanks Bill! I think I understand.

Just to confirm my understanding, since my original post only stated the use of JSPs. But what about for small web applications, consisting of a few JSPs, "servlets", & maybe a couple business logic & data access classes, just having a JDK and a web server installed is still sufficient?

I have a server with Tomcat "web" server installed and only the JDK, NO "app" server, so, I'm wondering what kind of limitations does that give me, if any. I guess what I'm looking for is a list of criteria that can tell me when an application server is required over just the JDK. Or maybe there are none, except deployment ease?

Thanks,
Lulu
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The thing you're missing is that Tomcat is an application server. Often the term is used to mean a full-up EJB container with all the bells and whistles, but literally it just means a network-enabled container which supplies some services to application code you write. Compiling and hosting JSPs definitely falls under that umbrella.

Using just the JDK would mean opening your own ServerSocket, listening on the network, and when raw bits start coming in, doing something useful with them. Most of the time, you want to work at a higher level than that, and so you want to use some kind of application server whenever you're doing a net-enabled application.

When you're not -- i.e., when you're writing a desktop application -- then you don't need any kind of app server.
 
Elle Atechsy
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you are right, I wasn't aware that Tomcat was an "app" server.

Thanks very much for the more detailed explaination.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!