• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using Sun App Server instead of Orion

 
K. Tsang
Bartender
Pie
Posts: 3228
12
Android Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic