I am having troubles creating a Dynamic Web Project in eclipse. When I go to:
File > New > Project... > Web > Dynamic Web Project
and then select Apache Tomcat v7.0 as Target Runtime this error shows up at the top of the window:
Runtime "Apache Tomcat v7.0" is invalid
Now I will not be able to press on Next or Finish to create the project.
What's wrong? Why does eclipse tell me that tomcat is invalid?
Please do these steps to troubleshoot your issue.
In eclipse go to Windows>Preferences>Server>Run Time Environments.
Now please check following things
make sure apache tomcat 7 is there.
If this is present make sure that the path specified in "Tomcat installation directory" there is still a tomcat at that path.
If above two are good then delete the runtime and re add your tomcat as runtimes.
I hope this helps you fix your problem :).
Related
I am setting up my project in Intellij for which I was following companies documentation but the problem is its written for eclipse IDE. In the documentation they asked to "Update the Context root under -> WebProject Settings : order/genome-database"
I don't know how to do the same in Intellij. I added tomcat server and added artifacts to it. Its running fine without errors and lunching the application but its not working as expected. Now, I want to update "context root" of tomcat server and I don't know how to do it for Intellij.
I was googling for a while but couldn't resolve the issue. Please let me know if you know how to do it.
Thanks
If I understand that correctly you set up your Tomcat Server in intellij IDEA you should have 5 tabs in the tomcat configuration: Server, Deployment, Logs, Code Coverage and Startup/Connection. In the deployment tab you can change the application context, I hope that is what you/they meant.
File ->Project Structure -> Artifacts -> and check if there are war files from previous ones.
Also, delete if you have previous deployments in the Tomcat server and add a new one.
I'm a new comer for java web development.
I can now start my tomcat6.0 with myeclipse 10.0,and have that famous tomcat welcome page on localhost:8080.
Then I try to create an empty web project.And right click to tomcat 6.0 under the server tab, choose "Add deployment",I choose project name and other things left with default.
then run my tomcat server, visit localhost:8080/projectname/index.jsp in my browser, it reply 404 error to me,"description The requested resource is not available.".
What I've repeated done:
1.Window->reference->server->tomcat 6.x, select the folder of tomcat.make sure the jdk version.
2.file->new->web project input name and done.
3.right click tomcat 6.0 in server tab, add deployment, choose project then done.
4.start server
5.goto browser ,input localhost:8080/projectname/index.jsp, got 404 error
6.select this project, try to run as myeclipse server application, it tell me could not redeploy
There are two signs maybe help.First is, when I right click tomcat under servers tab and add deployment, there is a yellow exclamation mark before it, and "deployment status" says "Deployment is out of date due to changes in the underlying project contents. You'll need to manually 'Redeploy' the project to update the deployed archive."
The second on is, I can not find any thing related to my project under webapps.Is it because I installed tomcat under C driver and myeclipse have no privilege to write things into there?
I don't know why this happen, I followed everything tutorial about this topic show me. Is there anything I missed?Please, any help will be appreciate!!
If you create empty Dynamic Web Project from Eclipse it will produce no result as it have no code your scr and WEB-INF folders will be emplty
Did you stop tomcat wich you run manually before start it from Ecliple? By default when you start your tomcat from Eclipse you not able to see welcome Tomcat page. Please post link with your tutorial here.
Alright, problem is solved.
I did several steps, and I'm not sure which one is the key move, I just have the content within index.jsp.
First I uninstalled my tomcat in C driver.
Then instead of exe binary format tomcat installer, I unzip my tomcat rar package into D driver.
Then change CATALINA_HOME,point it to new path
I also changed my MyEclipse's default workbench. Because there's also a Eclipse in my computer, they two were share the same bench, now I seperate them.
Pay attention, after change the workbench, the eclipse tomcat become enable again,which has been disabled in earlier operation, and jdk for my tomcat 6.0 has to be redeclare.
Last step, I point tomcat to the new one on D driver, and deploy again, everything just rock and roll.
ENV:Win7 32bit, myeclipse 10.6, tomcat 6.0
I have just downloaded NetBeans 7.3 for JavaEE and installed it with Tomcat 7.0.41 Everything went fine and I can run NetBeans, start and stop Tomcat from within the IDE and add and remove servers at will.
However when I try and create a Java web Application project my server list is empty.
The message I get at the bottom of the wizard for creating projects is "No servers are registered in the IDE. To register a server, click the "Add..." button.
I have Googled and got nothing and looked at the NetBeans docs and got nothing, help me
I am running Netbeans 7.3, Java 1.7, Tomcat 7.0.41 and Windows xp-3.
This Problem is solved by just Restarted Netbeans Software
Thanks to all
I know the original problem was solved, but I had a very similar issue, and in my case simply restarting Netbeans did not help, so I wanted to help anyone with my issue. It sounds stupid, but I wanted to warn people that they need to be sure to download the right tomcat zip file.
Tomcat lists several zip files on their server, and I should have been using the Windows-64 zip file. Instead, I downloaded the first file, which just said "zip". I am not sure what configuration this was. It ran in windows 7, but created the same sort of mysterious pattern in Netbeans. In the Services tab, I could clearly see Apache Tomcat listed under Servers. If I started the service it worked fine. However, when I right clicked on my project and attempted to resolve missing server problem, it would not list tomcat in the list. The list is filtered to only show servers that are valid with the version of Java EE 6 or whatever you are using. In my case, apparently the original tomcat I downloaded was not valid.
You have to register the server inside Netbeans.
Simply a matter of going to the servers tab under tools & adding a new server & browsing to the installation location.
Follow the tutorial on the link below here (start at the time I have set):
Tutorial
Try this remove all server from the IDE and then double click the netbeans exe go to customize select the the tomcat server alone and then install
sample
Go to Tools -> Plugin -> Update Plugin.Worked for me, give it a try.
I am getting an error when I try to build my project in NetBeans. I am using JBoss 5.1.0 server and have attached that to my project. The error is -
The following error occurred while executing this line:
.../myPath/build-impl.xml:176: The Java EE server classpath is not correctly set up - server home directory is missing.
Either open the project in the IDE and assign the server or setup the server classpath manually.
For example like this:
ant -Dj2ee.server.home=<app_server_installation_directory>
I am using Mac OS X Lion.
I was missing a library. When I right clicked the project and went to libraries, it showed me library missing. I added the library and did a clean and build and the error disappeared
Clean builds did not help me, either. I took a look at project.properties and found that j2ee.server.home was not set anywhere, although j2ee.platform.classpath depends on it.
I do have Weblogic Server set up under /home (on a Linux machine).
So, I closed the project and added a line to project.properties:
j2ee.server.home=/home/blister/wls/wlserver
(where wlserver = the server name)
And reopened the project. Presto, the app now builds. It still doesn't know where the app server is, but at least I can built my jar and can worry about deploying it later. (I tell it to build a war which deploys nicely to Weblogic.)
If you are using netBeans Ide, then right click on the project. click properties. in the properties menu select Run. in that the first text box is server. There select the server. with which u want to run the project. If the server details are not configured before. configure server details and try. it wil help you to solve the above problem.
This worked for me.
Right click on the Project -> Properties -> Run
And Change the server Setting from the current server to another sever and click OK.
Wait for any background scanning to finish.
Repeat the processes 1 to 3 again this time selecting the actual server you want to run the code on.
Then try Re-Running your application.
I also had this error. However despite adding servers in the Run section of the Properties window, repeatedly no servers showed as being available to add to the Project ( again within the Run section ). The solution to being able to see a server in this server list was to run Netbeans as an admin ( which I saw Rotunba referencing in this thread..It was then possible to add a server and the project built successfully..
I solved it like this, I added in the ANT properties field
"j2ee.server.home=http://localhost/"
tolls>options>java>Ant
this in linux netbeans
It could also be as simple as not running your IDE i.e. netbeans as an administrator on your machine. I had the same problem. Wasted some time.
I have searched stackoverflow before posting this question.
In eclipse i am running a tomcat server. I deleted the .class files from the work folder of the tomcat server. From then on I am facing the issue saying the class couldnot be found.
I re-built the project. Didnt help
Can you please suggest how to fix this issue.
You should NOT run Tomcat as a normal program inside Eclipse. You should use the EE version of Eclipse, and then add Tomcat in the server view. This will allow you to deploy Dynamic Web Projects directly to Tomcat or any other supported server.
delete the server from eclipse server view and create it again.