Installation
This section covers the following topics:
- Installing JEExplorer as a stand-alone application
- Installing JEExplorer into an existing Java web application
- Configuring JEExplorer
Installing JEExplorer as a stand-alone application
The procedure for installing JEExplorer as a stand-alone application on your server is as follows:
1. Install a Java application server. We recommend Apache Tomcat.
2. Extract the JEExplorer download package. Find the .war file contained in it.
3. Deploy the .war file to the application server. This procedure differs between different application servers. On Tomcat, copy the .war file to the <tomcat_dir>/webapps directory.
4. Make sure the application server is running, and access the application via a web browser. Using Tomcat, the URL to use will be something like http://localhost:8080/jeexplorer-1.15/, assuming that your server runs http on port 8080 and that the .war archive was named jeexplorer-1.15.war.
Installing JEExplorer into an existing Java web application
The procedure for installing JEExplorer into an existing Java web application is as follows:
1. Extract the JEExplorer download package. Find the .war file contained in it. Extract the .war file with a zip utility.
2. From the .war file contents, copy the file jeexplorer-x.x.jar (x.x being the version number) from the WEB-INF/lib directory to the WEB-INF/lib directory of your web application. Then copy the file jeexplorer.jsp to any location in your web application's context.
3. Deploy your web application. Make sure the application server is running, and access the application via a web browser. If you placed jeexplorer.jsp in the root of your web application directory, the URL to use will be http://localhost:8080/<webapp-context>/jeexplorer.jsp, assuming that your server runs http locally on port 8080.
Embedding JEExplorer in another page
If you wish to embed the JEExplorer file manager in an existing page, f.ex. as part of a dashboard type interface (or as in the Live Demo), you have several options. These include:
-
Server-side include
JEExplorer allows you to include the JEExplorer JSP page into the page using the include directive, f.ex.:
<jsp:include page="/path/to/jeexplorer.jsp"></jsp:include> -
IFRAME
Alternatively you can embed an <IFRAME> tag in your page displaying the JEExplorer file manager. This could be an advantage if a server-side include is impractical, f.ex. in case existing CSS styles make the JEExplorer interface render incorrectly. Example:
<IFRAME src="/path/to/jeexplorer.jsp" width=610 height=520 frameBorder=0 scrolling=no></IFRAME>
Configuring JEExplorer
JEExplorer configuration options include:
- Explorer home directory
The top-level directory for the explorer. This can be specified relative to the web application root or as an absolute path in the server file system. - Maximum size of file uploads
The maximum allowed size of files that can be uploaded. It can be specified with kilobyte precision or set to unlimited.
Each of these options can be configured on the general level or on a per-user basis.
Configuring general settings
General, or global, configuration settings can be specified using a properties file called jeexplorer.properties which JEExplorer looks for in the WEB-INF/lib directory of your web application's context.
Below is an example properties file including explanations for the different settings.
| # This is the JEExplorer configuration file. # JEExplorer looks for this file under WEB-INF/lib. # If omitted, default settings are used. # Home directory # -------------- # The home, or root, directory for the explorer. # It can be specified as either: # - a relative path (f.ex. /jeexplorer means www.yoursite.com/jeexplorer) # - an absolute path (f.ex. c:/jeexplorer or /usr/home/jeexplorer) home_dir=/ # Maximum file upload size (in kilobytes) # --------------------------------------- # The maximum size of file the user is allowed to upload. # A negative value means unlimited file sizes. max_upload_size_kb=1024 |
| jeexplorer.properties |
Configuring per-user settings
Setting configuration options for individual users is done at runtime through setting attributes on the javax.servlet.http.HttpSession object, of which your J2EE server creates one for each user of the web application.
User settings, if specified, always override general settings.
Below is a code example for configuring JEExplorer options for a single user session. This code can be inserted in f.ex. a servlet or a JSP page prior to the user accessing JEExplorer.
| // Set the explorer home dir for current user to c:/userdata/johnny. request.getSession().setAttribute("home_dir", "c:/userdata/johnny"); // Set the max file upload for current user to 250 kb. request.getSession().setAttribute("max_upload_size_kb", "250"); |
| Code example - setting user specific configuration |