Japano Configuration
Japano is configurated by via servlet init-parameter in the WEB-INF/web.xml file of your web applicationExample Japano Configuration
<servlet>
<servlet-name>japano</servlet-name>
<servlet-class>org.japano.Servlet</servlet-class>
<init-param>
<param-name>sessionClass</param-name>
<param-value>org.japanosample.SampleSession</param-value>
</init-param>
<init-param>
<param-name>welcomeView</param-name>
<param-value>/index.jsp</param-value>
</init-param>
<!-- more init parameter here -->
</servlet>
<!--
The japano servlet must be mapped to *.jsp and the root context.
-->
<servlet-mapping>
<servlet-name>japano</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>japano</servlet-name>
<url-pattern>*.jsp</url-pattern>
</servlet-mapping>
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:- sessionClass
-
Session type to create. Must be a subclass of
org.japano.Session
default: org.japano.Session - requestClass
-
Request type to use. Must be a subclass of
org.japano.Request
default: org.japano.Request - tryCookie
-
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 - sessionIdPath
-
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 - compilePages
-
If set to "true" compile JSP pages on the fly.
default: true - crunchPages
-
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 - lockSessions
-
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 - actionTimeout
-
Amount of seconds an action waits before timing out.
default: 30 - directJSPAllowed
-
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 - welcomeAction
-
Qualified name of an action performed when accessing directories.
Either welcomeAction or welcomeView must be set.
default: - - welcomeView
-
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: -
