Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.web
Interface WebApp

    public interface WebApp

Abstraction of a web application.

Version:
  $Revision: 1.1 $
Author:
  Julien Viet

Method Summary
`java.lang.ClassLoader` | `getClassLoader()` Returns the class loader of the web application.
`java.lang.String` | `getContextPath()` Returns the context path of the web application.
`javax.servlet.ServletContext` | `getServletContext()` Returns the servlet context of the web application.
`boolean` | `importFile(java.lang.String parentDirRelativePath, java.lang.String name, java.io.InputStream source, boolean overwrite)` Import a file in the war file.

Method Detail

### getServletContext

    javax.servlet.ServletContext getServletContext()

  Returns the servlet context of the web application.

  Returns:
    the servlet context

### getClassLoader

    java.lang.ClassLoader getClassLoader()

  Returns the class loader of the web application.

  Returns:
    the web application class loader

### getContextPath

    java.lang.String getContextPath()

  Returns the context path of the web application.

  Returns:
    the web application context path

### importFile

    boolean importFile(java.lang.String parentDirRelativePath,
                       java.lang.String name,
                       java.io.InputStream source,
                       boolean overwrite)
                       throws java.io.IOException

  Import a file in the war file. The file could not be created for some reasons which are :
  - The parent dir exists and is a file
  - The parent dir does not exist and its creation failed
  - An underlying exception occurs when writing bytes from the source `Inputstream` to the target `OutputStream`

  Parameters:
    `parentDirRelativePath` - the parent relative path in the web app starting from the app root
    `name` - the name the created file should have
    `source` - the data of the target file
    `overwrite` - if false and the file already exists nothing is done
  Returns:
    true if the file has been created
  Throws:
    `java.io.IOException` - if the file cannot be created

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD