Dear All,
I am writing a Struts 1.3.8 web application. I'm using tiles, and in
one of the JSPs participating a tiles definition I placed an <applet>
tag. The tiles processor throws a path-not-found-exception, but the
page is displayed correctly and the applet works flawlessly. This is
the error message I get in my console:
15:22:11,421 INFO InvalidPathExceptionServlet:103 - Requested path
was not found: /RU2/error/404
15:22:11,421 INFO InvalidPathExceptionServlet:104 - Requesting user:
N/A
15:22:11,421 INFO TilesPreProcessor:216 - Tiles process complete;
forward to /WEB-INF/common/tiles/template.jsp
(/RU2 is my context and /error/404 is a path configured in web.xml to
handle HTTP 404 codes; so the exception is handled, but I don't even
want to see any exception!). Here are the relevant pieces of the
code. I would greatly appreciate an advice on how to get rid of this
exception. Maybe it's related to my exception handling. I don't know.
Thanks so much in advance,
Oren Livne
- tiles definition: (extends a common definition whose pages don't
seem to have any problems)
<definition name=".demoEE" extends=".parserBaseDef">
<put name="title" value="parser.demo.title" />
<put name="content"
value="/WEB-INF/parser/jsp/demoEE.jsp" />
</definition>
- demoEE.jsp: (when I remove the applet tags in the code below, the
exception is gone)
<%--
###################################################################################
demoEE.jsp
Nava L. Livne <i><[EMAIL PROTECTED]></i>
Academic Outreach and Continuing Education (AOCE)
1901 East South Campus Dr., Room 2197-E
University of Utah, Salt Lake City, UT 84112
Oren E. Livne <i><[EMAIL PROTECTED]></i>
Academic Outreach and Continuing Education (AOCE)
1901 East South Campus Dr., Room 2197-D
Protected by U.S. Provisional Patent U-4003, February 2006
Mathematical expression parser demo page with the WebEQ equation
editor applet that
generates inputs for the parser.
###################################################################################
--%>
<%@ page language="java"%>
<%@ page import="net.ruready.struts.common.imports.WebAppNames" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://ruready.net/catalog" prefix="catalog"%>
<%--============================ Useful definitions
==============================--%>
<c:set
var="WEBAPPNAMES_REQUEST_ATTRIBUTE_OLS_PARSER_DEMO_ARITHMETIC_MODES">
<%="" +
WebAppNames.REQUEST.ATTRIBUTE.OLS_PARSER_DEMO_ARITHMETIC_MODES%>
</c:set>
<c:set var="WEBAPPNAMES_REQUEST_ATTRIBUTE_TOKEN_PARSER_DEMO_RESULT">
<%="" + WebAppNames.REQUEST.ATTRIBUTE.TOKEN.PARSER_DEMO_RESULT%>
</c:set>
<%--============================ JSP body begins here
============================--%>
<%--
==================================================================
Page title and demo instructions
==================================================================
--%>
<%-- <center><h1><bean:message key="parser.demo.title"
/></h1></center> --%>
<bean:message key="parser.demo.instructions"/>
<p/>
<%--
==================================================================
Top table: submit form + options control
==================================================================
--%>
<html:form action="/demoEE">
<%-- Notify the action that the input is in EE format (default value:
false) --%>
<html:hidden property="formatEE" value="true" />
<%-- Display validation errors unless this is a fresh form --%>
<logic:equal name="demoForm" property="empty" value="false">
<span class="error" />
<html:errors/>
</span>
</logic:equal>
<p/>
<table width="100%" border="0">
<%--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Form data fields
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--%>
<tr>
<%-- Reference string label --%>
<th align="left" class="section" width="25%">
<bean:message key="parser.demo.form.referenceString.label" />
</th>
<%-- Reference string text area --%>
<td align="left" width="40%">
<html:hidden property="referenceString" />
<%-- WebEQ EE applet --%>
<applet codebase="/RU2/lib"
archive="WebEQApplet.jar" code="webeq3.editor.InputControl"
width="700" height="150" name="referenceEE">
<param name="useslibrary" value="WebEQApplet">
<param name="useslibrarycodebase" value="WebEQApplet.cab">
<param name="useslibraryversion" value="3,7,0,0">
<param name="toolbar" value="<tb><incl
name='#standard'/></tb>" />
<param name="eq" value="<bean:write name='demoForm'
property='referenceString' />">
</applet>
</td>
<%--
Vertical space
--%>
<td rowspan="2" valign="top" width="5%">
</td>
<%--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Parser Control Options
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--%>
<td rowspan="2" valign="top" width="30%">
<table width="100%" border="0">
<%-- Title --%>
<tr>
<td colspan="2" align="center" class="options">
<bean:message key="parser.demo.options.title" />
</td>
</tr>
<%-- Implicit multiplication --%>
<tr>
<td align="left" valign="center" class="regtext">
<bean:message
key="parser.demo.options.implicitMultiplication.label" />
</td>
<td align="left">
<html:checkbox name="demoForm"
property="implicitMultiplication" />
</td>
</tr>
<%-- #digits --%>
<tr>
<td align="left" valign="center" class="regtext">
<bean:message
key="parser.demo.options.digits.label" />
</td>
<td align="left">
<html:text name="demoForm" property="digits"
size="1" />
</td>
</tr>
<%-- Arithmetic mode drop-down menu --%>
<tr>
<td align="left" valign="center" class="regtext">
<bean:message
key="parser.demo.options.arithmeticMode.label" />
</td>
<td align="left">
<html:select name="demoForm"
property="arithmeticModeStr">
<html:optionsCollection
name="${WEBAPPNAMES_REQUEST_ATTRIBUTE_OLS_PARSER_DEMO_ARITHMETIC_MODES}"
/>
</html:select> </td>
</tr>
</table>
</td>
</tr>
<tr>
<%-- Response string label --%>
<th align="left" class="section">
<bean:message key="parser.demo.form.responseString.label" />
</th>
<%-- Response string text area --%>
<td align="left">
<html:textarea property="responseString"
rows="2" styleClass="bigtextarea"
><bean:write name="demoForm" property="responseString"
/></html:textarea>
</td>
</tr>
<%--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Submit buttons
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--%>
<tr>
<td colspan="4"><%-- Analyze button --%>
<input type="hidden" name="method">
<%--property="method"--%>
<c:set var="submit_analyze">
<bean:message key="parser.demo.submit.analyze" />
</c:set>
<html:submit styleClass="buttondone"
onclick="document.demoForm.referenceString.value =
document.referenceEE.getPackedContentMathML();
document.demoForm.method.value = '${submit_analyze}';
document.demoForm.submit(); return false;">
<bean:message key="parser.demo.submit.analyze" />
</html:submit>
<%-- Form reset button --%> <html:reset
styleClass="buttoncancel">
<bean:message key="parser.demo.submit.reset" />
</html:reset>
</td>
</tr>
</table>
</html:form>
<%--
======================================================================
Results section
======================================================================
--%>
<logic:present scope="request"
name="${WEBAPPNAMES_REQUEST_ATTRIBUTE_TOKEN_PARSER_DEMO_RESULT}">
<jsp:include page="demoResult.jsp" flush="true" />
</logic:present>
- struts config for this module: (doesn't seem to be relevant but for
completeness)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration
1.3//EN"
"http://struts.apache.org/dtds/struts-config_1_3.dtd">
<!--
###################################################################################
Parser component:
Struts configuration descriptor
Nava L. Livne <i><[EMAIL PROTECTED]></i>
Academic Outreach and Continuing Education (AOCE)
1901 East South Campus Dr., Room 2197-E
University of Utah, Salt Lake City, UT 84112
Oren E. Livne <i><[EMAIL PROTECTED]></i>
Academic Outreach and Continuing Education (AOCE)
1901 East South Campus Dr., Room 2197-D
Protected by U.S. Provisional Patent U-4003, February 2006
###################################################################################
NOTE:
Define the SSL constraints around any given action by placing
either 'open' or 'secure' into the uri. See other notes in this
file and
web.xml for details on total uri path formulation to define SSL
configs and
user ATZ constraints.
@todo Greg, create a one-pager describing these, place in javadocs.
-->
<struts-config>
<!-- <data-sources /> -->
<!--
===============================================
Form Beans
===============================================
-->
<form-beans>
<!-- Contains a single item's properties -->
<form-bean name="demoForm"
type="net.ruready.struts.parser.form.DemoForm" />
</form-beans>
<!--
===============================================
Exception Handlers
===============================================
-->
<global-exceptions>
<!-- A generic exception that was not caught elsewhere -->
<!--
<exception key="error.Exception" scope="request"
handler="net.ruready.struts.common.exception.MailExceptionHandler"
type="java.lang.Exception" path="/system.do">
<set-property key="module" value="/error" />
</exception>
-->
<!-- A business-logic exception that was not caught elsewhere -->
<exception key="error.ApplicationException" scope="request"
handler="net.ruready.struts.common.exception.MailExceptionHandler"
type="net.ruready.common.ApplicationException"
path="/system.do">
<set-property key="module" value="/error" />
</exception>
<!-- Path not found -->
<exception key="error.InvalidPathException" scope="request"
handler="net.ruready.struts.common.exception.InvalidPathExceptionHandler"
type="org.apache.struts.chain.commands.InvalidPathException"
path="/pathNotFound.do">
<set-property key="module" value="/error" />
</exception>
</global-exceptions>
<!--
===============================================
Global forwards (alias for main page, etc.).
Needs to be placed in every module's Struts
config unless we use XDoclet to merge
a global global-forwards.xml file.
===============================================
-->
<global-forwards>
<!-- Parser home page -->
<forward name="parserHome" module="/parser" path="/demo.do"
redirect="true" />
<!-- Application home page -->
<forward name="appHome" module="" path="/home.do"
redirect="true" />
</global-forwards>
<!--
===============================================
Actions
===============================================
-->
<action-mappings>
<!--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Module switching for JSP link access
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->
<!-- Uncomment the following if you need to use <html:link> to
a JSP. See the Struts
Reference Manual, Second Edition, James Holmes, page 127. -->
<!--
<action path="/switchMod"
type="org.apache.struts.actions.SwitchAction" />
-->
<!--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Convenient aliases (e.g. tiles defs <-> global forwards)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->
<!-- Parser home page -->
<!-- <action path="/home" forward="/demo.do" /> -->
<!--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Setup and forward to math parser demo
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->
<!-- Item children editing actions (default page + validation)
-->
<action attribute="demoForm" input=".demo"
name="demoForm" parameter="method"
path="/demo" scope="request"
type="net.ruready.struts.parser.action.DemoAction">
<exception key="error.MathParserException"
handler="net.ruready.struts.parser.exception.MathParserExceptionHandler"
type="net.ruready.parser.exception.MathParserException"
path=".demo" />
<forward name="demo.view" path=".demo" />
</action>
<!--
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Setup and forward to math parser demo
with an equation editor
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-->
<!-- Item children editing actions (default page + validation)
-->
<action attribute="demoForm" input=".demoEE"
name="demoForm" parameter="method"
path="/demoEE" scope="request"
type="net.ruready.struts.parser.action.DemoAction">
<exception key="error.MathParserException"
handler="net.ruready.struts.parser.exception.MathParserExceptionHandler"
type="net.ruready.parser.exception.MathParserException"
path=".demoEE" />
<forward name="demo.view" path=".demoEE" />
</action>
</action-mappings>
<!--
===============================================
Resource bundles
===============================================
-->
<message-resources parameter="ApplicationResources" null="false" />
<!--
===============================================
Plug-ins
===============================================
-->
<!-- The validator plug-in -->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames"
value="/WEB-INF/common/validator-rules.xml,/WEB-INF/parser/validation-parser.xml"
/>
</plug-in>
<!-- Tiles plug-in -->
<plug-in className="org.apache.struts.tiles.TilesPlugin">
<set-property property="definitions-config"
value="/WEB-INF/parser/tiles-parser.xml" />
<set-property property="moduleAware" value="true" />
</plug-in>
</struts-config>
- web.xml: (notice the 404 handling section)
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<!--
###################################################################################
RUReady Application:
Web application deployment descriptor
Nava L. Livne <i><[EMAIL PROTECTED]></i>
Academic Outreach and Continuing Education (AOCE)
1901 East South Campus Dr., Room 2197-E
University of Utah, Salt Lake City, UT 84112
Oren E. Livne <i><[EMAIL PROTECTED]></i>
Academic Outreach and Continuing Education (AOCE)
1901 East South Campus Dr., Room 2197-D
Protected by U.S. Provisional Patent U-4003, February 2006
###################################################################################
-->
<!--
========================================================
General web app configuration
========================================================
-->
<description>RUReady College Readiness Program</description>
<display-name>RU2</display-name>
<!-- Some people say this MIME mapping is important... -->
<mime-mapping>
<extension>css</extension>
<mime-type>text/css</mime-type>
</mime-mapping>
<!--
Session timeout (minutes). Keep it short enough to remove load
from the server,
but long enough for students that take a long time to think
during their tests.
For testing, set it to 1 to observe upon-session-destroy actions.
-->
<session-config>
<session-timeout>30</session-timeout>
</session-config>
<!--
A Welcome File List. Files will be attempted to be located in
their
order of appearance.
Note that home.jsp contains a url redirect over to home.do.
Convention for entrance to any component in RU2:
/WEB-INF/[component-name]/jsp/home.jsp
- OR -
/[component-name]/home.do
-->
<welcome-file-list>
<welcome-file>/WEB-INF/common/jsp/home.jsp</welcome-file>
</welcome-file-list>
<!--
Default error page for all exceptions not caught by other things
This is the top level exception handler. Note that modules may
also define error-pages. If they don't handle
the exception, we end up here. -->
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/error/system.do</location>
</error-page>
<error-page>
<error-code>401</error-code>
<location>/error/accessDenied.do</location>
</error-page>
<error-page>
<error-code>404</error-code>
<location>/error/404</location>
</error-page>
<error-page>
<error-code>500</error-code>
<location>/error/system.do</location>
</error-page>
<!--
========================================================
AJAX APT Framework configuration
========================================================
-->
<!--
EXPERIMENTAL: This parameter is needed to initialize APT.
It points to the
-->
<!-- context-relative confiruation file. -->
<context-param>
<param-name>AjaxPartsTaglibConfig</param-name>
<param-value>/WEB-INF/common/ajax_config.xml</param-value>
</context-param>
<!--
========================================================
Container-Managed Security Filters
========================================================
-->
<!-- By convention, secure action URLs should be
/OurContext/StrutsModule/secure/ActionName -->
<!-- There are some problems with this configuration, so it is not
used for now:
* Note: redirecting back to http for subsequent insecure actions.
* Authentication filter behaves in an unwanted way. -->
<!--
<security-constraint>
<web-resource-collection>
<web-resource-name>SecurePages</web-resource-name>
<description>Secure pages that require SSL</description>
<url-pattern>/user/secure/*</url-pattern>
</web-resource-collection>
<user-data-constraint>
<transport-guarantee>
CONFIDENTIAL
</transport-guarantee>
</user-data-constraint>
</security-constraint>
-->
<!--
========================================================
Struts Action Servlet Configuration
========================================================
-->
<servlet>
<!-- ActionServlet class -->
<servlet-name>action</servlet-name>
<servlet-class>
org.apache.struts.action.ActionServlet
</servlet-class>
<!-- Configure Struts modules right below this line -->
<!--
Default module
See section 5.3.2 "Informing the Controller", at
http://struts.apache.org/1.x/userGuide/configuration.html for details.
application home page and other front pages)
-->
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/common/struts-common.xml</param-value>
</init-param>
<!-- Content management system: catalog sub-component module -->
<init-param>
<param-name>config/catalog</param-name>
<param-value>
/WEB-INF/catalog/struts-catalog.xml
</param-value>
</init-param>
<!-- Question editing module -->
<init-param>
<param-name>config/question</param-name>
<param-value>
/WEB-INF/question/struts-question.xml
</param-value>
</init-param>
<!-- Error and exception handling module -->
<init-param>
<param-name>config/error</param-name>
<param-value>/WEB-INF/error/struts-error.xml</param-value>
</init-param>
<!-- User management module -->
<init-param>
<param-name>config/user</param-name>
<param-value>/WEB-INF/user/struts-user.xml</param-value>
</init-param>
<!-- Parser (demo and other functions) module -->
<init-param>
<param-name>config/parser</param-name>
<param-value>
/WEB-INF/parser/struts-parser.xml
</param-value>
</init-param>
<!-- Necessary for using tiles with Struts 1.3+ -->
<init-param>
<param-name>chainConfig</param-name>
<param-value>
org/apache/struts/tiles/chain-config.xml
</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<!--
Action URL pattern (a prefix in this case)
-->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!--
========================================================
Quartz scheduling library servlet
========================================================
-->
<servlet>
<display-name>Quartz Initializer Servlet</display-name>
<servlet-name>QuartzInitializer</servlet-name>
<servlet-class>
org.quartz.ee.servlet.QuartzInitializerServlet
</servlet-class>
<init-param>
<param-name>shutdown-on-unload</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>start-scheduler-on-load</param-name>
<param-value>false</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!--
========================================================
Servlets for filtering exceptions not caught by Struts
========================================================
-->
<servlet>
<servlet-name>invalidPathExceptionServlet</servlet-name>
<servlet-class>
net.ruready.struts.common.filter.InvalidPathExceptionServlet
</servlet-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/pathNotFound.do</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>invalidPathExceptionServlet</servlet-name>
<url-pattern>/error/404</url-pattern>
</servlet-mapping>
<!--
========================================================
Application-context listeners
========================================================
-->
<!-- Functions run on init and clean-up of the site -->
<listener>
<listener-class>
net.ruready.struts.common.filter.InitListener
</listener-class>
</listener>
<!-- Updating user status upon login/logout -->
<listener>
<listener-class>
net.ruready.struts.user.filter.UserSessionListener
</listener-class>
</listener>
<!--
========================================================
Servlet filters definitions
========================================================
-->
<!--
@@@@@@@@@@@@@@@@@@@@@@@@
Common component
@@@@@@@@@@@@@@@@@@@@@@@@
-->
<!--
@@@@@@@@@@@@@@@@@@@@@@@@
Catalog component
@@@@@@@@@@@@@@@@@@@@@@@@
-->
<!-- Looks for an item ID request parameter and attaches item
object -->
<filter>
<filter-name>findItemFilter</filter-name>
<filter-class>
net.ruready.struts.catalog.filter.FindItemFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/findItemFilter.do</param-value>
</init-param>
</filter>
<filter>
<filter-name>addChildFilter</filter-name>
<filter-class>
net.ruready.struts.catalog.filter.AddChildFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/addChildFilter.do</param-value>
</init-param>
</filter>
<filter>
<filter-name>transferItemFilter</filter-name>
<filter-class>
net.ruready.struts.catalog.filter.TransferItemFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/transferItemFilter.do</param-value>
</init-param>
</filter>
<!-- Ensure correct custom item type editing page access -->
<filter>
<filter-name>editItemCustomTypeFilter</filter-name>
<filter-class>
net.ruready.struts.catalog.filter.CustomTypeFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/customTypeItemFilter.do</param-value>
</init-param>
<init-param>
<param-name>prefix</param-name>
<param-value>WEB-INF/catalog/jsp</param-value>
</init-param>
<init-param>
<param-name>postfix</param-name>
<param-value>editItem.jsp</param-value>
</init-param>
</filter>
<!-- Prepares neccessary data for an item view -->
<filter>
<filter-name>prepareViewItemFilter</filter-name>
<filter-class>
net.ruready.struts.catalog.filter.PrepareViewItemFilter
</filter-class>
</filter>
<!--
@@@@@@@@@@@@@@@@@@@@@@@@
User component
@@@@@@@@@@@@@@@@@@@@@@@@
-->
<!-- Increments hit counter -->
<filter>
<filter-name>hitCounterFilter</filter-name>
<filter-class>
net.ruready.struts.user.filter.HitCounterFilter
</filter-class>
<init-param>
<param-name>saveHits</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<!-- Authenticate a demo user. Actually, it always succeeds. other
authentications
may fail and forward to the referenced access denied error
page. The "onError"
param is a facade. -->
<filter>
<filter-name>authenticateDemoUserFilter</filter-name>
<filter-class>
net.ruready.struts.user.filter.AuthenticateDemoUserFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/accessDenied.do</param-value>
</init-param>
</filter>
<!-- Authorization filters (user+role-based) -->
<filter>
<filter-name>authorizationFilterAll</filter-name>
<filter-class>
net.ruready.struts.user.filter.AuthorizationFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/accessDenied.do</param-value>
</init-param>
<init-param>
<param-name>authenticationUrl</param-name>
<param-value>/user/open/FRONT/home.do</param-value>
</init-param>
<init-param>
<param-name>roles</param-name>
<param-value>STUDENT,TEACHER,ADMIN,SYSTEM</param-value>
</init-param>
</filter>
<filter>
<filter-name>authorizationFilterStudent</filter-name>
<filter-class>
net.ruready.struts.user.filter.AuthorizationFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/accessDenied.do</param-value>
</init-param>
<init-param>
<param-name>authenticationUrl</param-name>
<param-value>/user/open/FRONT/home.do</param-value>
</init-param>
<init-param>
<param-name>roles</param-name>
<param-value>STUDENT</param-value>
</init-param>
</filter>
<filter>
<filter-name>authorizationFilterTeacher</filter-name>
<filter-class>
net.ruready.struts.user.filter.AuthorizationFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/accessDenied.do</param-value>
</init-param>
<init-param>
<param-name>authenticationUrl</param-name>
<param-value>/user/open/FRONT/home.do</param-value>
</init-param>
<init-param>
<param-name>roles</param-name>
<param-value>TEACHER</param-value>
</init-param>
</filter>
<filter>
<filter-name>authorizationFilterAdmin</filter-name>
<filter-class>
net.ruready.struts.user.filter.AuthorizationFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/accessDenied.do</param-value>
</init-param>
<init-param>
<param-name>authenticationUrl</param-name>
<param-value>/user/open/FRONT/home.do</param-value>
</init-param>
<init-param>
<param-name>roles</param-name>
<param-value>ADMIN</param-value>
</init-param>
</filter>
<filter>
<filter-name>authorizationFilterSystem</filter-name>
<filter-class>
net.ruready.struts.user.filter.AuthorizationFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/accessDenied.do</param-value>
</init-param>
<init-param>
<param-name>authenticationUrl</param-name>
<param-value>/user/open/FRONT/home.do</param-value>
</init-param>
<init-param>
<param-name>roles</param-name>
<param-value>SYSTEM</param-value>
</init-param>
</filter>
<!-- Adds drop-down menu data for user editing forms -->
<filter>
<filter-name>addUserMenusFilter</filter-name>
<filter-class>
net.ruready.struts.user.filter.AddUserMenusFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/addUserMenusFilter.do</param-value>
</init-param>
</filter>
<!-- Adds drop-down menu data for user search -->
<filter>
<filter-name>searchUserSetupFilter</filter-name>
<filter-class>
net.ruready.struts.user.filter.SearchUserSetupFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/searchUserSetupFilter.do</param-value>
</init-param>
</filter>
<!--
@@@@@@@@@@@@@@@@@@@@@@@@
Parser component
@@@@@@@@@@@@@@@@@@@@@@@@
-->
<!-- Adds drop-down menu data for parser demo pages and actions -->
<filter>
<filter-name>addParserDemoMenusFilter</filter-name>
<filter-class>
net.ruready.struts.parser.filter.AddParserDemoMenusFilter
</filter-class>
<init-param>
<param-name>onError</param-name>
<param-value>/error/addParserDemoMenusFilter.do</param-value>
</init-param>
</filter>
<!--
========================================================
Servlet filters - URL mappings
========================================================
-->
<!--
Important note: Filters are applied to patterns in their order
of apperance below.
Each component contains a disjoint set of URLs, so we are free
to order components
as we like; however, the order of filters within a component
does matter. Filters
are sorted by groups of common functionality (e.g.
authentication).
-->
<!--
@@@@@@@@@@@@@@@@@@@@@@@@
Common component
@@@@@@@@@@@@@@@@@@@@@@@@
-->
<!--
@@@@@@@@@@@@@@@@@@@@@@@@
User component
@@@@@@@@@@@@@@@@@@@@@@@@
-->
<!-- ########################### Authorization & Authentication
######## -->
<!-- %%%%%%%% Front pages, don't require a user %%%%%%%%% -->
<!-- %%%%%%%% Pages accessible by to ALL users %%%%%%%%%% -->
<!--
RU2 uri conventions help define SSL config, page authorization,
module definitions.
For actions:
/RU2/[module-name]/[security-constraint]/[role]/[action].do
For views:
/WEB-INF/[module-name]/jsp/[security-constraint]/[role]/[pagename].jsp
////////////////////////////////////////////\////////////////////////////////////////
module-name:
current modules: catalog, common, user, error, question
security-constraint:
current modes: open, secure
role:
roles are disjoint, not inclusive.
current roles: TEACHER, STUDENT, ADMIN, ALL, FRONT (front is
the same as no ATZ required)
-->
<filter-mapping>
<filter-name>authorizationFilterAll</filter-name>
<url-pattern>/user/open/ALL/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>authorizationFilterAll</filter-name>
<url-pattern>/user/secure/ALL/*</url-pattern>
</filter-mapping>
<!-- %%%%%%%% Pages accessible by to STUDENT users %%%%%%%%%% -->
<filter-mapping>
<filter-name>authorizationFilterStudent</filter-name>
<url-pattern>/user/open/STUDENT/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>authorizationFilterStudent</filter-name>
<url-pattern>/user/secure/STUDENT/*</url-pattern>
</filter-mapping>
<!-- %%%%%%%% Pages accessible by to TEACHER users %%%%%%%%%% -->
<filter-mapping>
<filter-name>authorizationFilterTeacher</filter-name>
<url-pattern>/user/open/TEACHER/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>authorizationFilterTeacher</filter-name>
<url-pattern>/user/secure/TEACHER/*</url-pattern>
</filter-mapping>
<!-- %%%%%%%% Pages accessible by to ADMIN users %%%%%%%%%% -->
<filter-mapping>
<filter-name>authorizationFilterAdmin</filter-name>
<url-pattern>/user/open/ADMIN/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>authorizationFilterAdmin</filter-name>
<url-pattern>/user/secure/ADMIN/*</url-pattern>
</filter-mapping>
<!-- %%%%%%%% Pages accessible by to SYSTEM users %%%%%%%%%% -->
<!-- Such users cannot log in or have access only to demo pages.
For now,
allow no access to internal pages. -->
<!-- ########################### Gathering statistics
################## -->
<!-- Hit counter filter applies to front page only -->
<filter-mapping>
<filter-name>hitCounterFilter</filter-name>
<url-pattern>/user/open/FRONT/home.do</url-pattern>
</filter-mapping>
<!-- Add user properties' drop-down menus filter to user editing
pages -->
<!-- The view and edit URLs are separated here because only one of
them
is secure and requires SSL. -->
<filter-mapping>
<filter-name>addUserMenusFilter</filter-name>
<url-pattern>/user/secure/FRONT/createUser.do</url-pattern>
</filter-mapping>
<!-- %%%%%%%% Pages accessible by to STUDENT users %%%%%%%%%% -->
<!-- Add user properties' drop-down menus filter to user editing
pages -->
<filter-mapping>
<filter-name>addUserMenusFilter</filter-name>
<url-pattern>/user/secure/STUDENT/updateUser.do</url-pattern>
</filter-mapping>
<!-- %%%%%%%% Pages accessible by to TEACHER users %%%%%%%%%% -->
<!-- %%%%%%%% Pages accessible by to ADMIN users %%%%%%%%%% -->
<!-- Set up user search page -->
<filter-mapping>
<filter-name>searchUserSetupFilter</filter-name>
<url-pattern>/user/open/ADMIN/searchUser.do</url-pattern>
</filter-mapping>
<!--
@@@@@@@@@@@@@@@@@@@@@@@@
Question component
@@@@@@@@@@@@@@@@@@@@@@@@
-->
<!-- Apply to the entire question component -->
<filter-mapping>
<filter-name>authorizationFilterAdmin</filter-name>
<url-pattern>/question/open/ADMIN/*</url-pattern>
</filter-mapping>
<!-- Apply to the entire question component -->
<filter-mapping>
<filter-name>authorizationFilterAdmin</filter-name>
<url-pattern>/question/secure/ADMIN/*</url-pattern>
</filter-mapping>
<!--
@@@@@@@@@@@@@@@@@@@@@@@@
Catalog component
@@@@@@@@@@@@@@@@@@@@@@@@
-->
<!-- ########################### Authorization & Authentication
######## -->
<!-- Apply demo user authentication to all catalog pages so that a
demo user
can play around with the catalog. WARNING: use in testing
only. -->
<!--
<filter-mapping>
<filter-name>authenticateDemoUserFilter</filter-name>
<url-pattern>/catalog/*</url-pattern>
</filter-mapping>
-->
<!-- Apply to the entire catalog component -->
<filter-mapping>
<filter-name>authorizationFilterAdmin</filter-name>
<url-pattern>/catalog/*</url-pattern>
</filter-mapping>
<!-- Apply single item filter to all item views and edit pages -->
<filter-mapping>
<filter-name>findItemFilter</filter-name>
<url-pattern>/catalog/viewItem.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>findItemFilter</filter-name>
<url-pattern>/catalog/editItemFull/*</url-pattern>
</filter-mapping>
<!-- Apply view item data preparation filter all item views and
edit pages -->
<!-- Depracated, because this spells working outside the Struts
framework, which
is a bad habit. -->
<!--
<filter-mapping>
<filter-name>prepareViewItemFilter</filter-name>
<url-pattern>/catalog/viewItem.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>prepareViewItemFilter</filter-name>
<url-pattern>/catalog/editItemFull/*</url-pattern>
</filter-mapping>
-->
<!-- Item edit pages allow custom pages for some type ==> custom
item filter should be applied -->
<filter-mapping>
<filter-name>editItemCustomTypeFilter</filter-name>
<url-pattern>/catalog/editItemFull/*</url-pattern>
</filter-mapping>
<!-- Apply child addition filter to item edit pages -->
<filter-mapping>
<filter-name>addChildFilter</filter-name>
<url-pattern>/catalog/editItemFull/*</url-pattern>
</filter-mapping>
<!-- Item revision history requires an item -->
<filter-mapping>
<filter-name>findItemFilter</filter-name>
<url-pattern>/catalog/viewRevisions.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>transferItemFilter</filter-name>
<url-pattern>/catalog/transferItem.do</url-pattern>
</filter-mapping>
<!-- Apply child addition filter to item edit pages -->
<filter-mapping>
<filter-name>addChildFilter</filter-name>
<url-pattern>/catalog/editItemFull/*</url-pattern>
</filter-mapping>
<!--
@@@@@@@@@@@@@@@@@@@@@@@@
Parser component
@@@@@@@@@@@@@@@@@@@@@@@@
@todo: adhere to secure/open URL standards in the parser
component.
For now, everything is open and no authentication filters are
applied.
-->
<!-- Add parser demo drop-down menus filter to parser demo pages -->
<filter-mapping>
<filter-name>addParserDemoMenusFilter</filter-name>
<url-pattern>/parser/demo.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>addParserDemoMenusFilter</filter-name>
<url-pattern>/parser/demoEE.do</url-pattern>
</filter-mapping>
<!--
========================================================
Tag Library Descriptors
========================================================
-->
<jsp-config>
<!-- Utility Tag Library Descriptors -->
<taglib>
<taglib-uri>http://ruready.net/common</taglib-uri>
<taglib-location>/WEB-INF/tld/common.tld</taglib-location>
</taglib>
<!-- Catalog-Component-Related-Tag Library Descriptors -->
<taglib>
<taglib-uri>http://ruready.net/catalog</taglib-uri>
<taglib-location>/WEB-INF/tld/catalog.tld</taglib-location>
</taglib>
<!-- User-Component-Related-Tag Library Descriptors -->
<taglib>
<taglib-uri>http://ruready.net/user</taglib-uri>
<taglib-location>/WEB-INF/tld/user.tld</taglib-location>
</taglib>
<!-- Utility tags -->
<taglib>
<taglib-uri>http://ruready.net/util</taglib-uri>
<taglib-location>/WEB-INF/tld/util.tld</taglib-location>
</taglib>
<!-- 3rd party data grid widgets and other assorted controls -->
<taglib>
<taglib-uri>http://displaytag.sf.net</taglib-uri>
<taglib-location>/WEB-INF/tld/displaytag.tld</taglib-location>
</taglib>
</jsp-config>
</web-app>
--
======================================================================
Oren Livne, Ph.D.
Research Assistant Professor of Mathematics
RUReady Software Architect
Academic Outreach and Continuing Education
1901 East South Campus Dr., Room 2197-D
University of Utah, Salt Lake City, UT 84112-9399
Tel : (801) 581-6831 Cell: (801) 631-3885 Fax: (801) 585-5414
Email: [EMAIL PROTECTED] Web: http://ruready.net/oren
======================================================================
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]