JSP to PHP and Back Again (with Netbeans)

Several years ago, I worked at a dotcom start-up working on JSP templates for an ATG system. I’ve dabbled in Java on and off for a few years, but I’ve mostly worked with PHP. Well, now I have a few projects at work coming up that require me to do some Java / JSP web development so I’ve been diving into everything there is that world.

Needless to say, the Java / JSP landscape has changed quite a bit since the year 2000.

I’ve mainly been concentrating my efforts right now on Tomcat. So I’ve started using Netbeans which has a bundled version of Tomcat. Pretty cool stuff. However, there’s quite a few things missing from the Netbeans tutorials.

Frustration # 1

When I launched a basic JSP page, I kept receiving the message: “Starting of tomcat failed, the server port 8084 is already in use

I thought maybe it was Apache so I shut that down. Then I shutdown Mysql, Postgresql and Oracle express (I like databases). Still nothing. Hmm… it worked at the office, but now not at home. What’s the difference? Ahh… the Norton firewall stuff. Once I disabled that, we were good to go. So, instead of leaving Norton off, I finally added the Tomcat ports (8084, 8081, and 8025) to the Norton rules.

Frustration # 2

When running the “Getting Started” Netbeans tutorial… about the second thing they have you do is to run a simple JSP page, but one that uses JSTL 1.1. When creating a new web app project, Netbeans creates an index.jsp file with some JSTL stuff in it. It’s commented out but it’s just begging to be played with. I thought this was kind of like going to med school and performing brain surgery your first day. But anyway, I uncommented the lines.

When attempting this, I received two main errors:

org.apache.jasper.JasperException: Failed to load or instantiate TagLibraryValidator class

The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved

After several minutes of searching, I realized, that you have to add the Tag Library within Netbeans to get this tutorial to work. You’d think they would just tell you that… and tell you how. Big strike agains Sun right there for me.

Anyway, you add the library like this:

  • Go to the properties of your project
  • go to library
  • add library
  • jstl 1.1
  • save
  • then run

Now to work up some basic CRUD functionality with MySQL. More notes as I discover and untangle my frustrations.

  1. 4 Responses to “JSP to PHP and Back Again (with Netbeans)”

  2. By Roman Strobl on May 8, 2006 | Reply

    Hi, which getting started guide are you referring to so that we can fix the JSTL library issue? The official NetBeans 5.0 Quick start guide for webapps doesn’t include JSTL so I’m wondering which tutorial are you using. Thanks!

  3. By Rich Zygler on May 9, 2006 | Reply

    Now that I look again, it’s actually not the “getting started guide.” But when you start up a new web project, the index.jsp that’s created contains some sample code (btw, how do you turn that off?). The sample code uses JSTL, which isn’t a problem, except that I couldn’t figure out how to make the project “JSTL aware.” So, uncommenting the tags breaks the page until you add the library.

  4. By raghu on Jul 3, 2006 | Reply

    thanx about the firewall. it solved the problem

  5. By Rahul on Jul 10, 2007 | Reply

    Hi ,
    Thx a lot . it gave some pointers .. I was using jstl1.0.something .. changing to jstl1.1 got rid of that error.

Post a Comment

Close
E-mail It