(1)JSP simply puts Java inside HTML pages.
You can take any existing HTML page and change its extension to ".jsp" instead of ".html".
Now load the new file, with the ".jsp" extension, in your browser.
You will see the same output, but it will take longer! But only the first time. If you reload it again, it will load normally.
What is happening behind the scenes is that your JSP is being turned into a Java file, compiled and loaded.
This compilation only happens once, so after the first load, the file doesn't take long to load anymore. (But everytime you change the JSP file, it will be re-compiled again.)
(2)can enclose Java expressions and java code (called a scriplets), which are evaluated at run time. use <%= and %>
It is true that JSPs are primarily HTML with embedded Java code. However, they have many advantages, such as requiring less (typically none) configuration, and being easy to modify and deploy. Therefore they can lend themselves to other usages, such as writing simple and straightforward controllers.
JSP's eventually are turned into servlets, and though JSPs are much simpler than servlets, for some cases servlets are still useful.
Friday, November 29, 2013
Thursday, November 28, 2013
HTML Amazing
HTML Amazing
Differences Between HTML and XHTML
In HTML, the <input> tag has no end tag.In XHTML, the <input> tag must be properly closed, like this <input />.
Here is how to mark deleted text: blue and inserted text: red!
Want to see what HTML can do?
HTML can do a lot of fun thingsForm with a dropdown box.
Subscribe to:
Posts (Atom)