wood burning stoves 2.0*
The moose likes IDEs, Version Control and other tools and the fly likes Unable to create servlet in Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Unable to create servlet in Eclipse" Watch "Unable to create servlet in Eclipse" New topic
Author

Unable to create servlet in Eclipse

Aaron Mathias
Greenhorn

Joined: Mar 15, 2009
Posts: 4
Hi,

Please help,

I've spent several days settings up eclipse and tomcat and synching them up with sysdeo. I can create and run html, JSPs, and even make queries to mysql in my jsps. The problem is when I attempt to create a servlet in eclipse (new..other..servlet) I am unable to select a project, nor do any of the "browse" icons work. I cannot create the servlet without being able to select a project. Is this the only way to create a servlet or is there something I cam doing wrong. Also as a side note, in JVM settings in eclipse the only option showing in teh dropdown is JRE, however I do have JDK installed. When selecting the appropriate JAR's in the JVM setting sections I am able to choose the appropriate JDK JAR's. Any thoughts on what is going on?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60774
    
  65

Moved to the IDEs forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

First, let me say that I don't use sysdeo (or at least, I have not used it for around 5 years because the Java EE tools build into Eclipse seem to provide everything I need, including sync'ing with Tomcat). I noticed then creating a servlet that only those projects that I created as "Dynamic Web Project"s were listed in the projects drop-down list.

Regarding the JRE vs JDK conundrum. Yes the Windows | Preferences label is "Java | Installed JRE's", but you can configure Eclipse to recognize JDKs - I have both a version 5 and a version 6 JDK registered, on top of the JRE 5 that Eclipse found on first run. After that, any place where I can select a JRE it shows my two JDKs and the JRE.


JBoss In Action
Aaron Mathias
Greenhorn

Joined: Mar 15, 2009
Posts: 4
When I create a dynamic web proejct i am able to create a servlet. However I am trying to do this in a Tomcat Project. Do I need to select a library before I am able to create servlets? SHOULD I be able to create a servlet in Tomcat Project, I know the answer is Yes, so what is different between tomcat project and dynamic web project that eclipse is bugging out when I try to create a servlet?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

I don't see "Tomcat Project" in my list of projects that I can create in Eclipse, so I suspect that it is a sysdeo thing. My guess is that whatever flag that the Create Servlet wizard is looking for is not being set by the sysdeo code that creates a Tomcat Project.

I guess a workaround would be to simply create a class and let the class extend HTTPServlet.

Or perhaps someone out there who has the sysdeo plugin could chime in with suggestions.
Tim Wells
Greenhorn

Joined: Apr 01, 2009
Posts: 1
I noticed the same thing when creating a tomcat project with the sysdeo plugin. Can't use the Servlet wizard. I hope somebody has found a way to make it work because other than that, the plugin is excellent.

tim
 
 
subject: Unable to create servlet in Eclipse
 
Similar Threads
configuring eclipse with tomcat
Problem with Eclipse in Ubuntu
Installing jdk 1.6 as well as 1.4.2 - possible ?
No JSP Page creation in menu
With JBoss 4.2 and elipse 3.3