If JSP is an extension to Servlets then in what case is one better than ...

If JSP is an extension to Servlets then in what case is one better than the other... can someone give me an example?

i wouldn't want to argue with previous poster, because i'm not too over confident with this thing, but i have got an undersatanding that .jsp's are translated to servlates and then compiled...
so technicaly jsp does exactly what servlet does...
but when you work with .jsp pages, then you can create web applications more rapitly and indeed there are those special tags that you may define for your self... (though i've never used them -- but then again, i'm just a n00b to JSP technology)

Similar Messages

  • Why PHP is better than JSP,Servlet(Java Web Apps) ?

    Well, my heart says JSP, Servlets are better but rent a coder and job market, demand-supply seems to be saying a different story... ? Why we should not learn PHP then ?

    dcminter wrote:
    You can develop web sites in PHP in two shakes of a lambs tail. But they aren't maintainable as they would be in .NET or J2EE and again the performance (which dicates what you can do as well as scalability) is between a scripted language with buggy runtime and a compiled language with an optimized runtime so you tell me. Yes, but rather like Spinoza's argument for the existence of God, an application that has existence is more perfect than one which exists only in the conception. Even if the conceptual one is faster.
    I don't denigrate languages like PHP that help novices get stuff done.
    To address the OP's complaint: If one language was objectively "best" then we would only need one language. In practice they all have strengths. The more you learn the more you'll know which to use for the task at hand. That said, to learn any language (even PHP) in profound depth will take the best part of ten years and maybe longer. Sometimes expediency leads us to use the language we understand better to solve a problem for which it is not ideally suited.Eloquent - well said.
    Bonus points for that Spinoza reference.
    %

  • How to make a JSP page always come from servlet

    Hi!
    Although ihave used "<%@ page session="true" %>" in some of my JSP pages, it can be accessed by just typing in the URL of that page in the browser.(After invalidating the session)
    I want that page to be accessed only if it is called theough a servlet..
    Plz help geeks!
    otherwise my applica'n is in for a serious hack!
    thankx in advance
    javed

    Set a flag (attribute) in session in your servlet, then forward/direct the request to your jsp. Test for that flag in your jsp, if it is not there then show error message to the users.
    Like this,
    String flag=session.getAttribute("isComingFromServlet");
    if(flag==null || !flag.equals("true")) {
    out.print("<h1>Sorry, you can't access this page !!!</h1>");
    return;
    }

  • When to use jsp,and when to use servlet?

    I think that jsp and servlet can realize the same functions, because when run a jsp, it is transferred to a servlet program, so when to use jsp and when to use servlet?
    I am now developing the input interface for a website, I just use jsp and javabean to connect to weblogic and database, and I didn't use servlet, Is there any unseemliness?
    Thank you!

    IMHO I use servlets to control the flow between my jsp's based on a number of factors in a webapp. For instance, user authorization. If a user has the authorization to conduct various administrative functions on an application (like change user rights, reset passwords etc) they will have access to specific buttons or links on some screens that others will not. I use servlets to establish what access rights a user has and direct them to the appropriate pages. I also use servlets to test data validity on form input screens. I know that I can also do this with JavaScript but that can be disabled by the client and in order to prevent that I also double check the form input from a servlet. All my jsp's do is display the results of a business process (which is held in a JavaBean or EJB) and the servlets act as the controllers for the application, connecting to multiple databases, verifying application state, flow control etc. I try to keep the jsp as simple as possible as some of them are maintained by html developers who lack the necessary experience to write java code. I hope this helps.

  • In what cases servlets are used?

    why i am asking this is we can do everything with jsp what is need of servlet?

    In JSP java code is mixed in with HTML. This is probably anacceptable solution for experienced Java developers, but Web designers won't want to have to mess with Java code, nor should they. For small projects, maybe only one person does everything; but for large projects (or Web sites) with hundreds of Web pages, responsibilities are generally divided into Web developers and Java programmers then there is a need of servlets.
    Problem 2.
    Because JSP pages are translated into servlets, the declaration element is essentially translated into class variables. Thus they have global scope, which is probably not a good thing.
    Problem 3.
    Database-specific code is in the JSP pages. What happens if the database table is changed to add a column? Someone will now have to go in and modify the JSP pages appropriately. There has to be a better way. i.e.,
    not servlets but jsp + servlets.
    Message was edited by:
    AmitavaDey

  • HT204053 Dear Support Team, every time i tried to logon Icloud its gives me wrong user name or password and at the end it show me error " This Apple ID is valid but is not an ICloud Account" then how can i use one account for same Apple ID and ICloud???

    Dear Support Team,
    Every time i tried to logon Icloud its gives me wrong user name or password and at the end it show me error " This Apple ID is valid but is not an ICloud Account" then how can i use one account for same Apple ID and ICloud?
    Thanks

    It is not possible to create a new iCloud account using a Windows machine. You must create the account using a Mac (10.7.5 or more) or an IOS device (iPhone etc). Once that is done you can sign into and use the account on your Windows machine.

  • Can you merge two user accounts on macbook? my wife has created a user on her new macbook , then inadvertently created a second one when using the migration tool. 1st ac has her office 365 install, yet 2nd has her itunes database, docs and contacts.

    Can you merge two user accounts on a macbook? my wife has created a new user on her new macbook air then, inadvertently, created a second one when using the migration tool. 1st a/c has her office 365 install, while 2nd has her itunes database, docs and contacts. What is the best way forward to get everything into the one account? Not sure if the office 365 will allow another installation into the second account, otherwise would just do that and delete the first, if that is possible?

    There is no merge but you can move data from one account to another via the Shared folder. Data is copied from Shared. Watch your free space when copying. These are large files.  Do one at a time if you are on a small drive. After making copy, delete from other users before you start next copy.
    Office365 installs in the main Applications folder and is available for all users on the computer. Activation is tied to the drive not the User.

  • About an hour ago, I purchased Real Racing 2 from the Mac App Store for $12.99, but since then it has not downloaded one bit, even though I have a stable wifi connection. The money has already been taken from my account as well. What should I do?

    About an hour ago, I purchased Real Racing 2 from the Mac App Store for $12.99, but since then it has not downloaded one bit, even though I have a stable wifi connection. The money has already been taken from my account as well. What should I do?

    Just to make sure, open Mac App Store and click Purchases. Can you pause the download and restart it?

  • After getting a new desktop I downloaded iTunes and authorized my new computer and then de-authorized my old one,  When I try to update my 5S it says my phone is not authorized and list my wifes email address as the account holder and not mine.  How

    After getting a new desktop I downloaded iTunes and authorized my new computer and then de-authorized my old one,  When I try to update my 5S it says my phone is not authorized and list my wifes email address as the account holder and not mine.  How do I correct this. I am using Windows 8.1 .  My wife has never had an iTuunes account

    Hello Lakesidetom,
    It sounds as though you are experiencing an issue with an Apple ID and authorizations. Based on your post, it sounds like you are familiar with the authorizing and deauthorizing process. The Apple ID in question (your wife's email) may be originating from the iPhone you are attempting to update. Is it possible that your wife created an Apple ID or iCloud account which is signed in on that iPhone? Below, I have included links to some resources that may help you determine if your wife has created an Apple ID:
    How to find your Apple ID - Apple Support
    Use these steps if you forgot your Apple ID or aren't sure that you have one.
    Apple - My Apple ID
    If you can't remember your Apple ID, just provide us with some information and we'll find it for you. Then we'll help you reset your password.
    Thank you for contributing to Apple Support Communities.
    Cheers,
    Bobby_D

  • I recently purchased a shutter release remote for my IPAD camera but the cord is only three feet long.  I purchased a 3 banded AV extension but it doesn't work.  Can anyone tell me what the correct extension cable is and where I can find one?  Thanks.

    I recently purchased a shutter release remote for my IPAD camera but the cord is only three feet long and I need an extension cord.  I purchased a 3 banded AV extension but it doesn't work.  I have been told that I need an extension cord that has AV and Mic to enable the remote shutter release to work with the extension cord.  Can anyone tell me what the correct extension cable is and where I can find one?  Thanks.

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • Urgent help please, I made an file with the size 1024x768, then i made two folios, one for retina 2048x1536 and one for non retina 1024x768, i have alot of video content in it, everything works perfect on my retina ipad, but when i open it on ipad 2 an er

    Urgent help please, I made an file with the size 1024x768, then i made two folios, one for retina 2048x1536 and one for non retina 1024x768, i have alot of video content in it, everything works perfect on my retina ipad, but when i open it on ipad 2 an error appears on the pages with video content?

    its in german:
    der Vorgang könnte nicht abgeschlossen werden.
    something like the process coundnt be completed

  • How can I allow a customer to upload an image to be stuck onto a mug or t-shirt and then view what it would look like on that mug or t-shirt?

    How can I allow a customer to upload an image to be stuck onto a mug or t-shirt and then view what it would look like on that mug or t-shirt?

    In the absence of drivers, a rather nasty way to achieve this would be to ensure that your software always occupies the same portion of the screen such that you know the position of the 'sample' button. You could then simulate a mouse click at those coordinates when you require a sample to be taken.
    This would not be a robust solution as a user could move or minimise the window, or other windows could also find their way into the critical position and cause the application to work incorrectly or cause unexpected things to happen.
    However, if you just need a short term work around this method might be acceptable, just be aware of the risks if you try it.
    Searching for simulate mouse clicks and having a play is the way forward.
    As an example of simulating a mouse click in a certain position, have a look here:
    http://forums.ni.com/t5/LabVIEW/Programatically-Se​lecting-a-ring/m-p/1463242#M557128
    Ian

  • Using Lion, recent Movies with .mov extension will not play in Quicktime, but earlier ones taken with same camera (Kodak M530) will play fine.

    Using Lion, recent Movies with .mov extension will not play in Quicktime, but earlier ones taken with same camera (Kodak M530) will play fine. I have got VLC which runs them fine but cannot get movies saved in iPhoto to play in VLC...and of course its a real bugger to copy moves from iPhoto to another folder; in fact if anyone can tell me how to do that I will accept defeat!

    Hello Shad:
    Have you downloaded and installed Flip4Mac?
    http://www.microsoft.com/mac/otherproducts/otherproducts.aspx?pid=windowsmedia
    Barry

  • In a hurry, I opened an email that said "order was shipped from "ammazon". I downloaded the order document and it ended up being a zip file. I then realized what it was, and did not actually open the file. This was on my Iphone 5. What should I do now!?

    In a hurry, I opened an email that said "order was shipped from "ammazon". I downloaded the order document and it ended up being a zip file. I then realized what it was, and did not actually open the file. This was on my Iphone 5. What should I do now!?

    Delete the email. The zip file will have no effect on your iPhone.

  • HT1310 when i starst my mac i get a flashing folder with a question mark. i tried rebooting and holding the option button then i get 2 boxes, one with a refresh arrow and one with a forward arrow neither of them seem to do anything. now what

    when i starst my mac i get a flashing folder with a question mark. i tried rebooting and holding the option button then i get 2 boxes, one with a refresh arrow and one with a forward arrow neither of them seem to do anything. now what

    Here is an article that describes what it is supposed to do:
    Startup Manager: How to select a startup volume
    If no Volumes are shown, it is telling you there are no potentailly bootable Volumes attached. That means your boot drive has died or the bootable image on it is unrecognizable.
    What Mac Pro ? by year, GHz, number of processors, screen size?
    What Mac OS X ?

Maybe you are looking for

  • Projector that plays more than one movie

    How can I make one projector play more than one movie? If the movies are protected, can the projector still play them? How can I link them? Thanks for your help.

  • Site no longer works

    I have designed our school website using iweb and this has worked well for the past few months until now. It's hosted by an education dept. server. After adding a few pages I decided to upload the entire site again. Suddenly it can't find the url? I

  • Lock NOT set for: Archiving the data from a data target

    Dear Expert, I try to archive one of my info cube, when i start to write the Archive file the Free Space in the Archive folder not enough and it make the process error. Then i try to changes the Archive folder to another path with enough free space.

  • Regarding  QM modules  flows in BI

    Hi Experts , I need to extarct the  data from  Base tables QAPP , QALS , QAMV and QAMR  tables . Kindly tell me what are standard datasource available on these tables ,   standard  CUBES  or ODS  for  the same . Thanks a loft for your help . Regards

  • I've updated and rearranged my music files so how do i update my itunes library?

    maybe just a noob quesion. but where do I go to update my folder/files for itunes? I just rearranged/deleted/updated my music files onmy computer, will itunes automatically sync/update evertyhing?