|
|
YOU
ARE HERE: TECHNOLOGY
>JSP VS ASP
|
||
|
JSP vs ASP
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| JSP | ASP | Definition |
| Request | Request | Access to request information. |
| Response | Response | Access to response information. |
| Session | Session | Access to session information. |
| Application | Application | Access to application information. |
| Out | Response.Write | Access to the response output stream |
Note that JSP is case sensitive. But VBScript is not.
As I mentioned earlier, both ASP and JSP support a similar way of delimiting scripting from content on a page. <% and %> are used to set of sections of script, '<%=' and '%>' are used to return a value within content, and <%@ and %> are used to delimit page directives.
JSP supports two basic styles of delimiting its scripting elements from
page content. The first looks a great deal like ASP, whereas the second
can be used to create JSP that is fully XML compliant. Here, let's examine
these styles:
| Base Style | XML Style | Description |
| <%@ directive %> | <jsp:directive.directive/> | Directives are used to specify page information, include other files, and specify tag libraries being used. |
| <%! declarative code %> | <jsp:declaration> declarative code </jsp:declaration> |
You can declare new methods using these tags. |
| <% code fragment %> | <jsp:scriptlet> code fragment </jsp:scriptlet> |
This code is placed within a base method of the generated servlet. |
| <%= code expression %> | <jsp:expression> code expression </jsp:expression> |
This code is appended to the output stream being returned for the page. |
Conclusion
In many ways, the biggest difference between JSP and ASP technologies lies in the approach to the software design itself. JSP technology is designed to be both platform and server independent, created with input from a broader community of tool, server, and database vendors. In contrast, ASP is a Microsoft technology that relies primarily on Microsoft technologies.
Now as we have seen the advantages of JSP over ASP, I'll like to share some information on JSP with you:
" There are a number of servers that support JSP on the market. The popular ones are Tomcat, Jrun and Enhydra.
" Another powerful feature of JSP that we haven't covered in this article is its ability to utilize JavaBeans with special tags defined in JSP. For more information about this, you can refer to Sun's JavaBean overview.
If you want to learn JSP, the best place to start is at the Sun Microsystems web site (http://java.sun.com). Their support pages include the JSP specification and documentation of the supporting Java classes. As you explore, make sure you get a good idea about the underlying Java Servlet technology, since this is what all JSP must become behind the scenes.
As you open up JSP and really see what it can do, you'll soon find that,
with practice, anyone (not just Java developers) can make use of the powerful
set of tools that JSP provides.
Useful
Links
1)
Java Server Pages TM Fundamentals
2) ASP
Tutorial
3) How
JSP compares with ASP
|
|
Related Links - Java Centric | |
|
Contact us with your project needs for a Quick Reply!
|
| Quick Reply | Site Map | About Us | Careers | Ask Us | Links| Vision| Address | ||
| Getting Started | RFP/RFQ | Web Development Process | Pricing Details | Client Quotes |Our Team | Success Stories | ||
|
|
The web division of Stylus Systems Pvt Ltd www.stylusinc.com ©1999-2008 |