Novice Programmer Needs To Learn JSP

Hi All,
I am an experienced HTML programmer and my current employer would like me to learn JSP, JavaScript, and Java. They would prefer I learn JSP first.
I have no programming experience beyond HTML. What is the best way for me to learn JSP? Can I learn through books or will I need to take a class?
I appreciate any and all advice.
- Rob

Maybe someone else will disagree with me, but from my experience your management does not have a clue.
JSPs may look like more fancy HTML pages, but in fact the use of them by an application server (such as Tomcat) causes them to be translated into Java code and they become servlets. So, you cannot do serious JSP work without being aware of what is going on in wrinting Java Servlets.
JavaScript, although the name starts with "Java" is a distinct language, used pretty much only in browsers as a way to have smarter action implemented in the browser. JavaScript shares a tantalizing amount of Java's syntax, but they are different.
For example, if we consider a form to be used by someone to prepare information to send to a web site, with JavaScript, you can do validation before the data is sent to the server and put up a message to the user with no network traffic required. With logic only in Java code on the server, you will need to send the data to the server to do validation, and then send back a rejection notice asking for the user to recreate the information.
The ugly truth (in my opinion) is that to be a good writer of Java-ish things to be shown in a browser, you need to know HTML, JavaScript, Java, and Java Servlets. (Pretty soon you will need to deal with database stuff.)
JSPs can make some tasks easier, but you need to know what is really going on or you can make errors at a high rate of speed.
JSPs are not required. You could write code on the server to create a stream of html output that is a combination of standard blocks of html code and content from other sources (usually databases). With JSPs however, you can write blocks of html and java code and the process of compiling a JSP turns it into Java code that generates the stream of html output wiith intermixed data. It is easier to do maintenance on a JSP than on a plain servlet.
For example, if you are doing a page that is a "shopping cart" for an e-commerce site, you can have the standard html lines to create the <table> and header rows. Then, you switch into Java, get the data, and loop through the entries. For each item in the list of contents you output a row of the html table. When you are through looping through the data, you exit the java code and have a plain old html ending of the table.
Does this help?
Dave Patterson

