I downloaded Netbeans IDE which comes with Glassfish (aka Sun App Server). But I didn't install Glassfish with Netbeans, but Sun App Server separately.
If I build web/enterprise projects in Netbeans, integrating with Sun App Server, everything works fine (html, jsp, servlets, ejb). But when I don't use Netbeans, only got html and jsp working (haven't tried ejb yet). I'm stuck on servlets.
Sun App Server has its web docuemnts place in C:\Sun\AppServer\domains\domain1\docroot.
Where do I put the servlets? I don't see a servlet directory like in Orion. Also do I need to set the classpath in order to compile servlets (eg when import javax.servlets.* is used)?
Also must I need to have WEB-INF/web.xml file for web projects? Exactly what goes in this file?
Originally posted by K. Tsang: I downloaded Netbeans IDE [and] Sun App Server separately.
Sun App Server has its web docuemnts place in C:\Sun\AppServer\domains\domain1\docroot.
Where do I put the servlets? I don't see a servlet directory like in Orion.
Also must I need to have WEB-INF/web.xml file for web projects? Exactly what goes in this file?
I've never used Sun App Server, so I'm guessing ... you should have a WEB-INF directory in the same directory where you put your web documents ... so C:\Sun\AppServer\domains\domain1\docroot\WEB-INF\classes would be my guess.
You definitely need a WEB-INF/web.xml file for a standard war file, but not for a HelloServlet. Have you seen the servlet assignments in the Cattle Drive? The instructions on building a HelloServlet are pretty specific there, beginning from the easiest form of servlet and building to a more complex war file.
For your Sun App Server specific questions, you would probably get a better response in the "Other Java Products and Servers" forum than here.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35224
7
posted
0
You definitely need a WEB-INF/web.xml file for a standard war file, but not for a HelloServlet.
Using servlets without a web.xml file might be something that is server-specific. I wouldn't bank on any particular server to support this.