Japano Configuration

The japano runtime engine is configurated by via servlet init-parameter in the WEB-INF/web.xml file of your web application

Example Japano Configuration

    <!-- more init parameter here -->


    The japano servlet must be mapped to *.jsp and the root context.  

You must define the japano servlet and all required init parameter in the /WEB-INF/web.xml descriptor of your web application. The japano servlet must be mapped to the url pattern "/" and "*.jsp".

Init Parameter

The japano servlet can be configured using the following init parameter:
Session type to create. Must be a subclass of org.japano.Session
default: org.japano.Session
Request type to use. Must be a subclass of org.japano.Request
default: org.japano.Request
If set to "true", the japano engine tries first to transport the session id via cookie. Only if the client does not store a cookie, another id transport mechanism is chosen according to the presence or absence of the "sessionIdPath" parameter.
default: true
If set to true the japano servlet will encode the session id in the first path part of the webapplication context. if it is set to false japano will use the value of the parameter jsessionid as session id and will generate initial redirects so that this parameter is set. Japano will generate a jsessionid parameter into URIs generated by action invocation tags but you must ensure that the sessionid is carried on to all pages. Japano will NOT try to set a jsessionid cookie.
default: true
If set to "true" compile JSP pages on the fly.
default: true
If set to "true" unnessecary whitespace is removed from JSP pages if they are of the mime types "text/html", "application/xhtml+xml", "application/xml" or "text/xml".
default: true
If set to "true" japano enforces a serial performing of actions. If an action is performed while the session is still used by another one, a second action has to wait.
default: true
Amount of seconds an action waits before timing out.
default: 30
Allows a direct view invocation via URI. if set to "false", direct access to JSP documents via an URI is not allowed. All requests must access actions and a welcomeAction must be defined in this case.

Setting this init parameter to true also requires setting the welcomeAction init parameter
default: true

Qualified name of an action performed when accessing directories. Either welcomeAction or welcomeView must be set.
default: -
Relative URI of view to use when accessing a directory. if such a view does not exist, a 404 error is sent. Either welcomeView or welcomeAction must be set.
default: -

Webbot handling

A problem with the japano's "session id in path" is that it is not well understood by the bots.

If a bots would just spider your website that would be no problem. On first access they get a new session id and keep it while spidering the site. The problem is that bots spider a while and pause then and spider someone else site and return later. So when a bot returns with a stale session id in the path, japano redirects it to a new session and the bot thinks : "yay! I found a new part of the site." and the whole spidering starts again from the beginning.

So to resolve this Sisyphos situation (with you having the pleasure of paying for the bandwidth), japano can handle bot user agents in a special way. No session id is put in the path and all requests with the same bot user agent acess same session.

The list of bot user agents is defined by a text file containing one user agent string per line (or &squot;#&squot; for a comment). That file has to be saved under /WEB-INF/bot-agents.txt. A default one with bots taken from wikipedia is included in the japano sample application.

Automatically generated files

Serizialized ActionConfig instance generated from java source metadata.
Cache map mapping classes to tag library names.