File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Creating a Website Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Creating a Website" Watch "Creating a Website" New topic

Creating a Website

Swapna Gouri Kalanidhi
Ranch Hand

Joined: Mar 14, 2008
Posts: 107
Hello Ranchers
I have a project which reqires me to develop a website and host data for my client. I wish to do it using Java. I'm a novice to advanced topics such as EJB etc. Should I use Servlets & JSPs or is there any other option. Kindly suggest the best options...

Thanks & Regards
Swapna Gouri
I "try", I "catch" and "finally" WIN !!!
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63839

If you don't know that you need EJB, you don't.

Servlets and JSP are a good choice if you need the power of dynamic resources.

[Asking smart questions] [About Bear] [Books by Bear]
arulk pillai
Ranch Hand

Joined: May 31, 2007
Posts: 3371
All depends on your requirements. In general EJBs are not required. If you
write your appplication with proper layers like business layer, DAO layer, service layer etc, if required in the future it can be easily refactored.

[] | [Java job hunting know how] | [Java resumes]
Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

We definitely need more info in order to help you, what size is the app, how many users etc, etc. Can you please TellTheDetails

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Charles Lyons
Ranch Hand

Joined: Mar 27, 2003
Posts: 836
I have a project which reqires me to develop a website and host data for my client. I wish to do it using Java.
As I always say, choose the right tool for the job. So why Java? The Java Web tier is relatively difficult to create applications for: you need to code all the behaviour, re-compile for every change (except JSPs/tag files) and re-deploy to the Web server. In general, this isn't something anyone can just pick up and do. Setting up the development environment alone can take a couple of days if you're not experienced.

If you're only doing a simple site with low-moderate traffic requirements, you're going to make your life a lot more complicated by using Java. Why not stick to something interpreted like PHP and speed up the development cycle? Using PHP5 you can effectively utilise OO programming too.

Secondly, Java containers consume a lot of resources. As a typical example, a Tomcat instance allocates upwards of 256MB RAM before doing anything. Apache with PHP extensions is much smaller, in the order of 32MB RAM. You'll also have to find a host or administrator for Java apps, while there are plenty more Apache admins and hosts around.

On the flip side, if you need a high performance application or one backed by an extensive programming API, then Java is great. But expect to double your production time, much more if you're only just starting to learn it all.

Edit: You can use a Java Web framework to shave off the development time quite significantly. The tradeoff is that you have to learn that framework which itself can take days or weeks... so to start with it isn't all that fast.
[ November 04, 2008: Message edited by: Charles Lyons ]

Charles Lyons (SCJP 1.4, April 2003; SCJP 5, Dec 2006; SCWCD 1.4b, April 2004)
Author of OCEJWCD Study Companion for Oracle Exam 1Z0-899 (ISBN 0955160340 / Amazon Amazon UK )
rakesh sugirtharaj
Ranch Hand

Joined: Dec 16, 2007
Posts: 151
I would say use a good Web framework(Like Spring MVC) so that you dont land into trouble when you want to extend. I have a bad experience using only Servlets and jsps.

Bobby Sharma
Ranch Hand

Joined: Mar 18, 2008
Posts: 598

I am forced to say "thanks" to Charles and Rakesh. I learned important
things by this thread.

best regards,

Most of the programming problems can't be solved because you don't know what the exact problem is.
Defining your problem correctly leads you to the right solution.
Swapna Gouri Kalanidhi
Ranch Hand

Joined: Mar 14, 2008
Posts: 107
Hello Ranchers
Thanks a ton for giving me a better outline of different technologies...
Here's what I exactly require:

I need to host some confidential information on a site where only the client can view and access it. He should be able to modify & retrieve data from the DB. Also, since he is not ready to publicise his site, he will not need to extend it further. At the max he might want to add/update few more customers and their details. So is using Servlets and JSP a better option??

@Charles and Rakesh
I know Servlets & JSPs to some extent whereas I dont even know the definitions of PHP and other frameworks.... Also I have just 4 weeks of time to get this done, so cannot afford to learn something new & apply. So what do you think is a better option for me?? Kindly suggest..!

Again, Thanks a bunch for getting back...!
rakesh sugirtharaj
Ranch Hand

Joined: Dec 16, 2007
Posts: 151
Hi Swapna,

Considering the time constraint and your area of expertise, you can go for Struts or Spring MVC. Look for a couple of samples on the net and i think you will be good to go. You can do the app but i cannot guarantee that you will understand thoroughly how it will work.
I agree. Here's the link:
subject: Creating a Website
It's not a secret anymore!