Difference between JSP and ASP

Whatz the diff between JSP and ASP

Hello msdnexpert,
Active Server Pages (ASP) allows you to build rich, data driven, dynamic complex applications. ASPs are written in Perl, VBScript, C/C++. They run on machines running Microsoft Windows. With ASP, an HTML page on a web server can contain snippets of embedded code. This code is read and executed by the web server before it sends the page to the client (usually a browser such as Netscape Navigator or Microsoft's Internet Explorer.) For more information on ASP see:
http://www.microsoft.com/workshop/server/default.asp
or
http://www.activeserverpages.com
Java Server Pages (JSP) also allows you to build rich, data driven, dynamic complex applications. JSPs are written in Java. They run on any Java enabled machine, including Solarlis, Windows, Linux, and Mac OS. JSPs also makes available all of Java's industrial strength security for free. JSPs uses a syntax similar to ASP except that the scripting language is Java. Unlike ASP, JSP is an open standard implemented dozen of venders across all platforms. JSPs are closely tied to servlets because a JSP page is transformed into a servlet as part of its execution. For more information on JSP see:
http://java.sun.com/products/jsp
A servlet is a generic server extension -- a Java class that can be loaded dynamically to extend the functionality of a server. Servelets are commonly used with web servers, where they can take the place of CGI scripts. A servlet is similar to a proprietary server extension, except that it runs inside a Java Virtual Machine on the server side, so it is safe and portable. Servlets operate solely within the domain of the server: Unlike Applets, they do not require support for Java in the web browser.
Unlike CGI, which must use multiple process to handle separate programs and/or separate requests, servlets can all be handled by separate threads within the same process or by threads within multiple processes spread across a number of back end servers. This means that servlets are also efficient and scalable. Because servlets run with bi-directional communication to the web server, they can interact very closely with the server to do things that are not possible with CGI. Another advantage of servlets is that they are portable: Both across operating systems and across web servers.
Resources used in researching this response:
Java Servlet Programing 2nd Ed by Jason Hunter with William Crawford.
http://press.oreilly.com/jservlet2.html
http://oreilly.com/catalog/jservlet2/
-Merwyn,
Developer Technical Support,
http://www.sun.com/developers/support.

Similar Messages

  • What's the difference between jsp and jsf?

    who can tell me what's the difference between jsp and jsf?
    I'm puzzled when I found some of the technology in jsp is so similar to the ones in jsp( javaserver page)

    Hi,
    Find the difference between JSP and JSF
    1. A developer has more control with JSP, but (should) get easier development with JSF
    2. Event handling is done differently in JSP (HTTP) and JSF (Java)
    3. The UI is designed differently (or should be at least) with JSP (markup) and JSF (components).
    4. The end product should also be defined differently - JSP page versus a JSF application.
    Is this the only thing that is need to make a decision for either or? Probably not. There are other pieces that need to be taken in account when deciding which technology to use - tools support, enough components, type of application etc.... At this point there are not enough JSF components (although there are some interesting projects underway - Ajaxfaces, Myfaces, ADF Faces, and WebChart 3d) and enterprise tools support is still limited to a few tools vendor. Looking at our ADF Faces components they are currently available as early access (not production) and demands for these components are stacking up, literally, outside my office doorstep. Although I would love to make them production - now! - it is not a viable solution since we are still checking features and fixing critical bugs.
    All this combined - not enough enterprise level components in production, lacking tools support etc... - leave customers in a vacuum where the decision is either to continue with JSP, since it is mature and has a wide developer base, or move forward with JSF not sure if the support, or the developers will be there. This is particularly sensitive to customers that need to get started now and be production by summer.
    If you are in this vacuum here are some key points promoting JSF:
    1. Fundamental unit is the Component
    2. Built in event and state management
    3. Component sets can be provided by any vendor
    4. Closer to ASP.Net or Swing development
    5. Choice of UI technology
    6. Scale up (rich clients)
    7. Scale down (mobile devices)
    8. Built into J2EE containers in J2EE 5.0 (tentative)

  • Difference between JSP and JSF

    What is the difference between JSP and JSF?
    Is it necessary to learn JSP before starting with JSF?

    JSP is a view technology providing a template to write plain HTML/CSS/JS in. JSP supports Java based taglibs to generate output and/or control the page flow dynamically. A well known example is JSTL. JSP also supports access to backend data with help of EL (Expression Language).
    JSF is a component based MVC framework which provides taglibs for use in JSP, the JSF core tags in <f:xxx> and the JSF HTML tags in <h:xxx>. Those tags generate HTML output and are tied to JSF component tree in the server memory so that the FacesServlet can work on them to gather request parameters, validate/convert them, update the model values (javabean properties), invoke some actions (javabean action methods) and render the response.
    You can use JSF on top of either JSP or Facelets. Facelets is another view technology. JSP is ancient and has its shortcomings when JSF comes into picture. Facelets is designed with JSF in mind and much more well-suited for it and provides great templating/composition capabilities to reuse specific groups of components without the need to wrap them in another custom component (so that you don't duplicate the same code over and over, e.g. label+input+message.

  • Whats the difference between *.jsp and *.jspx

    Hi
    When I create a new jsf page the first step prompts me for the "type". I am wondering what is the difference between JSP Page and JSP Document? Which should I be using? Are there any white papers or documents that explain the advantages of each?
    Also, someone suggested that I use Facelets, has anyone else used these from inside jdeveloper? Any thoughts / tips would be appreciated.
    Thanks
    troy

    JSPX uses an XML doument for you page code - it is the way we recommend you build your page. Makes for cleaner code and easier customization.
    JSP uses HTML with embedded JSF tags in it.

  • What's the difference between *.JSP and *.DO?

    Hi. I'm new to JSP programming and noticed that form actions call something like pageName.do -- what's the difference between the .JSP and .DO? When do you call one vs. the other? Thanks.

    A request including the jsp extension usually refers to a single JSP file on disk that will be loaded and rendered directly.
    A request including the do extension usually refers to a call into a special servlet that will redirect the request to another "controller" class which will in turn do some processing, and then load one or more JSP files to render the response.
    The commonest form of the latter is the usage in the Struts framework. The do extension is not mandatory, it just presents a convenient way to distinguish calls that should be handled by Struts from requests for JSPs and other content that are mostly handled by the container (e.g. Tomcat) directly.

  • Difference between jsp and servlets

    Can any body tell me the difference b/w jsp and servlets.
    As i know one difference is to seperate the java code from html. Is there any other difference. please...

    Servlets are a way to run java on a server. They don't necessarily need to be about HTML or even HTTP. You can write servlets that generate images rather than HTML, for example.
    JSP is a way to create servlets that generate HTML. They get translated into servlets (special-purpose servlets). This is sort of glossing over the details -- the power of JSP is that, by being an intersection between HTML and executed Java code, they can provide a way to clearly differentiate between the two.
    That's a way of looking at it anyway.

  • Difference between .jsp and jspf in weblogic

    Hi,
    A small question, what is the difference in behaviour between a jsp and jspf when doing a jsp:include.
    What is the solution when wanting to have a dynamic url to for example an image
    <img src="<%=imagepath%>image.gif">
    this works when the included file is a jsp but not when a jspf then it outputs "<img src="<%=imagepath%>image.gif">"
    Cheers,
    Johan

    >
    I am short describing the problem again,
    IN JSP, MY CODE IS LIKE THIS:
    HttpSession oSession=request.getSession(true);
    oSession.setAttribute("batchHash",reqRows);
    IN SERVLET, MY CODE IS LIKE THIS:
    HttpSession oSession=req.getSession(true);
    tblSession = (Hashtable)
    oSession.getAttribute("batchHash");
    System.out.println("IsNew ="+oSession.isNew());
    System.out.println("Object="+prmSSO);
    If I deploy this in TOMCAT, my output is like this:
    IsNew =false
    Object=Hashtable@982fc1
    If I deploy this in WEBLOGIC 6.1, my output is like
    this:
    IsNew =true
    Object=null
    Why is this?
    Why the "oSession.isNew()" returns "false" in tomcat
    and "true" in weblogic ?
    Please help....Your only problem is using
    HttpSession oSession=req.getSession(true);instead of
    HttpSession oSession=req.getSession(false);in your servlet! getSession(true) - forces to allocate new session,
    so it's absolutely clear why your Hashtable is absent in
    a newly created session!!
    Paul

  • Difference between JSP and tagdependent bodycontent in JSP Custom tags?

    Hello All,
    Can anybody tell me difference between the values of bodycontent attribute we mention in tld file?
    Can you give me some examples that practically show difference ?
    Also i want to know about BodyContent.
    Thanks in advance.

    Hi,
    I am a little confused about your point 2...... Why do you think it is not compatible?
    Well, the thing is: cause JSP is based on HTML it was easier to build nice user interfaces - and AWT always looked a little strange. As well it was easier to adapt JSP to other layout styles to run the same app on Lapotop/PDA. At the end that is pretty much it.
    MI is based on the SyncBO concept - so if you access a SyncBO in JSP or in AWT MI makes no difference and so at the end all that counts is: are you happy with AWT layout or do you need something more native/fancy/..... Well, AWT is limited in some areas - JSP give you much more. That is all limited due to the fact that up to MI7.0 MI runs on Creme with JRE1.1.8 support only.
    But MI7.1 now supports JRE1.4.2 even on PDA - and so we have SWT available - and so in 7.1 the default UI is SWT (very very basically we could say, this is the AWT direction - but really only if we really want to compare 7.0 and 7.1)
    Hopefully you got it.
    Regards,
    Oliver

  • Difference between JSP and AWT applications in MI

    HI,
    Can anyone plz clarify the difference and specific use of AWT n JSP appl in MI.
    As far as i understand:
    1)JSP works on browser based UI whereas AWT uses native UI.
    2)AWT is faster dan JSP but not compatible with SAP appl.
    3)We use AWT in appl like DSD n JSP in MAM,MSR etc.
    Plz explain in detail wat r the scenarios in which AWT can be used??
    Regards
    Priyanka

    Hi,
    I am a little confused about your point 2...... Why do you think it is not compatible?
    Well, the thing is: cause JSP is based on HTML it was easier to build nice user interfaces - and AWT always looked a little strange. As well it was easier to adapt JSP to other layout styles to run the same app on Lapotop/PDA. At the end that is pretty much it.
    MI is based on the SyncBO concept - so if you access a SyncBO in JSP or in AWT MI makes no difference and so at the end all that counts is: are you happy with AWT layout or do you need something more native/fancy/..... Well, AWT is limited in some areas - JSP give you much more. That is all limited due to the fact that up to MI7.0 MI runs on Creme with JRE1.1.8 support only.
    But MI7.1 now supports JRE1.4.2 even on PDA - and so we have SWT available - and so in 7.1 the default UI is SWT (very very basically we could say, this is the AWT direction - but really only if we really want to compare 7.0 and 7.1)
    Hopefully you got it.
    Regards,
    Oliver

  • What is the difference between jsp :include and server side include

    what is the difference between jsp :include and server side include(request dispatcher include method)????
    i understand that both request dispatcher include method and jsp:include take dynamic data,so when would one use request dispatcher include and when jsp:include.
    Is the usage interchangeable?i believe jsp include is used only for jsp/html but include directive can be used to include servlets ,jsp and html....correct me if i m wrong and
    do suggest if u hav ny other diff in this context...

    The difference really is: in what format do you want your inclusions? If your environment has many Java developers and only a few designers that focus mainly on, say, Flash, that might push you more towards the server-side include() directive. Or, if you have a large set of pages that receive dynamic content that is displayed in a consistent fashion (such as a workflow header area on a page).
    If, on the other hand, you have more web designers, there may be a greater desire to deal in markup rather than Java code. Java developers themselves might prefer to view markup (JSP) that more resembles the eventual output than something occuring in Java code.
    Finally, there are considerations of tiering. While it is totally possible to (and I have previously) implement 'view classes' that render markup or generate layout templates, JSP's offer, IMO, a subtle, psychological advantage. By forcing a developer to work in a different format, markup versus Java source, the separation on view from controller and model becomes a bit easier. It is still possible to make mistakes, but if a developer at some point notices, "Wait, I'm in a JSP, should I be importing a java.sql class?", then the choice to use JSP includes has paid off in spades.
    - Saish

  • Is there any difference between "jsp:useBean" and "scriptlet" ?

    A few days ago, I asked similar question. But I didn't get the answer I wanted.
    I want to know the differnce between <jsp:useBean../> and <% .. %>(scriptlet).
    I tested in three environments(Oracle Jserv, OC4J, and Apache Tomcat).
    In Oracle Jserv and OC4J, a problem occured. But, Apache Tomcat does not occur a problem.
    For example,
    1) TestClass.java (Bean)
    public class TestClass {
    private String txt;
    public class TestClass {
    txt = "Test"; ----- (g
    public String getTxt() {
    return txt;
    2) test.jsp
    <html><body>
    <% TestClass test = new TestClass(); %> ---(h
    <%= test.getTxt() %>
    </body></html>
    Assume that I visit "http://localhost:8888/test.jsp".
    In Tomcat, if I change "Test"(number(g) to "Test1" and compile the browser shows the change.
    But Oracle Jserv and OC4J does not do that. They also show the old String.
    So, I changed <% TestClass test = new TestClass(); %>(number(h) to <jsp:useBean id="test" class="TestClass" />. That is, I changed "Scriptlet" to "JSP useBean Tag".
    Then, Oracle Jserv and OC4J also show the changes.
    To conclude, is there any difference between "JSP useBean Tag" and "Scriptlet"?
    Can't I use a scriptlet (to make a class) in Oracle Servlet Engine?
    Thanks.

    It could be as simple as the JSP not recompiling between java recompiles - ie, it compiles in the link to the old class.
    Try changing the JSP file (add and delete a space) after you change the java code, and then see what happens.
    Jonny
    null

  • Difference between jsp:forward sendRedirect and jsp include directive

    Am very much confused, please explain me the difference between
    jsp:forward sendRedirect and jsp include directive with a suitable example.
    I'll be very gratefull. Its very urgent.

    One basic difference. The include executes in the .jsp servelet created. The redirect transfers "control" by redirecting the client request to another destination. In other words, the current .jsp is no longer in charge or in the calling chain in any way.

  • Difference between jsp forward tag and sendRedirect

    I would like to know the difference between jsp forward tag and sendRedirect.
    Please explain with a suitable example if possible ...
    glenn

    See: http://java.oreilly.com/news/jsptips_1100.html (number 4)

  • Difference between jsp:include and %@ include

    what is the difference between <jsp:include> and <%@ include %>? which has better performance? When to use which? suppose i have a menu that should be included in every page, which should I use?
    Thank you
    Cal

    <%-- some date this page was last updated with that particular version of JSP file --%>
    <% include file="relative URL" %>
    You use the include directive, as indicated, to include a file in the main JSP file at the time the file is translated into a servlet. This is done at translation time and therefore if the included JSP file changes, all the JSP files that use this included file will need tobe updated. If you use this include statement then i would suggest that you add a date descriptor of the last time it was modifed so that you can go back and tell if you have updated a particular JSP file or not.
    <jsp:include page="relative url" flush = "true" />
    When you use the JSP descriptor like this, you are getting the requested JSP file at REQUEST time and therefore you do not hae to worry about updating the calling JSP page.
    Hope this helps

  • Difference between jsp:forward and logic:forward

    Hi,
    Can anyone let me know??
    what is the difference between <jsp:forward> in and <logic:forward> in struts
    Thanks in advance,
    Regards
    Dhinesh kumar R

    See: http://java.oreilly.com/news/jsptips_1100.html (number 4)

Maybe you are looking for

  • IPad 2 Wifi Problems after upgrading to iOS 6

    I Updated my iPad 2 to ios6 then day iOS6 was released, ever since then i have been unable to connect to the wifi. I've reset the network setting and the wifi works for about 5 minutes until i go on any apple app ( itunes, app store, maps etc). I've

  • Email contact info

    I have my company directory in my contacts on my iphone. There are several people with the same name. Too many to change. When I try to use email & select the contact there is no way to know if i selected the correct person. Is there a way to see mor

  • Behringer UCG102 Guitar Link stop working after upgrade to Lion

    Hi, I  have a Behringer UCG102 Guitar Link that worked in the past (using Mac OS X Snow Leopard without any special driver, before upgrading to Mac OS X Lion) without any problem but now has stopped working. The device is working properly on Windows

  • Statistical indicator in Pricing schema.

    All, Can anyone explain the relevance of 'statistical ' indicator in pricing schema in simple terms with some examples ? regards

  • Computer Crashing w/Silverfast

    Hello- I have posted my question on the SilverFast Forum, but I didn't think it could hurt to see if anyone here was having the same problems with this software. I can only scan one scan at a time and then my computer crashes. I get the black tinted