Integrate the latest version of Eclipse 3.0 and Tomcat5.0.27 with Sysdeo Tomcatplugin to build a JSP environment __JS

Source: Internet
Author: User
Tags java web tomcat server
I've been writing Java in Eclipse, and I've been learning about JSP, but Eclipse doesn't mention JSP support, and there's no correlation to JSP files in file associations, let alone text discoloration and code automatic hints. Google search to find out the combination of Tomcatplugin, You can lomboz the eclipse's perfect support for JSP and integrate the Tomcat server into it. But what is more disappointing is that the articles I can find are too old to be able to find the older versions. To configure it with a close version. Try again or no, Later simply according to their official website version of the corresponding relationship, their own configuration, a full day, at the end of the 12:00 last night was finally configured. In order to allow the user to do JSP eclipse users do not take this detour, close-up of this article, mutual encouragement.

First prepare the software we need (the latest stable release, 2004-7-27):

j2sdk1.4.2 Http://java.sun.com/j2se

eclipse3.0 Build http://www.eclipse.org/downloads/index.php

jakarta-tomcat-5.0.27 http://jakarta.apache.org/site/binindex.cgi

Tomcatplugin v3 http://www.sysdeo.com/eclipse/tomcatPlugin.html

lomboz3.01 http://forge.objectweb.org/project/showfiles.php?group_id=97

Now let's start our integration process: Take my installation path on disk as an example:

Eclipse extract to D:/eclipse;tomcatplugin and Lomboz are extracted to the corresponding plugin or feature folder in Eclipse

Tomcat extract to C:/tomcat setting tomcat environment variable: calalina_home=c:/tomcat

JAVA_HOME=C:/J2SDK starts the Startup.bat test under C:/tomcat/bin to run correctly.

J2SDK installed in the C:/j2sdk folder, the JRE default installation path C:/Program files/java/j2re1.4.2_05, but it doesn't matter. Setting environment variable Path=c:/j2sdk/bin

Which means you have to make sure Tomcat and JDK are working properly before all this work.

Start eclipse

Open: Window>>preferences

Point Tomcat as shown in the figure, click Apply. If you have a change in your safety path, you will need to adjust accordingly.

Not set this is the failure of my previous configuration unsuccessful, later, the self-study view of the error message to know. If you do not configure this, Tomcat can also launch in Eclipse and browse the sample pages (because those pages are compiled), but it cannot compile the JSP. The error message said that the related class could not be found.

Other default, dot OK.

About Lomboz configuration in this will not say, originally Lomboz can independently and eclipse complete JSP and Java environment, but configuration error, in the integrated environment can not start Tomcat, prompt error.

But why do we have to pretend it again? Because of its JSP editor we can edit JSP when we see the text discoloration and automatic prompt function depends on it. Look at the following diagram is its configuration preferences, its problems I have not found the reason, but also in the exploration but if the configuration succeeded, please contact me.

The following is an error message for starting Tomcat under Lomboz:

Bootstrap:class Loader creation threw exception
Java.lang.ExceptionInInitializerError
At Org.apache.catalina.loader.StandardClassLoader. (standardclassloader.java:207)
At Org.apache.catalina.startup.ClassLoaderFactory.createClassLoader (classloaderfactory.java:189)
At Org.apache.catalina.startup.Bootstrap.createClassLoader (bootstrap.java:160)
At Org.apache.catalina.startup.Bootstrap.initClassLoaders (bootstrap.java:104)
At Org.apache.catalina.startup.Bootstrap.init (bootstrap.java:193)
At Org.apache.catalina.startup.Bootstrap.main (bootstrap.java:399)
Caused by:org.apache.commons.logging.LogConfigurationException: Org.apache.commons.logging.LogConfigurationException:java.lang.NullPointerException (caused by Java.lang.NullPointerException) (caused by org.apache.commons.logging.LogConfigurationException: Java.lang.NullPointerException (caused by java.lang.NullPointerException))
At Org.apache.commons.logging.impl.LogFactoryImpl.newInstance (logfactoryimpl.java:543)
At Org.apache.commons.logging.impl.LogFactoryImpl.getInstance (logfactoryimpl.java:235)
At Org.apache.commons.logging.impl.LogFactoryImpl.getInstance (logfactoryimpl.java:209)
At Org.apache.commons.logging.LogFactory.getLog (logfactory.java:351)
At Org.apache.tomcat.util.compat.JdkCompat. (jdkcompat.java:55)
... 6 more
caused by:org.apache.commons.logging.LogConfigurationException:java.lang.NullPointerException (caused by Java.lang.NullPointerException)
At Org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor (logfactoryimpl.java:397)
At Org.apache.commons.logging.impl.LogFactoryImpl.newInstance (logfactoryimpl.java:529)
... Ten more
caused by:java.lang.NullPointerException
At Org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor (logfactoryimpl.java:374)
... One more

Let's move on to our configuration:

Create a new project Select Tomcat Project My project is named Tomcatproject

All the way default next

Right-click Project Tomcatproject Create a new file index.jsp

Write test code in index.jsp


Click on the Tomcat icon in the tool blue to start Tomcat to see the correct hint information

Then open the browser in the Address bar to enter http://localhost:8080/TomcatProject/is your local server plus your project name, note case sensitive.

And that's it.

You will see in the browser: Wed June 13:53:50 CST world,new JSP Programer

Well, finally is finished, the level of limited, please advise, about Lomboz problem also please expert advice. I think Lomboz is better than tomcatplugin, and it can do the project deployment in Eclipse. Uninstall server startup and engineering debugging Browse it supports Jsee development, and our JSP code Editor in the article relies on it if it's configured Then there is no need to tomcatplugin.

Modify Note: A few days later in a casual situation, found a Web site studio on a machine has a relatively old version of the Tomcat5.0.25, with it a try, found it can do. So to sum it up, the current Lomboz does not support the latest version of Tomcat. It is more convenient to recommend a slightly earlier version.

Also welcome you and me on the Java issue discussion and contact: yi_can@163.com
Author Blog: http://blog.csdn.net/emestudio/ related articles

The runlevels of Redhat9 and Gentoo Linux
The solution of the culture problem of Java Web application in Strust framework
Using MinGW under Windows System, the configuration of the C + + development environment under eclipse
Integrate the latest version of Eclipse 3.0 and Tomcat5.0.27 with Sysdeo's tomcatplugin to build a JSP environment
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.