I am a novice learning java,servlet and JSP.
The pain is when I was a. NET program ape, accustomed to Microsoft's VS IDE everything is packaged well. The use of fools, do not need to care about the internal implementation.
The sad thing is I see the data is my eclipse, but the environment I'm downloading is eclipse. There are two problems to be solved.
One is how to sync my eclipse's stuff to eclipse,
The other one is the version number control issue. My environment I think the comparison is more wonderful (tomca6.0.45+j2ee1.8.25).
In this process encountered more problems, the following to find a first break it.
How to deploy a servlet to Tomcat, or how to debug on server (source code under the Tomcat folder)
For a novice, how to speed up their own problem notes are important, one way is to google|baidu you see the problem directly. Another way is to look at the error message "Guess" where there may be a problem.
When you use Eclipse to execute Web projects. You will see the console appear:
Warning:[setpropertiesrule]{server/service/engine/host/context} Setting ' source ' to ' Org.eclipse.jst.jee.server:myProject ' did not ' find a matchingproperty.
This typeface. The Server.xml service tag in the engine tag in the host tag in the context tag configured a ' source ' attribute, the property value is ' Org.eclipse.jst.jee.server:myProject ' .
The problem is that the context tag does not support the property of source, so it jumps out of the warning. So what we've found is that. Although there are warnings, most people's programs can still be implemented without problems, but a small number of people can not be executed.
Perhaps you have found on the Internet very much like this problem, and also give a solution, but you follow the solution to do, the warning is still there!
And now you can follow my steps:
Workaround 1:
- Double-click Tomcat v6.0 at localhost in servers and then jump out of the interface;;
- In the server options option, there is an option for publish module contexts to separate XML files. Here we have the same hook on the assumption that the problem is resolved, please skip. Assuming the problem is still there, please keep looking.
- Please note that server Locations, in Eclipse, is selected by default in the first "useworkspace metadata (does not modify Tomcat installation)". Deploy path=Wtpwebapps.AndEclipsethe default willWebitems to be placed inEclipse Working space (Work Bench) under the. Metadata\.plugins\org.eclipse.wst.server.core\tmp0 (or atmp1) \wtpwebapps\under the assumption that todayEclipseis famous inMyProject 'Project and deploy it to the server as it was, you'll see your project in the folder above ..
After the change is complete. You can save it. Later projects will be published under Tomcat under the WebApps.
Attention:
- In Eclipse, the Web project is advertised in such a way that the original server's Conf directory is partitioned into a backup directory and a new directory is created for itself. As a Web project to configure Eclipse advertisement. So I'm going to write the Javaweb project using MyEclipse.
- Sometimes. Under the server locations project, nothing can be selected, you can delete the server first, add Tomcatserver again, then right-click Open, change it.
This time only to conquer the first problem, release the servlet to Tomcatserver. Then if you import the My eclipse file will not work very well, at least some of the past can not be published. Because the default Web folder for Eclipse is Webcontend, and MyEclipse is webroot. So that only the contents of WebContent are published in Tomcat. How do I change it?
Please look
1. Locate the. settings file for Project
2. Change to the folder you want to publish
Web projects in eclipse proactively deploy to Tomcat and how to use my eclipseproject in eclipse