Hi - I am curious about how things get packaged in a WAR. But maybe I should start with the specifics of the error message.
The JSP page I wrote opens a MySQL database and runs ad hoc queries that I type in. It's called "SQLGateway" and comes from a textbook on JSP/Servlets. It runs fine on my Eclipse IDE, and on my desktop (local only) implementation of Apache (7.0) outside of the IDE.
I modified the JDBC connection info to match a MySQL database on my ISP site, and tried running the program and got this as part of the error message:
Am I correct to assume the first thing I need to handle is that this class has to be made available in the ISP context?
A little digging shows that within my IDE, this class is provided in EL-API.JAR which is included in a set of JARs associated with my Apache Tomcat environment (grouped together as a "Server Environment" library).
General QUESTION #1) When I export a WAR and run it outside of the IDE but still on my desktop, how does Java find javax.el? It IS in my local install of Apache, so, is that how is resource is found? I didn't place a copy of EL-API.JAR in WEB-INF.LIB, and as far as I know, I don't have a copy on my CLASSPATH, nor in any lib or ext folders for my Java runtime.
General Question #2) Should I include this jar in the WEB-INF.lib folder when I make my WAR and place it in the IDE? I'm unclear if this is a generally accepted practice, or if this functionality should be provided by the Tomcat implementation at the ISP.
(NOTE: I attempted to do this--include EL-API.JAR--and upload it to my IDE, but the configuration on that site is a bit messed up, and I can't delete the exploded WAR from the previous iteration--the permissions are set up wrong. I've got a request in to the ISP to work out this issue and it will probably be resolved sometime Monday.)
Question #3) A JavaRanch FAQ on the Tomcat page reads: "How do I enable the EL (Expression Language) for Tomcat 5?" So close! The ISP uses Apache 6, so I don't know if the answer to the FAQ pertains to my situation or not. My web.xml reads as follows:
Pretty close, but it differs from the xml in the FAQ answer in several particulars. I don't know how one would change the FAQ answer to handle Tomcat 6 to enable EL.
General Question #4) To what extent will a JSP that runs on my local Tomcat (7.0) be backwards compatible with at Tomcat 6.0 implementation? Should I be going to Apache rather than here for that question? Should I have a Tomcat 6.0 running on my home machine instead of 7.0 if the ISP is running 7.0 or do you think I can/should nudge the ISP to use 7.0?
No you should not include the jar in your web app. That way lies sadness and sorrow.
The necessary jar files should be part of Tomcat. All I can surmise is that your ISP has boofed up the Tomcat installation in some way.
You would think that professional ISP and hosting services would have their act together -- but sadly it is not always the case. I'm currently dealing with a hosting service (on the behalf of a client who has been using them for years) who I refer to as the "Marx Brothers". Every time I have to have them adjust something, they come up with amazingly inventive new ways to completely screw things up.
Yeah, this ISP has been difficult, to say the least. I picked one that doesn't do a lot of java back end business. Their storefront is just two blocks away, though...
But I tell you, I contacted half a dozen ISPs that specialize in Tomcat, and not one took the time to answer some simple email or phone questions. I was all set to switch over. At least the folks that I am dealing with are responsive if not as experienced in Tomcat particulars as would be ideal.
Hopefully they will be able to deal with my request to get EL tags working. Given your response, I've got more confidence in making that request of them. We shall see on Monday!
Every snowflake is perfect and unique. And every snowflake contains a very tiny ad.