File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Cattle Drive and the fly likes Using Sun App Server instead of Orion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Using Sun App Server instead of Orion" Watch "Using Sun App Server instead of Orion" New topic
Author

Using Sun App Server instead of Orion

K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2615
    
    9

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?

Thanks K.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9053
    
  12
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: 42909
    
  68
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.
 
 
subject: Using Sun App Server instead of Orion