Search
Recommended Sites
Related Links






   

Informative Articles

Adding Sound to your Web Site - The Good, The Bad And The Ugly
Many webmasters like the idea of adding background music to their web sites but most shy away from doing it worrying about slow loading pages and large file sizes. There are many different ways to add background music to your site and some of them...

Creating Personal Web Sites
This is a two-part article about creating a web site on the web and the tools that you need to do that. During the last decade we have truly entered the information age. More and more people are becoming a part of the ever growing and wondrous...

Mistakes when using Macromedia Flash
My own mistakes when using Macromedia Flash I have used Macromedia Flash for all the wrong reasons in the past and i would like to take some time to warn you, so you don't have to make the same mistakes i have. Quite some time ago now i...

The Question: Learn HTML, Or Use A WYSIWYG Editor
When I first started designing web pages back in 1997, it was necessary for me to learn the HTML markup language. At that particular time, there were some what you see is what you get editors, but almost everyone that design web pages used raw...

Top 5 Webmaster Tools You Can Pick Up For Pennies
1. SiteSpinner V2 - On Sale www.deprice.com/sitespinner.htm SiteSpinner is a user-friendly web site development tool that includes many advanced features such as drag-and-drop positioning, built in FTP to publish directly to your web site, an...

 
JSP: Java on Your Server

JSP stands for Java Server Pages. The idea of JSP is to allow Java code to be embedded in HTML - this is done uising XML tags. JSP allows you to dynamically add content to your pages, and also offers the facility to send Java to the web browser easily.

The Lack of Functions

Most of the built-in JSP functions do nothing more than flow control: it barely offers any built-in functions at all. Instead, you have to define your own tags using tag libraries. This makes the language extremely extensible, but not much use if you just want to get started quickly and write a simple database-driven website.

The most significant reason to use JSP is that it gives you all the power of Java when it comes to adding things to your HTML pages. In big companies especially, these Java capabilities are very important. The flexibility of the language is also very useful for larger projects: in some ways, JSP is more like a 'build your own programming language kit' than it is a language in itself.

Separating the Application Logic

The real point of JSP is to separate out your application's logic (the part that does things) from its presentation (the HTML). JSP is, basically, a very minimal language intended to do little more than help turn the output of a Java application into a web page. This has the advantage of letting you write an entirely new website using your existing application as the backend - but it has the disadvantage that it can be difficult to add any new functions to the site unless you know what you're doing in Java.

Unfortunately, the downside of doing things this way is that, if you're not strict about it, HTML code will have a tendency to start creeping into the output of the backend Java application. If that happens, it will make it difficult to rewrite your JSPs without ending up with broken web pages.

Is Java a Good Idea?

One of the advantages of JSP is that it can easily take Java applets and throw them onto the web. When it comes down to it, though, Java isn't usually a good idea. Why? Well, it takes a long time to load, it's slow when it does load, and it doesn't tend to do anything that couldn't have been done better in Flash or even in plain old HTML. On the web, Java has come to be considered harmful.

On the server, though, Java is a fine idea, at least if you're good enough to program in it. There are simpler languages out there, but Java is cross-platform, standardised and does pretty much everything you could want it to. You will, though, need a pretty powerful server to use Java for any significant number of requests.

JSP or ASP?

JSP is obviously named to point out the fact that it is an alternative to Microsoft's ASP. So why would you use one instead of the other. Well, while ASP has the simplicity of Visual Basic on its side, JSP has the power of Java, and, more importantly, its cross-platform capabilities. While ASP will tie you down to a Microsoft platform, JSP can be used on any operating system capable of running Java - and that's just about all of them.

JSP or ColdFusion?

What JSP and ColdFusion have in common is that they can both interact with Java - but which is better? For most projects, the answer is ColdFusion: if you're building something relatively small (meaning non-enterprise), ColdFusion's built-in functions should be sufficient and the code shouldn't be able to grow so large as to be unmanageable.

Should JSP Stay in the Enterprise?

People with small website usually fall into one of two camps: the vendor-devoted people who are quite happy to run their whole system on Microsoft or Macromedia products because it saves them time, and the open source devotees who use languages like PHP because it saves them money and they support the principles involved. Among these two camps, there isn't really much room for JSP, and in most cases, there shouldn't be. Unless you're building a project that's larger than the average, or you've already got a Java application you want to write a web interface for, you'll probably be better off giving JSP a miss.

About the author:



Original Source: Eclipse-Articles.com - Serving over 25,000 Articles.



Information supplied and written by Lee Asher of Eclipse Domain Services

Domain Names, Hosting, Traffic and Email Solutions.



Sign up for PayPal and start accepting credit card payments instantly.