ArcManager servlet 1.9

It is a Java servlet allows you to work with your archives (jar/zip) files. So you can upload/download jar files, change contents of jar files etc. It can be used for example for managing your data archives, EJB or another server based java applications.

How to use it:

a) copy arcManagerPackage.jar into WEB-INF/lib

b) describe ArcManager servlet in web.inf file.
 


    <servlet>
     <servlet-name>ArcManager</servlet-name>
     <servlet-class>com.jsos.arcman.ArcManager</servlet-class>
    </servlet>

c) describe a mapping for this servlet:
 


   <servlet-mapping>
    <servlet-name>ArcManager</servlet-name>
    <url-pattern>/servlet/ArcManager</url-pattern>
   </servlet-mapping>

Now you can use servlet in this form:

    http://your_host/servlet/ArcManager?config_file

    Runs the ArcManager and uses the mentioned file as a configuration file.

Instead of passing configuration file as a parameter you can describe it as an initial parameter in web.xml. Parameter name is config:
 


    <servlet>
     <servlet-name>ArcManager</servlet-name>
     <servlet-class>com.jsos.arcman.ArcManager</servlet-class>
     <init-param>
      <param-name>config</param-name>
      <param-value>path_to_your_configuration_file</param-value>
     </init-param>
    </servlet>

In this case the usage is:

    http://your_host/servlet/ArcManager
 

Configuration file is a text file, each line describes one parameter in the form of

    parameter=value

Empty lines and lines starts with # are ignored. Current version supports the following list of parameters:

#
# configuration file
#

# title (by default 'Jar/Zip file manager')
title=My files

# style. Describes a link for your CSS style file. By default is empty. E.g.:
style=/css/mystyle.css

# background color (by default is #3366FF)
bgcolor=your_color

# foreground color (by default is #FFFFFF)
fgcolor=your_color

# color for viewed files (default is #FFFF00)
visicolor=your_color

# font size (by default is the current browser's font)
size=1

# font face (by default is the current browser's font)
face=Verdana,Arial

# Date format. By default will use full date.
# You may set here format for date. E.g.:
date=dd/MM/yyyy

# header. You can set here some file contains any html-code. This code will be
# outputted at the beginning of each page. So you can set for example some banners.
# By default this value is empty
header=path_to_your_file

# home directory. This parameter is mandatory. Points to any existing
# directory on your server and describes location for jar/zip files.
dir=your_jar_directory

# default file extension for new no named files (.jar or .zip). By default is .jar
defext=.jar
 
Notes:

1. Configuration file can be saved anywhere on your server. E.g. if you are using ArcManager?config line we assume this file is saved under the root (docBase) directory of your servletrunner. But you can of course always use the full name for setting config file location: ArcManager?/home/users/my_file (or ArcManager?c:\users\my_file)

2. The evaluation version displays up to 5 files per directory.
 

    For downloading:   arcManagerPackage.jar
    Sample of configuration file:  arcconf
 

 © Coldbeans     Comments ?