File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes what is document root? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "what is document root?" Watch "what is document root?" New topic

what is document root?

yamini nadella
Ranch Hand

Joined: Apr 13, 2004
Posts: 257
is it web application root or WEB-INF folder?
Anthony Watson
Ranch Hand

Joined: Sep 25, 2003
Posts: 327
It's the parent directory of WEB-INF

Anthony W.<br />MCP, SCJP 1.4, SCJD, SCWCD 1.3, SCWCD 1.4, SCBCD
kriti sharma
Ranch Hand

Joined: Feb 16, 2001
Posts: 160
this gives the document root for the server installation at your system.

public void init()
ServletContext context = getServletContext();
path = context.getRealPath("/");
I agree. Here's the link:
subject: what is document root?
It's not a secret anymore!