| Author |
is the structure in IDEs different from the learning structure?
|
Dror Astricher
Ranch Hand
Joined: May 20, 2005
Posts: 31
|
|
Hi guys I'm trying to use netbeans 5.0 to built a web game. I want to built everything manually but to use the help of the netbean to ease the writing (line numbers, compiling, colors, seeing typing errors before compiling and so on). I learned that the classes should be in C:\Tomcat 5.5\webapps\myProject\WEB-INF\classes\.......... but when creating a new project with netbean I have to put the classes in an 'src' folder outside the WEB-INF. Why? Also, when not using the 'new project' option, the javax.servlet is not included in the path and I can't compile. There is no option where I can make the structure myself. In the netbean 4.2 I just mounted a folder and made the structure. Is the structure using IDEs different then what we will usually use without it? Thanks in advance
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
Dror, In many tools, the web project structure is different in the IDE and exported WAR. The most common difference is the source folder, which you've noticed. If you take a look at the project properties, it should be compiling code into WEB-INF/classes.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Chad Clites
Ranch Hand
Joined: Aug 16, 2005
Posts: 134
|
|
NetBeans 5 is a bit weird at first. Basically, all you need to do is create a new project, and select the type of project that you want it to be (which in your case is a web app).. you seem to have that much figured out. Then right click on the project name, and create a package. Right click on the package name, and then add your servlet. As far as teh why, I couldn't say for sure, but I would guess that if it didn't enforce that particular structure, then it wouldn't properly construct your war file or xml files. This system works pretty good because once you compile, it builds the .war file for you. Then all you need to do is drop your .war file into the webapps directory of Tomcat. Tomcat will handle the rest. I'm not exactly sure what you mean by the javax.servlet is not included in the path when you start a new project... I've always selected "web app", and never had any problems. What sort of errors are being thrown? I'll fully admit that I am no expert when it comes to designing the structure of a web app. But what I have learned is how things work in NetBeans, so when I am not using NetBeans, I can mimic the structures used there to build my own. As long as I do that,I rarely have problems.
|
 |
Dror Astricher
Ranch Hand
Joined: May 20, 2005
Posts: 31
|
|
Thanks guys I got it finally. Everything is getting built up with the correct structure in the 'built' folder. Thanks again Dror  [ May 14, 2006: Message edited by: Dror Astricher ]
|
 |
 |
|
|
subject: is the structure in IDEs different from the learning structure?
|
|
|