JSP vs ASP

can someone here tell me the pros of using jsp against asp? benefits contras, why use one (i use jsp but i need to explain why not using others) and explain me well the reasons please

If your looking for info on a client then for
them to be a client means that they must
have sent an http request. You can use the
following jsp to get all sorts of information
about the client:
Request URI: request.getRequestURI()
Request Protocol: request.getProtocol()
Servlet path: request.getServletPath()
Path info: request.getPathInfo()
Path translated: request.getPathTranslated()
Query string: request.getQueryString()
Content length: request.getContentLength()
Content type: request.getContentType()
Server name: request.getServerName()
Server port: request.getServerPort()
Remote user: request.getRemoteUser()
Remote address: request.getRemoteAddr()
Remote host: request.getRemoteHost()
Of all of the above the request.getRemoteUser()
method is probably the one you want to use.
These methods are part of the httpservletrequest
interface under /javax/servlet/http/

Similar Messages

  • JSP , PHP, ASP???

    i read somewhere that php is far more powerful than JSP and PHP? is that rue??
    also for which is finding hosting, cheaper and easier???
    Ali

    PHP more powerful? Depends on what you mean by power.
    In terms of features, no. JSP and ASP have many more features. They have full fledged OO programming languages and API libraries backing them up.
    In terms of speed, it can be faster, just BECAUSE it doesn't have to bother with all the features that JSP/ASP provide.
    In terms of memory requirements, PHP wins hands down. Java/ASP can be quite memory hungry.
    They all do basically the same stuff at the end of the day - generate dynamic web pages.
    For a lot of simple small-medium size websites PHP is perfectly fine.
    ASP and .NET can provide many more features, but you are tied to MIcrosoft platforms.
    Java/JSP is the best (of course - how can I say other on a java forum) - provides a good balance of speed/power without tying you down to a specific platform
    You will probably find hosting easier for PHP/MySQL than you will for the other technologies, though I can't say with any certainty. I haven't really looked myself :-)
    Cheers.
    evnafets
    (let the flames begin)

  • HTMLDB webapp's scalibility, relibility, and performance vs JSP or ASP apps

    I am new to HTMLDB. It seems that HTMLDB is getting more attention now than before. I am interested in it, does anyone who knows it inside out regarding its pros and cons vs JSP and ASP apps shed some light about HTMLDB apps?
    I heard that asktom.com is created by it, but it seems that users are limited, is there any enterprise apps created by it, if yes, could you list the url?
    Thanks a lot,
    John

    I just answered your earlier thread starting June 4th...
    pls look here:
    Performance? J2EE versus HTMLDB
    originally started on J2EE vv. HTML DB on "performance"
    brgds
    Bernhard

  • Can somebody explain to me how JSP, servlets, ASP work within Sun's server

    Ok, I'm only beginning to get a grip of how all this works. And I have a lot of questions and confusion.
    1.) The server that comes with J2EE, what is that server? Is it an app server that runs only servlets and JSP, with some Web server stuff so it can output some info? Is it a stripped down version of TomCat? I am having a lot of trouble with the J2EE server (the one that comes with the SDK), and that is why I'm asking, maybe I don't need it. But I really want to learn JSP's, JScripts, and Beans. How else can I go about doing that, other than all out Tomcat.
    2.) Also can I run Servlets on Microsft's IIS on a Windows 2000 machine? Do I need a special API to run servlets, or JSPs?
    So how I see it, and again, I am a newbie at this. Machines that host a website, above all needs a web server. let's say most people use Apache, and they want to run it in Linux, becuase they want to be hackers. So then do they also run Tomcat, or IIS, or Coldfusion, or a million other servers in tandem on the same machine, so that they can handle ASP, JSPs, servlets, .cmf, etc.? or do they separate the app server from the webserver and then do some sort of linking? if somebody can direct me to how all this stuff works, I would greatly greatly appreciate it.

    Sounds like you need to read the J2EE spec as well as
    the servlet and JSP specs. It helps to glance through
    sections you are interested in.
    Ok, I'm only beginning to get a grip of how all this
    works. And I have a lot of questions and confusion.
    I think for a newbie, deploying your jsp's and servlets
    to a J2EE compliant app server can be quite a headache.
    You might want to concentrate on tomcat, which does servlet
    and jsp.
    Some app servers provide a http connector for most common web servers.
    I think tomcat has a IIS connector. In this case IIS would serve static html as well as its own stuff, other things like servlets and jsp go to tomcat. I am unsure about this as I mostly use tomcat in standalone mode. You can run tomcat on windows, as it is written in java.
    >
    2.) Also can I run Servlets on Microsft's IIS on a
    Windows 2000 machine? Do I need a special API to run
    servlets, or JSPs?

  • Jsp and asp integration

    This might sound like a stupid thing to do.
    If I have a main website developed in jsp and I want to pass information (variables) from it to another component of the same site developed in asp on a separate server is this possible?
    If so how might one do it?
    Many thanks
    Paul

    It's not a stupid question! You can even have both ASP and JSP on the same server - IIS! Of course, you have to have JSP container installed to process your JSP/Servlets.
    How to do that? Install IIS (Microsoft Internet Information Server) (usually working on standard web port 80), also install Tomcat on the same server. After that you have to install ISAPI filter on IIS. That's the component that will filter all HTTP requests for pages with JSP extension from your IIS server and redirect them on Tomcat for JSP/Servlet processing.
    E.g. if you have installed ISAPI filter for Tomcat container and you have INFO.ASP and INFO.JSP on your site. IIS will process ASP and send the result to your client. Also, if client requests INFO.JSP, ISAPI filter will recognoze from HTTP request that this client is asking for JSP page and it will redirect this request on Tomcat which will process this JSP and return the result to the user again.
    APS and JSP pages can communicate among each other through POST or GET methods. For example if you request INFO.ASP?user=John or INFO.ASP?user=John both of them are capable of dealing with parameters (user) and each of them can redirect request to other one.

  • 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.

  • JSP v ASP

    hello. i have a quick question. i am in the process of learning jsp and servlet programming. i have some background in asp.
    are asp and jsp similar???

    You will find that there are lots of similarities. The BIG thing to notice is that ASP pretty much puts all the code in the page as VB scriplets. This is not the preferred way to do it using JSP/Servlets.
    Typically you only want to put stuff that relates to the view in the actual JSP page, preferring to delegate any logic to JavaBeans, Servlets or even Custom Tag LIbraries. I've seen a lot of ASP converts putting all their java code right in the JSP page. This generates a very ugly, hard to read and hard to maintain JSP pages. You have a lot more options with J2EE. It takes some time to master, but makes much more maintainable code once you do.

  • How to include ActiveXObject of(JSP) in ASP

    Hi,
       My work is to find out wheter particular plugin is installed in browser's to run tha application, I have done it using Javascript and i succeeded in it.
    I need to check it in ASP in Flex i included the same script in Flex Script part....
    But...
    I am getting error "call to possibly undefine method ActiveXObject "
    So please help me to use ActiveXObject in Script part of Flex.or to import it in Flex,,,,
    or Script to Find out Whether paricular plugin installed or not....
    Here is the code i worked out,,,
    public function detect(){
                 try{
                 new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
                    Alert.show("ShockwaveFlash AVailable ");
                //     document.write("<br><b>You have ShockwaveFlash installed.</b>")
                        return true
                    }catch (oError){
                    // document.write("<br><b>You have not installed ShockwaveFlash .</b>")
                    Alert.show("ShockwaveFlash not AVailable ");
                        return false;
    With Regards...
    Gopinath.A
    Software Developer,
    First Internet Systems Pvt Ltd.,
    Chennai

    Hi,
    W026DTI1.LIHEA_RECIPIENTS.LAST_NAME IN @Prompt('Enter Name','A','Classname/Objectname',MULTI,FREE)
    This 'Classname/Objectname' gives you the LOV of Objectname from which you can select the values.
    While for having * in place of any values you need to add an OR condition while defining the prompt defition as
    '*' IN @Prompt('Enter Name','A','Classname/Objectname',MULTI,FREE)
    So, The complete definiton will be as:
    W026DTI1.LIHEA_RECIPIENTS.LAST_NAME IN @Prompt('Enter Name','A','Classname/Objectname',MULTI,FREE) OR '*' IN @Prompt('Enter Name','A','Classname/Objectname',MULTI,FREE) 

  • ASP & JSP Sessions

    Can we share ASP & JSP sessions? Is there any possibility?
    regards
    Sreenivas

    Wouldn't do much good even if you could (which I'm not at all sure about).
    You couldn't share the data in the session as it's not stored in common format (Java Objects vs. ActiveX objects), though that might depend on the appserver in question and in some special cases Strings might be sharable.
    At the very least you'd need an appserver that can run JSP and ASP side by side in the same web application.

  • How can I call an ".asp" from a Servlet?

    I want to make a call to an asp page from my servlet. If i use the conventional way of doing it as follows:
    RequestDispatcher rd = getServletContext().getRequestDispatcher("http://localhost:8080/abc.asp");
    rd.forward(request, response)
    It gives me IllegalArgumentException saying that the "Path must be absolute". And if i give the relative path like
    RequestDispatcher rd = getServletContext().getRequestDispatcher("/abc.asp");
    rd.forward(request, response)
    In this case it takes me to the asp page, but gives some ClassNotFoundException - images.
    I do not understand what class it is looking for and where to get that?
    So Why am i not able to call an ASP from Servlet, Any clue??

    What are you trying to accomplish? A redirect is one of the only ways to successfully go from a Servlet to an ASP. For example:response.sendRedirect("http://server:9090/abc.asp?name=value");This is mainly because when you forward, your actually sending the request and response objects under the current servlet context to be processed by another JSP/servlet in the same (sometimes cross) context.
    When interacting with ASP's your actually communicating between web containers (one which is Java based the other VB based).
    When you use:RequestDispatcher rd = getServletContext().getRequestDispatcher("http://localhost:8080/abc.asp");
    rd.forward(request, response) Your telling the servlet to send it's contents outside the web container where they cannot exist as such (even though you are pointing to your own JSP server, it's the "http://" that makes it assume your trying to get out).
    Using: RequestDispatcher rd = getServletContext().getRequestDispatcher("/abc.asp");
    rd.forward(request, response) is fine but what is processing your asp in your Java Web Server?
    The best way to mix JSP/Servlets with ASP (in my opinion others may debate it if they please) is using messaging like XML. Trying to share sessions between ASP and Java is quite messy and to much effort for a 1 to 1 communication option.
    Back to an earlier question, what is processing your asp files in the Java web server? If you have something processing them (like ChilliSoft) then check the docs to see if it supports session sharing between JSP/Servlet - ASP.
    Anthony

  • Help with XML to HTML or JS or ASP?

    Let me begin by saying that I am new to using XML.
    I have been able to create a simple tree menu using XML tags, and then saved it as *.xml.  I am using Version 6.0.
    My problem is that I do not know how to convert the xml file into a viewable web page for my users, wheather it is HTML or JSP or ASP.
    Below is the xml that I have created:
    <?xml version="1.0" encoding="UTF-8"?>
    <menu>
    <style>left menu</style>
    <name>BIMI Menu</name>
    <item>
    <name>Home</name>
    <related-page>index.htm</related-page>
    </item>
    <menu>
    <name>HBCA</name>
      <menu>
      <name>Actuate</name>
       <menu>
       <name>Direct Weekly</name>
        <item>
         <name>DR03w - Direct Weekly</name>
         <related-page>#</related-page>
        </item>
       </menu>
       <menu>
       <name>Intraweek Acquisition Weekly</name>
        <item>
         <name>Intraweek Acquisition Weekly</name>
         <related-page>#</related-page>
        </item>
       </menu>
       <menu>
       <name>OAO (OSA) Weekly</name>
        <item>
         <name>DR01w - New Accounts</name>
         <related-page>#</related-page>
        </item>
        <item>
         <name>DR01w - OSA Weekly</name>
         <related-page>#</related-page>
        </item>
        <item>
         <name>DR01w - Promo Code</name>
         <related-page>#</related-page>
        </item>
       </menu>
       <menu>
       <name>Weekly Commercial Checking</name>
        <item>
         <name>Commercial Checking Report - MNY N</name>
         <related-page>#</related-page>
        </item>
       </menu>
      </menu>
      <menu>
      <name>Cognos</name>
       <item>
        <name>Product Analysis Monthly Dashboard</name>
        <related-page>#</related-page>
       </item>
      </menu>
    </menu>
    <menu>
    <name>HBUS</name>
      <menu>
      <name>Cognos</name>
       <menu>
       <name>Product Analysis</name>
        <item>
         <name>PA101 - New Account Analysis Dashboard</name>
         <related-page>#</related-page>
        </item>
       </menu>
       <menu>
       <name>Balance Tier Analysis</name>
        <item>
         <name>BT101 - Balance Tier Analysis Report</name>
         <related-page>#</related-page>
        </item>
       </menu>
       <menu>
       <name>RM Data Analysis</name>
        <item>
         <name>RM191 RM Portfolio - Personal Customer Details By District</name>
         <related-page>#</related-page>
        </item>
       </menu>
      </menu>
       <name>Actuate</name>
       <related-page>#</related-page>
    </menu>
    </menu>
    If someone can point me in the right direction, it would be a great help!
    Thank you in advance.

    I am currently using Dreamweaver version 6, and based on what I read the transformation options for XSLT are only seen on version 8.
    So in order for me to make this work I would have to create an xslt file by scratch that would loop through the xml code and transform it so that I could render it in html or maybe jsp.
    This is where my knowledge is lacking.
    I found this code that I thought could be useful:
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <xsl:for-each select="//menu/entry">
      <xsl:call-template name="SubMenu">
      <xsl:with-param name="strCSS">Parent IsVisible</xsl:with-param>
    </xsl:call-template>
    </xsl:for-each>
    </xsl:template>
    <xsl:template name="SubMenu">
    <xsl:param name="strCSS" />
    <xsl:variable name="strURL" select="url" />
    <div class="{$strCSS}">
      <xsl:choose>
       <xsl:when test="count(entry) > 0">
        <!-- Element has children, it can be expanded -->
        <input type="hidden" id="hidIsExpanded" value="0" />
        <label id="lblExpand" class="Expander" onclick="ExpanderClicked()">+
        </label>
       </xsl:when>
       <xsl:otherwise>
        <label class="Expander">  </label>
       </xsl:otherwise>
      </xsl:choose>
      <a href="{$strURL}"><xsl:value-of select="name" /></a>
      <xsl:for-each select="entry">
       <xsl:call-template name="SubMenu">
        <xsl:with-param name="strCSS">NotVisible</xsl:with-param>
       </xsl:call-template>
      </xsl:for-each>
    </div>
    </xsl:template>
    </xsl:stylesheet>
    Along with this I have some javascript for the expand/collapse functionality....but even with this xslt I am unable o view the menu...so I must be doing something wrong????

  • General JSP Questions

    Hi,
    I work at a marketing company and here we still use Classic ASP, and now we're starting to learn and implement JSP on our projects.
    We managed to get things working just like we do in ASP, however with just that I don't see any advantage at all, it's just that we currently are doing exactly the same thing we do with ASP, a form sends the user input to a code-page, we get all the parameters, insert/delete/update the DB, and return the user to another page. Everything's the same, except the language syntax that changed.
    So this is what I'd like to ask, what are some common "best practices" of using the JSP technology?
    As someone who's just started on JSP from ASP, what are the practical advantages?
    (One of the advantages - or actually the only one I can think that really saves some time are the Beans)
    Any sources/tutorials are welcome.
    Thanks,
    Daniel

    DanCoelho wrote:
    As someone who's just started on JSP from ASP, what are the practical advantages?
    (One of the advantages - or actually the only one I can think that really saves some time are the Beans)None. JSP on its own is pretty useless.
    The real power lies in the fact that you have a JVM available to you - in other words you can write and execute Java code. The trick is learning how to do this efficiently so that the web part isn't a bother, and that is where JSPs partly come into play.
    The simplest of the simplest form of Java web development that is at least somewhat of a clean design is to combine Servlet and JSP technology. Servlets are simple java classes that can serve HTTP requests - generally you will use them to handle the business logic side of a request. Database queries, complex calculations and any other kind of data manipulation is done at this point - generally you'll write specific classes to actually do all the work, and you use those classes in your servlets.
    What you do not want to do in Servlets is generate the view - the content sent back to the browser that the user will actually see. Generally this is HTML or XHTML content, but it could be something else entirely. JSPs, in combination with for example JSTL, are far better suited to fulfill this task. JSPs represent simple templates to massage data into page content, and the rule of thumb is that they are only correct when they contain absolutely no java code at all.
    So the general flow of this is:
    - user goes to your website or clicks on a link or a button. This will trigger a servlet.
    - the servlet handles all the business logic that is required
    - when the servlet is done, it forwards control to a JSP
    - the JSP generates the view, based on data that was generated in the servlet
    This may seem like a lot of work, but it really isn't once you get the hang of it. And there are still plenty of ways to make your life even easier still, using specific frameworks that exist such as Spring MVC or JavaServer faces.
    Whatever choices you make, there is one thing that is true for all of them: before you can do anything in the Java web development world, you'll need to know core Java. Intimately.

  • Why we are using servlet as a controller instead of Jsp?

    Can any explain answer for this question
    Thanks in Advance
    Why we are using servlet as a controller instead of Jsp?

    nareshannam wrote:
    Can any explain answer for this question
    Thanks in Advance
    Why we are using servlet as a controller instead of Jsp?Basically JSPs are suited to do just one thing, to generate HTML with variable content. You can put Java code in there too, but it's not a good place for it. Messy to validate, messy to debug. In fact, with tag libraries like JSTL, actual Java code is rare in professionally written JSPs.
    A controller does the bit that comes before you've decided what kind of response the user is going to get, typically it may invoke one of several JSPs according to validation etc.. There's a lot of logic, a lot of parsing parameters and so on. Much cleaner to do this from a Java class like a Servlet.
    Judging by this forum quite a lot of people come to JSPs from ASP or PHP and don't want to bother with actually writing Java classes. That's never going to be much good.

  • DOCTYPE header in JSP

    Is the web address in the DOCTYPE header really necessary? Should the DOCTYPE header be omitted from .jsp pages?

    To add to J-Fine's reply, in general, there is a browser and a server. The browser makes a request, the server gives a response, the browser shows the response. It doesn't matter that the response contains HTML from a plain HTML file, an image file, a video file, or an error message (typically as HTML), it always works the same.
    This has nothing to do with JSP, CGI, ASP, PHP or anything else. All those things (JSP, CGI, etc.) do is provide ways to generate and/or send the response content. A CGI can create HTML content, image content, video content or error messages.
    A little history (highly generalized):
    In the begining, the gods created HTML, and it was good. Then one day, man said to the gods "These HTML files are nice, but what if I want to display how many times the page has been seen?" And the gods responded by creating CGI and SSI and said "Hey, that little language called Perl would work nicely here." , and it was good. Then one day, Bill Gates said "Hey, I can do better then SSI and Perl CGIs by letting you write in VBScript right in with the HTML.", and it was okay if you could write VBScript and figure out how to write COM objects. Then one day Sun said, "Hey, VBScript is crap, why not use Java as the language, which will allow connecting lots of other Java code, which is easier then writing COM objects and can run on Unix.", and so it was much better. Then one day some people said, "Hey, lets do the same thing, but make it use a language that looks similar to Perl, since we all know Perl CGIs already.", and PHP was created and it was also good.
    (okay, I left out ColdFusion, and maybe PHP came before JSP, which itself came after server-side Java)

  • Converting JSP to PDF

    Hi All,
    I have a JSP file and I want to convert it into a PDF and save it in a specified directory.
    Can anybody suggest what should Ido ..??
    Any help would be appreciated.
    Thanks a lot in advance.

    no. This has nothing to do with Java anyway. Nor does it matter whether it's JSP or ASP or php or whatever.
    Of course you could use a servlet instead of a JSP and have that render the data as a PDF, sending the PDF to the browser as a binary stream when ready.
    That's the preferred way, as it allows you full control. It does of course require you to know how to use a PDF generation library to format the output correctly, and the servlet library to send binary data.

Maybe you are looking for

  • For each row of a table call a pl/sql function

    Hi, i have a search form in adf like this: parameter1:___ parameter2:____ buttonSearch Table with results field1 field2 field3 row1 ------ --------- ------- row2 ------ --------- ------- row3 ------ --------- ------- The user inputs the parameters 1

  • My phone wont connect or scan for wifi

    updated my phone to ios 8.1.2 and now will not find, connect or scan for wifi networks. done all normal resets etc

  • SSRS 2008 - ServerReport.SetParameters() suddenly extremely slow

    Hi, We have been using SSRS 2008 R2 for quite a while now but 3 weeks ago we started to notice some performance problems when generating SSRS reports. We have a .NET client which gets the list of reports from the server and then the end user can sele

  • Why Apple/MAC does not offer server mounting application?

    I am very disappointed to see that MAC /Apple does not offer simple server mounting application. It is a  very basic facility provided in Linux. I am forced to use third party stuff like OSXFuse which still is not a permanent solution. Hope someone a

  • CWGraph3d show z axis color ramp

    Hello! I use CWGraph3d. Is possible to show the color ramp (legend) for z axis data? Similar like by Intensity chart. Thanks for an answer! Solved! Go to Solution.