|
|
Previous<
10
11
12
13
14
15
16
17
18
19
20
> Next |
|
As we saw in the previous section, any HTML file can be turned into a JSP file by changing its extension to .jsp. Of course, what makes JSP useful is the ability to embed Java. Put the following text in a file with .jsp extension (let us call it hello.jsp), place it in your JSP directory, and view it in a browser.
<HTML> <BODY> Hello! The time is now <%= new java.util.Date() %> </BODY> </HTML>
Notice that each time you reload the page in the browser, it comes up with the current time.
The character sequences <%= and %> enclose Java expressions, which are evaluated at run time
|
|
|
|
JSP and ASP are fairly similar in the functionality that they provide. JSP may have slightly higher learning curve. Both allow embedded code in an HTML page,session variables and database access and manipulation. Whereas ASP is mostly found on Microsoft platforms i.e. NT,JSP can operate on any platform that conforms to the J2EE specification. JSP allow component reuse by using Javabeans and EJBs. ASP provides the use of COM / ActiveX controls.
|
|
|
|
This tutorial is derived from Marty Hall's world-renowned live Jakarta Struts training course. Note that the course (and this tutorial) now covers Struts 1.2. The course is usually taught on-site at customer locations, but servlet, JSP, Struts, and JSF training courses at public venues are periodically scheduled for people with too few developers for an onsite course. For descriptions of the various other courses that are available, please see the servlet, JSP, Struts, and JSF training course page. To inquire about a customized training course at your location, please contact Marty at hall@coreservlets.com. Courses on servlets, JSP, JSF, Shale, Hibernate, and Java programming also available.
|
|
|
|
In this lesson we will learn about the various tags available in JSP with suitable examples. In JSP tags can be devided into 4 different types. These are:
- Directives
In the directives we can import packages, define error handling pages or the session information of the JSP page.
- Declarations
This tag is used for defining the functions and variables to be used in the JSP.
|
|
|
|
A web client consists of two parts: (1) dynamic web pages containing various types of markup language (HTML, XML, and so on), which are generated by web components running in the web tier, and (2) a web browser, which renders the pages received from the server.
A web client is sometimes called a thin client. Thin clients usually do not query databases, execute complex business rules, or connect to legacy applications. When you use a thin client, such heavyweight operations are off-loaded to enterprise beans executing on the J2EE server, where they can leverage the security, speed, services, and reliability of J2EE server-side technologies.
|
|
|
|
| Previous< 10 11 12 13 14 15 16 17 18 19 20 > Next |
|
|
|
|
|
|
|
|
|
|
|
|