• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Using Sun App Server instead of Orion

 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 9103
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43026
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic