|Buggy 'New Web Project' dialogue [message #218044]
||Wed, 23 July 2008 13:19
Originally posted by: d.leader.bio.gla.ac.uk|
I'm relatively new to Eclipse, and very new to the EE which I switched to
in order to work with java servlets (which I am familiar with on other
IDEs etc.). I hope this is the place to raise a possible bug - if not, I'd
be obliged to know where I should raise it.
Configuration. I'm using v. 3.4 of eclipsee-jee for Mac OS X, running
under OS X 10.4 on a PPC processor. I have Tomcat version 4.1 (from Server
Logistics) running on localhost, which I'm switching off before using as
the virtual server. I'm using JVM 1.5 - the Mac default.
The first bug, is not very important but irritating. If this the right
place I'll raise a more complex one.
Take the situation where I have already created a dynamic web project and
a virtual server entitled "Apache Tomcat v4.1" which uses Dynamic Web
Module version 2.3. Now I create a new one. I select New Dynamic Web
Project and a dialogue box appears. I name the project and the target
runtime settings default to "Apache Tomcat v4.1" instead of the original
<None> (and the config to 2.3 instead of <custom>). As soon as I have
entered the name an error message invariably appears to the effect that I
can't use this Target Runtime. However if I change the Target Runtime to
<None> the message goes away, and when I change it back again to "Apache
Tomcat v4.1" the message stays away and all is well.
Either there's a bug or I'm doing something subtly wrong - in which case
it's an interface bug.
|Re: Buggy 'New Web Project' dialogue [message #218098 is a reply to message #218090]
||Wed, 23 July 2008 18:17
| Larry Isaacs
Registered: July 2009
David Leader wrote:|
> Thanks for the prompt reply.
> I've just rechecked and I made a slight mistake in writing "However if I
> change the Target Runtime to <None> the message goes away, and when I
> change it back again to "Apache Tomcat v4.1" the message stays away and
> all is well." In fact the error message (Runtime "Apache Tomcat v4.1" is
> invalid. Tomcat requires a Java SDK to compile JSP files. Ensure that
> the JRE Preference settings point to an SDK install location) doesn't go
> away until the "Apache Tomcat v4.1" is reselected.
This message comes from a validate() method on the Tomcat runtime.
Tomcat 5.0 and earlier require a Java compiler be supplied by the Java
runtime to compile JSPs. This compiler typically comes in the form of
"lib/tools.jar" found in the home directory of the Java installation.
This validate() method also contains the following comment to document
some Mac specific code relating to this compiler detection:
// on Mac, tools.jar is merged into classes.zip. if tools.jar wasn't found,
// try loading the javac class by running a check inside the VM
There may be something about the way this is implemented and differences
in current Mac systems that is causing this detection to be
inconsistent. I'm not able to dig deeper into exactly what is
happening, but I can tell you how to debug this if you wish to know more.
> But no, the 'Problems' section shows no error messages during this
Sometimes code execution follows a path that reaches a "This should
never happen so what do I do now" state. In such cases, something is
often written to the Error Log view just to provide information that
something unexpected happened. You won't find this kind of info in the
Problems view. With respect to detecting the Java compiler, you should
see "Failed compiler check for <path to Java installation>" in the Error
Log view for each failed check.
> As far as the message goes, the Preferences -> Java ->
> Installed JREs shows "JVM 1.5 (Mac OS default)" selected with an
> appropriate path, so I think the message is wrong. Unless it thinks that
> with Tomcat 4 I should be running an earlier JVM - say 1.4. My servlet
> code doesn't use anything higher than 1.4.2.
> btw. When running the servlets I always get a Warning in the Console:
> "No properties file found /path to eclipse
> workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp 0/conf/jk2.properties "
Connectors for external web servers, such as Apache HTTPD, aren't
supported, so this error message may be ignored. You can comment out or
delete the Connector causing this warning in the server.xml file found
under the Servers project in your workspace. It won't affect your
FYI: For some details about the Tomcat support in WTP, see:
> Should I have such a file, and if so, how do I get one?
|Re: Buggy 'New Web Project' dialogue [message #218106 is a reply to message #218098]
||Thu, 24 July 2008 08:45
Originally posted by: d.leader.bio.gla.ac.uk|
Thanks Larry, that was all very helpful.
As I said, this bug is just a minor annoyance, but I thought I'd bring it
to the attention of the Eclipse community. I've incorporated it into an
instruction walk-through I've written for my students, and which I'm happy
to make generally available (or put out for criticism) when I've aired
another, more annoying, bug, which I'll do in a separate posting later
Powered by FUDForum
. Page generated in 0.02697 seconds