|Re: How import Netbean projects (JSP & Servlet)? [message #534820 is a reply to message #534720]
||Thu, 20 May 2010 12:56
| Russell Bateman
Registered: July 2009
Location: Provo, Utah, USA
On 5/20/2010 12:47 AM, Phil Freihofner wrote:|
> I'm working with a book on JSP & Servlets that has example code. At this
> point, I can import and run examples that are WAR files. But I cannot
> figure out how to import examples that are Netbean projects.
> I found a similar question posed here from 2006, in which the respondent
> said that the best option was probably to use Netbeans to create WAR
> files, and then import those.
> I thought I'd ask again, since things might have changed since 2006. I'm
> hoping to avoid downloading, installing and configuring Netbeans just to
> make the WAR files. But if that's what it takes...
It's been a couple of years since I last used NetBeans (so beware).
You almost certainly cannot use File -> Import to create a new Eclipse
Dynamic Web Tools (or any other) project from one created with NetBeans
because the Eclipse workspace files aren't there to support it.
However, you can easily create a brand-new Eclipse Dynamic Web Project
project and, after naming it, designate the root of the source code
directory contributing the source code.
You will have to pay attention to the naming of the web content
filesystem (the subdirectory that dominates WEB-INF): after clicking
Next a couple of times in the new project wizard, you'll have a chance
to change the name from WebContent (Eclipse's default) to whatever the
NetBeans project is using.
There may be some odds and ends in the NetBeans project that do not come
straight across quite the same way, but I doubt it. You will have to set
up libraries from scratch I assume (using Build Path -> Configure Build
Path -> Libraries).
(The remaining alternative is to create a new Eclipse Dynamic Web
Project, then populate it with NetBeans-created source files one at a time.)
I do something similar to what I suggest in a tutorial I recently threw
together on setting up the sample source code to Geary's and Horstmann's
Core JavaServer Faces book. See
http://www.javahotchocolate.com/tutorials/corejsf.html Their sample
code slipped very easily into Eclipse, but was not written for it.
Hope this helps,
Powered by FUDForum
. Page generated in 0.04079 seconds