eclipse juno error on importing a eclipse indigo project - eclipse

Hi folks When I import a project created in eclipse indigo into eclipse juno then my servlet classes are not recognized by eclipse juno and it shows error on all servlet classes like HTTPServlet etc.What can I do now? But when I am creating a new dynamic project then servlets are working fine.It means it only unable to find servlet API path when I import any eclipse indigo project.

Open the project's settings, the "java Build Path" tab. Check if a appropriate runtime library for your servlet container is in the list. I suspect not.
If it is not missing, expand the library and check if there is a servlet.jar or servlet-api.jar.
If it's missing, click the "Add Library..." button, select "server runtime", click next and choose one from the list.
If this list again is empty (probably), you need to configure a server runtime first. To accomplish this, select window, preferences from the eclipse menu, go to "Server", sub menu "Runtime Environment" and add a suitable one. Then add this to your projects build path.

Related

the superclass "javax.servlet.httpServlet" was not found on the Java Build Path

I have get a problem when I create a new web project in the eclipse.
There show 'the superclass "javax.servlet.httpServlet" was not found on the Java Build Path'.
I have find solution on the Internet, but that not work.
The solution is Project Properties-> Java Build Path-> Add Library -> Select "Server Runtime" from the list-> Next->Select "Apache Tomcat"-> Finish.
Is there anybody can give me other solution? Thanks very much.
My OS is macOS,tomcat is 9.0.0.M9,jdk is 1.8.0_101,the eclipse is jee-neon.
I have solved the problem by doing the following,
Actually i got this error, my scenario was..
I was using the APACHE TOMCAT SERVER VERSION 8.0, but the project i downloaded was using APACHE TOMCAT VERSION 7.0 it seems, so i changed it to version 8.
How was did was:
right Click on the Project properties.
In the Left menu, we can see the Java Build Path
Select the Library tab, and add the new Library.
In the Library Type, select the Server Run time, then click next and Finish will solve the problem.
All the Best
I tried above steps and still errors were there in JSP even runtime libraries were configured properly. I'm using java 8 and tomcat 8. So I unchecked "validate jsp fragments" under project properties > validation > jsp syntax.
With using Eclipse:
Version: Oxygen.2 Release (4.7.2)
Build id: 20171218-0600
I solved the Tomcat Server Library import as follows:
Right Click on the Project properties.
In the Left menu, we can see the Java Build Path.
Select the Libraries tab, and Add Library button.
In the Add Library window, select the Server Runtime in the list.
Click on Next button, Select the item Apache Tomcat mentioned with version in the list, and click on Finish button.
Wish it makes smile on your face!

Cannot install Apache Tomcat in Eclipse

I've downloaded apache-tomcat-8.0.8 archive, then I've unzipped it and tried to add it in Preferences -> Server -> Runtime Environments by clicking Search and selecting path to the uzipped archive. What I'm getting is Server Error
No new server runtime environments were found.
Any ideas why it might be happening? I have no Apache Tomcat options in New Server Runtime Environment window, which I get by clicking Add in the previous one. There are such options in every tutorial I read.
I think there currently is no adapter for Tomcat 8 in Eclipse.
Updated
Don't use the search button. Click add and choose an adapter first. Open Apache and choose Tomcat 7. Click next and point the installation directory at your Tomcat folder.
It seem that you have Eclipse without Java EE components.
so you see something like
instead of
Check Apache Tomcat Not Showing in Eclipse Server Runtime Environments (need to install JST Server Adapters )
Once you have plugins installed follow dialog flow e.g. like
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jst.server.ui.doc.user%2Ftopics%2Ftomcat.html
Seems like no java EE component.
Eclipse IDE for Java Developers 'Servers' doesn't exist.
Therefore download correct Eclipse IDE. It is Eclipse IDE for Enterprise Java Developers(Eclipse IDE for Java EE Developers).
Then,
Open Eclipse IDE > Click on the Servers tab located at the bottom > right click > New > click on Server.
Select Apache and then select the appropriate version of tomcat server.click Next.
Select tomcat Installation Directory and JRE. Click next.Click Finish.

Eclipse: Can't run project on Tomcat server

I have installed the Tomcat plugin and it works if i create a New Dynamic Web Project, and import an existing basic maven webapp into it. I can run it with the option of running it "as server".
However, when i did an Import existing project, in Eclipse, of an existing basic maven app, I had to right-click on the Project, choose Configure and convert it to a Faceted project, then right-click on the Project, choose Properties, and choose Targeted runtimes, and choose Tomcat and JRE. However, i still cannot run the project, "as server". When i click Run, i just see Java Applet, Java Application and JUnit Test as the options with which to run the project. I don't see Server.
Looks like the answer is:
May be Dynamic Web Module in Project Facet is not selected
Go to :- Project > Properties > Project Facets > check Dynamic Web Module
Answer from Mohit Saluja for the following question: Eclipse Juno, maven project not able to run on server
Navigate to Project > Properties > Project Facets .
In the Runtimes Tab check the apache version which is installed in your lappy, and uncheck others .
Import the project as an existing maven project (you'll need m2e installed and either m2e-wtp or webby) and the maven configurators should set it up as a dynamic web project for you and get you ready to go. Then with m2e you can "run on server" or with webby you can "run as webby"

Unable to deploy Maven WAR project to JBoss: The selection did not contain any resources that can be run on a server

I'm using JBoss 7.1 AS, Eclipse Indigo, Maven 3.0.3 on a Mac OSX Lion. I have successfully registered JBoss 7.1 as a local server within Eclipse. I installed the JBoss tools for Eclipse, right clicked my Maven project, selected "Mark as deployable", but then the problem arises. When I right click on "Run As" -> "Run on Server", I'm greeted with the error
The selection did not contain any resources that can be run on a server
Any ideas what additional steps I should take to make this bad boy deploy? Let me know what other information I should provide.
Sometimes this happens to me when I'm dealing with Maven projects too.
Try the following: In Package Explorer right-click on your project pom.xml then use "Maven > Update project". After that you should click on menu "Project > Clean...".
Now try to add/remove again.
By the way, you should't need to mark your entire project as deployable under normal conditions.

GWT designer doesn't work with Maven-GWT project

I just started a GWT project with environment:
Eclipse Helios
google plugin for Eclipse 3.6
maven2 plugin for eclipse
Gwt designer for eclipse 3.6
The project is created by gwt-maven-plugin. The project can run in dev mode. But GWT Designer doesn't work for client GUI class. I removed Maven dependencies for GWT and directly import Eclipse GWT SDK, GWT Designer starts working for client GUI class. But it still doesn't work for UiBuilder template file.
The error message is :
UIBinder template should be in client package.
You are attempting to use UiBinder for /hsp-web/src/main/java/com/hs/hspweb/client/ui/UserListViewImpl.ui.xml, however it is not in GWT client package.
Go to "Java build path" in project properties, click on
"YourProjectName/src/main/resources" -> "Excluded: **"
entry and press "Remove" button. It should change to "Excluded: (None)"
Then, you will be able to open GWT designer.
I found the solution here.
http://mojo.codehaus.org/gwt-maven-plugin/eclipse/google_plugin.html
A restriction of this plugin is that it will search for gwt modules and host pages only in the first classpath source folder. Using a Maven / Eclipse integration like m2eclipse, this one will be your sourceDirectory (src/main/java). You'll have to move your gwt.xml files in this folder, instead of the standard Maven resource directory. See Google Eclipse Plugin issue #1597.