Similar Messages

  • Where to learn JSP

    I need to learn JSP, but I'm not a programmer where should I start?

    That roseindia article is funny. The introduction is OK, but when it comes to real code ...
    public boolean connect() throws ClassNotFoundException,SQLException {
        Class.forName(dbDriver);
        dbCon = DriverManager.getConnection(dbURL);
        return true;
    }When does it return false? What's the benefit of returning true?
    public ResultSet execSQL(String sql) throws SQLException {}Passing Statements or ResultSets around as parameters or return types is bad design.
    The code also doesn't close the connection, the statement, nor the resultset in case of exceptions, which causes memory and resource leaks.
    And this is also funny:return (r == null) ? null : r;they explained it as:
    What this statement does is that, if the value of r is null, it returns a null value and if it is a non null value, it returns the value of r. Though this statement seems redundant, it is useful for preventing any errors that might occur due to improper value being set in r.
    So, if r is null, then return null .. What's the difference between null and null?
    The same applies to:return (r == 0) ? 0 : r; Further on there is no clear separation in the code. The "data tier" is spread over the "bean" and the scriptlets. Yes, scriptlets.
    Bad article.

  • What's the JSP Book to start learning JSP?

    I urgently need to learn JSP and i've been searching but i need an advice on which book i should get.
    I want to learn as fast as possible, but i really want to learn good JSP... so i give more importance on the content than just learning basics in 3 days.
    One more thing, i know how to program in ASP, JavaScript and basic Java.
    So, any recomendations?
    Thanks! :)

    Marty Hall's books are "Core Servlets and JSPs" and "More Core Servlets and JSPs":
    http://www.amazon.com/exec/obidos/ASIN/0130092290/qid=1064446032/sr=2-1/ref=sr_2_1/103-9847449-3205453
    http://www.amazon.com/exec/obidos/tg/detail/-/0130676144/qid=1064446032/sr=1-1/ref=sr_1_1/103-9847449-3205453?v=glance&s=books
    Jason Hunter's O'Reilly book on servlets:
    http://www.amazon.com/exec/obidos/ASIN/0596000405/qid=1064446110/sr=2-1/ref=sr_2_1/103-9847449-3205453
    Hans Bergsten's O'Reilly book on JSPs:
    http://www.amazon.com/exec/obidos/tg/detail/-/059600317X/ref=pd_sim_books_1/103-9847449-3205453?v=glance&s=books
    I like all these books. - MOD

  • Beginning Programmer needs help - JSP and databases?

    1. I have never used JSP before, but have been given an assignment to create a webpage to query a database. The database is in Access. Does anyone have a snipet of code in JSP that will query an MS Access database. Is there a function that I can use and pass it an SQL (select statement) and have it return a list of results.
    -OR-
    If there is a way for JSP to transform the MS Access database into a text file that would be good also.
    2. Has anyone created a search functionaly using JSP (or know of a tool) that can search documents, PDF files, HTML files, etc.
    Thank you for any help!

    hi , there is no big deal in JSPs, Servlets, EJBs e.t.c its olnly a matter of committing time and getting urself familar and in areas where you have problems this forum is a nice place for you to share all what u have.
    to start with i will give you some sites where you can start learning jsps, servlets, ejbs and the rest.
    1) http://java.sun.com/j2ee -> look for JSPs , Servlets, EJB, JavaBeans e.t.c
    2) http://www.jspinsider.com
    3) http://www.coreservlets.com
    4) http://www.jakarta.apache.com (download tomcat for your container)
    for databases u can use this code snippet but u will have to read more about databases to be able to chagne some things in this snipper such as your database username, password , url and the rest.
         <%@page import="java.sql.*" %>
         try
            Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
            Connection con = DriverManager.getConnection ("jdbc:odbc:test_dsn", "sa", "");
         Statement stat = con.createStatement ();
         ResultSet res = stat.executeQuery("select * from authors");
         while (res.next())
              //process the results of this query
         catch (Exception e)
            //process this also
    %>
    You will need to become farmilar with the java programming language and also database conventions so you have a proper understanding.
    study those db codes and modify to suit your needs.
    buzz on me in case you are stuck.
    Regards

  • Beginner to learn jsp, need help!

    hello, i am beginner to learn jsp..i don't know what i should do...pls tell me what i should do now for a beginner...i also need some tutorial that help me to learn jsp..can anyone give me the address to link to there??? i also don't know are me should to install tomcat??? i don't have to use the tomcat...

    first, you have to setup a jsp environment, include web server and database server.
    www.jspin.com
    www.jspindex.com
    www.code4u.com
    try to get some resources over these web site.
    good luck

  • I need to learn how to use all about java & mysql...help me!

    I have a situation here, I need to learn how to use java with mysql
    . Can I connect to a MYSQL DB with servlets?
    how can I build an e-mail server with java (no matter how difficult)
    please, I need help, and I really apreciate your help.
    thank you very much!!

    I have a situation here, I need to learn how to use
    java with mysql
    . Can I connect to a MYSQL DB with servlets?Yes... documentation to help you connect to any database can be found at http://java.sun.com/products/jdbc. To connect to MySQL, you'll need drivers (sourceforge.net), and the specific connection URL for those drivers will be included in the documentation.
    how can I build an e-mail server with java (no matter
    how difficult)If you're fairly new to JSP/Servlets, you may be in over your head here, since an email server is no easy application to code. Here's a link to the source code for the JAMES project... Apache's Java email server... maybe you can find some useful information there...
    http://www.ibiblio.org/pub/packages/infosystems/WWW/servers/apache/jakarta/james/source/

  • I must purchase a photo editing tool and don't know if I should go with Photoshop or Lightroom. I need to learn how to do basic photo editing on pictures used for a news website. Thoughts? Thanks!

    I must purchase a photo editing tool and don't know if I should go with Photoshop or Lightroom. I need to learn how to do basic photo editing on pictures used for a news website. Thoughts? Thanks!

    Hi scienceiscool,
    You can go ahead with the photography plan as mentioned in the link below:
    https://creative.adobe.com/plans/photography?promoid=KLXML
    Kindly refer to the link below to get used to the application better:
    Photoshop CC tutorials from novice to expert
    Regards,
    Sheena K

  • What I've learnt so far and what I need to learn next.

    Hi,
    I've been struggling with Extension Builder 3 for 2 days and have made some head way with it but I've got a long way to go.
    If you are a novice like me, this post will could provide some useful info, if you are an extension builder guru, skip this part and try help me with what I need to learn
    What I've learnt:
    1) Extension Builder 3 sucks but CCEB4B is awesome: http://davidderaedt.github.io/CC-Extension-Builder-for-Brackets/
         - EB3 requires you to close down Photoshop everytime you want to test your extensions, CCEB4B doesn't
         - EB3 is slow and ugly, CCEB4B is fast and beautiful.
         - CCEB4B set's up an extension icon in your manifest that you can edit straight away (nice touch).
    2) AngularJS (or something similar) is a must have for advanced extensions. Using controllers helps abstract your code which is always nice.
    3) You can't automagically JSON an object in ExtendScript and send it back to JS, you have to manually do it which isn't great but works well as an extension, (although not all photoshop object work with extensions, namely Layers & ArtLayers).
    var ArtLayer = function () {}
    var ArtLayers = function () {}
    ArtLayer.prototype.toJson = function() {
        return "{ name: '{0}', bounds: { left: '{1}', top: '{2}', right: '{3}', bottom: '{4}' } }".format(
            this.name,
            this.bounds[0],
            this.bounds[1],
            this.bounds[2],
            this.bounds[3]
    4) String.format function is handy Used in the code above.
    if (!String.prototype.format) {
      String.prototype.format = function() {
        var args = arguments;
        var sprintfRegex = /\{(\d+)\}/g;
        var sprintf = function (match, number) {
          return number in args ? args[number] : match;
        return this.replace(sprintfRegex, sprintf);
    5) Always use ExtendScript Toolkit to verify that your JSX files run before testing your extension, it's much easier to debug problems that way.
    6) Adobe generator looks good, if you are making anything that exports images you probably want to use it instead of looping through all the layers via ExtendScript.
    What I need:
    1) Event Reference for use with CSInterface.addEventListener
    2) A way to sychronously return a result from CSInterface.evalScript
    3) Can ExtendScript have the same power Generator has with exporting layers?
    4) Why can't we do Layers.prototype.toJson = function etc?

    What I need:
    1) Event Reference for use with CSInterface.addEventListener
    I would like that too. Documentation is pretty sparse and none of the event listener examples actually work (inside of PPRO anyway).
    2) A way to sychronously return a result from CSInterface.evalScript
    Not sure why you need it to be synchronous. Your should always expect that parts of your app are blocking and therefore use callbacks religiously. If you need sequential execution you can achieve that inside of the jsx file. Also, the evalScript does let you define a callback method quite easily.
    Kai

  • How to learn JSP

    Hi all
    What is the beast way to learn JSP?
    I am using windows Laptop, Intel Pentium M processor 1.6G
    512M Ram. Does that mean in order to practice that I need to change my
    windows platform to linux platform eg Redhat. In addtion download tomcat.
    Pls advise

    I think the best JSP book out there is Hans Bergsten's JSP book from O'Reilly. It has you using JSTL right from the first example, which is the right way to do JSPs IMO.
    Tomcat runs on Windows. You don't need Linux.
    %

  • Needs to install JSP and related things!!

    hi All,
    I am new to java web-related areas though I am in Java platform for years. I want to set up JSP & Servlet development area with RedHat Linux OS and MySQL database with Tomcat server. Can u tell me what are the new versions of these are compatible with each other or with any website regarding this. Thanks in advance.
    -bh_t_76.

    Hi
    You just need to visit http://jakarta.apache.org and download any version of Tomcat for Linux available freely. I am now aware about any other web containers for Linux platform althought I have worked with Jrun, Orion Application Server and Sun's J2EE Server on windows.
    For the configuration, you can refer to any book for JSP and servlet. Most of the books contains details of installation, configuration and running of Tomcat.
    I am in the process of learning JSP and servlets on Windows as well as Linux (I have Red Hat Fedora Core Project 1). So, I have told what I know till now. Hope that will help u.
    Also, if you are interested in keeping touch with me for the development and learning purpose, so that we can share a few things about Java, I am listing my email address. it is [email protected]
    All the best.

  • Want to learn JSP

    whats up guys i want to expand my language base so i am planning to learn jsp.
    so i wanted to ask a few questions
    1. what is needed for me to code in jsp i heard that jsp is similar to asp so i am guessing i can code jsp pages in dreamweaver right?
    2. can iis be used as the webserver for the jsp page. or do i need a new webserver
    3. can anyone point me to some good tutorials

    whats up guys i want to expand my language base so i
    am planning to learn jsp.
    so i wanted to ask a few questions
    1. what is needed for me to code in jsp i heard that
    jsp is similar to asp so i am guessing i can code jsp
    pages in dreamweaver right?I don't know ASP, but the little I do know tells me that it's not a perfect analogy. JSP is not ASP, especially if you keep scriptlet code out of your pages. I recommend that you do.
    I don't use Dreamweaver, so I don't know. Our UI developers use Dreamweaver to generate HTML pages, and then we add the dynamic part for JSP.
    2. can iis be used as the webserver for the jsp page.
    or do i need a new webserverWeb servers like Apache and IIS know nothing about JSP or servlets. You need a servlet/JSP engine. Any Java EE container will have one. A free one that you can download is Tomcat:
    http://tomcat.apache.org
    3. can anyone point me to some good tutorialsGoogle for one. I don't know what's best or up to date anymore, because it's been a while since I first learned JSPs.
    As far as books go, my favorite is Hans Bergsten's O'Reilly book.
    My biggest piece of advice is to start writing JSPs with JSP Standard Tag Library, or JSTL. No one should write JSPs without it.
    %

  • Learning jsp 2.0

    I need some suggestions of free online resources for learning jsp, because the ones I've found until now
    are too old (like Core Servlets & JSP book) or too intermixed with J2EE (like sun tutorial)
    Thanks in advance,

    Look for anything by Hans Bergsten. He wrote the O'Reilly JSP book. I think it's excellent. If he has any on-line tutorials they're sure to be good.
    The old stuff is as good as ever. What you really need to learn is the JSTL. Get the Jakarta implementation specific to your instance of Tomcat and go to town.
    Hans' book, or Shawn Bayern's "JSTL In Action", are both great sources for JSTL.

  • I start learning JSP

    I want to start learning JSP. What server do I need? I use Omni HTTPD for PHP and IIS Win 2000 for ASP - can I use it also for JSP. Where can I download free server (I work on Win 2000)?
    Is there any free JSP host in the net?
    Thank you

    Im in the same boat. Have purchased a book called "Core servlets and JSP". Im working from Win200 Server. Was following the guide which suggested Apache Tomcat as a good stand alone server, but cannot seem to configure it properly. I hav followed the instructions, and was then directed to type in "http://localhost/" in a browser, expecting to see a JSP page, but instead i got a IIS page??? So i assume i have not configured it properly. do i have to do something with IIS?

  • HT4910 i save my photos to camera roll. then back up but can't see it on icloud. why? we just lost 300 photos on my other iphone because we do not get proper help. that's why i need to learn now.

    i save my photos to camera roll. then back up but can't see it on icloud. why? we just lost 300 photos on my other iphone because we do not get proper help. that's why i need to learn now.

    You can't view your back up files at icloud.com.
    You can't view your camera roll and you can't view your Photo Stream files at icloud.com.
    The icloud back up plan allows you to "restore" your iOS device from the files you backed up at icloud.com.

  • Hello, i am new to the mac and i need to learn how to re image using an external hard drive

    Hello, i am new, like baby fresh new,...lol, to the mac and i need to learn how to re-image using an external hard drive.

    How to replace or upgrade a drive in a laptop
    Step One: Repair the Hard Drive and Permissions
    Boot from your OS X Installer disc. After the installer loads select your language and click on the Continue button. When the menu bar appears select Disk Utility from the Installer menu (Utilities menu for Tiger, Leopard or Snow Leopard.) After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the installer.
    If DU reports errors it cannot fix, then you will need Disk Warrior and/or Tech Tool Pro to repair the drive. If you don't have either of them or if neither of them can fix the drive, then you will need to reformat the drive and reinstall OS X.
    Step Two: Remove the old drive and install the new drive.  Place the old drive in an external USB enclosure.  You can buy one at OWC who is also a good vendor for drives.
    Step Three: Boot from the external drive.  Restart the computer and after the chime press and hold down the OPTION key until the boot manager appears.  Select the icon for the external drive then click on the downward pointing arrow button.
    Step Four: New Hard Drive Preparation
    1. Open Disk Utility in your Utilities folder.
    2. After DU loads select your new hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID  then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    Step Five: Clone the old drive to the new drive
    1. Open Disk Utility from the Utilities folder.
    2. Select the destination volume from the left side list.
    3. Click on the Restore tab in the DU main window.
    4. Check the box labeled Erase destination.
    5. Select the destination volume from the left side list and drag it to the Destination entry field.
    6. Select the source volume from the left side list and drag it to the Source entry field.
    7. Double-check you got it right, then click on the Restore button.
    Destination means the new internal drive. Source means the old external drive.
    Step Six: Open the Startup Disk preferences and select the new internal volume.  Click on the Restart button.  You should boot from the new drive.  Eject the external drive and disconnect it from the computer.

Maybe you are looking for

  • The LED display on my printer has no lights. I have an HP Photosmart Plus e-ALL-IN-O​NE B210 series.

    The printer works, but must be controlled from the computer.  I am using OS XP.  One day lights were not on.  Then they flashed once when I moved the printer.  I thought maybe it was a cable, but I had a technician look at it and he said all the cabl

  • Messaging between iphone and itouch

    My son just got an itouch. The other 4 people in the family have iphones. I can message him through an e-mail account, but when I do, my messages show up on his itouch and one of the other iphones in the family. (my daughter is not amused) When he me

  • Error code -38... why?

    Ok, this keeps happening randomly (or perhaps not...) when I'm working with an audio region i.e slicing, moving, copying etc. The project is a TDM based Logic 7 file that's been working fine up until now. I've just started using Leopard so that might

  • RE: Assets

    Hi All, Can anyone tell me about the asset processes? Give me brief explanation 1)  Main asset 2)  Low value asset 3)  AUC asset What is the involvement of logistics? internal order involvement? for AUC settlement rules? Project, WBS element, Network

  • Is there a usable version of firefox compatible with windows me

    i am hooking up an older computer and want to install firefox