Big refactor of ControlServlet, RequestManager, RequestHandler, and ConfigXMLReader so that simple objects are used instead of Maps within Maps within Maps for the data from the controller.xml file, which results in eliminating hundreds of lines of code including the entire RequestHandler class. I have tested this a lot with different apps that use the ControlServlet differently, but this is a very big change so there could still be issues. Based on this cleanup future issues and new features should be easier and less error prone, and that is why doing it now in order to help with a number of other improvements and bug fixes that are part of this commit. Also added redirect-parameter element to go under the request-map -> response element which allows you to specify which parameters will be passed on in a redirect instead of using all of them. Also improved default there and in various places to only include parameters from the URL to avoid issues with form data, but if the ID to display (like following a crAlso added redirect-parameter element to go under the request-map -> response element which allows you to specify which parameters will be passed on in a redirect instead of using all of them. Also improved default there and in various places to only include parameters from the URL to avoid issues with form data, but if the ID to display (like following a crAlso added redirect-parameter element to go under the request-map -> response element which allows you to specify which parameters will be passed on in a redirect instead of using all of them. Also improved default there and in various places to only include parameters from the URL to avoid issues wd in and also going to the same page after login from auth=true or from clicking on the login link. Related to cleaning up login URLs also changed how the request and parameters passed to a request before a login are saved and used after a login is successful so that it URL parameters go on the URL in a redirect to the original request to make it more transparent, and non-URL parameters just stay in the session and are used when the original request is run again to avoid putting sensitive information like passwords and big information like textarea data in the URL, which has been a problem before. To see what some of these things combined can do try going to the example app, login, click on the New Example link, then logout in another tab or window, then go back to the New Example page and enter a name and a whole bunch of text in the long description then click Create, the system will show you the login page so enter username/password, and then after login you'll see a nice URL to EditExample with the correct exampleId parameter and all of the data entered before login successfully saved and never appearing in a URL. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@741374 13f79535-47bb-0310-9956-ffa450edef68
232 lines
14 KiB
XML
232 lines
14 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
-->
|
|
|
|
<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
|
|
<!-- The controller elements that are common to all OFBiz components
|
|
can be found in the following xml file. A component can override the
|
|
elements found in the common-controller.xml file. -->
|
|
<include location="component://common/webcommon/WEB-INF/common-controller.xml"/>
|
|
<include location="component://common/webcommon/WEB-INF/portal-controller.xml"/>
|
|
|
|
<description>Example Component Site Configuration File</description>
|
|
<owner>Copyright 2001-2008 The Apache Software Foundation</owner>
|
|
|
|
<!--
|
|
These can be used to return the reports as views; make sure the classes are compiled and available
|
|
<handler name="datavision" type="view" class="org.ofbiz.webapp.view.DataVisionViewHandler"/>
|
|
<handler name="jasperreportspdf" type="view" class="org.ofbiz.webapp.view.JasperReportsPdfViewHandler"/>
|
|
<handler name="jasperreportsxml" type="view" class="org.ofbiz.webapp.view.JasperReportsXmlViewHandler"/>
|
|
-->
|
|
|
|
<!-- Events to run on every request before security (chains exempt) -->
|
|
<!--
|
|
<preprocessor>
|
|
</preprocessor>
|
|
-->
|
|
<!-- Events to run on every request after all other processing (chains exempt) -->
|
|
<!--
|
|
<postprocessor>
|
|
<event type="java" path="org.ofbiz.webapp.event.TestEvent" invoke="test"/>
|
|
</postprocessor>
|
|
-->
|
|
|
|
<!-- Request Mappings -->
|
|
<request-map uri="main"><security https="true" auth="true"/><response name="success" type="view" value="main"/></request-map>
|
|
<request-map uri="authview"><security https="true" auth="true"/><response name="success" type="view" value="main"/></request-map>
|
|
|
|
<!-- Example Requests -->
|
|
<request-map uri="FindExample"><security https="true" auth="true"/><response name="success" type="view" value="FindExample"/></request-map>
|
|
<request-map uri="EditExample"><security https="true" auth="true"/><response name="success" type="view" value="EditExample"/></request-map>
|
|
<request-map uri="ExampleReportHtml"><security https="true" auth="true"/><response name="success" type="view" value="ExampleReportHtml"/></request-map>
|
|
<request-map uri="ExampleReportPdf"><security https="true" auth="true"/><response name="success" type="view" value="ExampleReportPdf"/></request-map>
|
|
<request-map uri="createExample">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="createExample"/>
|
|
<response name="success" type="request-redirect" value="EditExample">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExample"/>
|
|
</request-map>
|
|
<request-map uri="updateExample">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="updateExample"/>
|
|
<response name="success" type="request-redirect" value="EditExample">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExample"/>
|
|
</request-map>
|
|
<request-map uri="createExampleAjax">
|
|
<security https="true" auth="true"/>
|
|
<event type="jsonservice" invoke="createExample"/>
|
|
<response name="success" type="none"/>
|
|
<response name="error" type="none"/>
|
|
</request-map>
|
|
<request-map uri="updateExampleAjax">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="updateExample"/>
|
|
<response name="success" type="view" value="findExampleAjax"/>
|
|
<response name="error" type="view" value="findExampleAjax"/>
|
|
</request-map>
|
|
|
|
<request-map uri="EditExampleItems"><security https="true" auth="true"/><response name="success" type="view" value="EditExampleItems"/></request-map>
|
|
<request-map uri="createExampleItem">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="createExampleItem"/>
|
|
<response name="success" type="request-redirect" value="EditExampleItems">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExampleItems"/>
|
|
</request-map>
|
|
<request-map uri="updateExampleItem">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="updateExampleItem"/>
|
|
<response name="success" type="request-redirect" value="EditExampleItems">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExampleItems"/>
|
|
</request-map>
|
|
<request-map uri="deleteExampleItem">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="deleteExampleItem"/>
|
|
<response name="success" type="request-redirect" value="EditExampleItems">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExampleItems"/>
|
|
</request-map>
|
|
|
|
<request-map uri="EditExampleFeatureAppls"><security https="true" auth="true"/><response name="success" type="view" value="EditExampleFeatureAppls"/></request-map>
|
|
<request-map uri="example_createExampleFeatureAppl">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="createExampleFeatureAppl"/>
|
|
<response name="success" type="request-redirect" value="EditExampleFeatureAppls">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExampleFeatureAppls"/>
|
|
</request-map>
|
|
<request-map uri="example_updateExampleFeatureAppl">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="updateExampleFeatureAppl"/>
|
|
<response name="success" type="request-redirect" value="EditExampleFeatureAppls">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExampleFeatureAppls"/>
|
|
</request-map>
|
|
<request-map uri="example_deleteExampleFeatureAppl">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="deleteExampleFeatureAppl"/>
|
|
<response name="success" type="request-redirect" value="EditExampleFeatureAppls">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExampleFeatureAppls"/>
|
|
</request-map>
|
|
|
|
<!-- ExampleFeature Requests -->
|
|
<request-map uri="FindExampleFeature"><security https="true" auth="true"/><response name="success" type="view" value="FindExampleFeature"/></request-map>
|
|
<request-map uri="EditExampleFeature"><security https="true" auth="true"/><response name="success" type="view" value="EditExampleFeature"/></request-map>
|
|
<request-map uri="createExampleFeature">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="createExampleFeature"/>
|
|
<response name="success" type="request-redirect" value="EditExampleFeature">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExampleFeature"/>
|
|
</request-map>
|
|
<request-map uri="updateExampleFeature">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="updateExampleFeature"/>
|
|
<response name="success" type="request-redirect" value="EditExampleFeature">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExampleFeature"/>
|
|
</request-map>
|
|
|
|
<request-map uri="EditExampleFeatureExampleAppls"><security https="true" auth="true"/><response name="success" type="view" value="EditExampleFeatureExampleAppls"/></request-map>
|
|
<request-map uri="feature_createExampleFeatureAppl">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="createExampleFeatureAppl"/>
|
|
<response name="success" type="request-redirect" value="EditExampleFeatureExampleAppls">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExampleFeatureExampleAppls"/>
|
|
</request-map>
|
|
<request-map uri="feature_updateExampleFeatureAppl">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="updateExampleFeatureAppl"/>
|
|
<response name="success" type="request-redirect" value="EditExampleFeatureExampleAppls">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExampleFeatureExampleAppls"/>
|
|
</request-map>
|
|
<request-map uri="feature_deleteExampleFeatureAppl">
|
|
<security https="true" auth="true"/>
|
|
<event type="service" invoke="deleteExampleFeatureAppl"/>
|
|
<response name="success" type="request-redirect" value="EditExampleFeatureExampleAppls">
|
|
<redirect-parameter name="exampleId"/>
|
|
</response>
|
|
<response name="error" type="view" value="EditExampleFeatureExampleAppls"/>
|
|
</request-map>
|
|
<request-map uri="findExampleFeatures">
|
|
<security https="true" auth="true"/>
|
|
<event type="groovy" path="component://example/webapp/example/WEB-INF/actions/includes/" invoke="FindExampleFeatures.groovy"/>
|
|
<response name="success" type="view" value="ajaxAutocompleteOptions"/>
|
|
<response name="error" type="view" value="ajaxAutocompleteOptions"/>
|
|
</request-map>
|
|
|
|
<request-map uri="FormWidgetExamples"><security https="true" auth="true"/><response name="success" type="view" value="FormWidgetExamples"/></request-map>
|
|
|
|
<request-map uri="LookupExampleFeature"><security https="true" auth="true"/><response name="success" type="view" value="LookupExampleFeature"/></request-map>
|
|
|
|
<request-map uri="ListExampleFormOnly"><security https="true" auth="false"/><response name="success" type="view" value="ListExampleFormOnly"/></request-map>
|
|
<request-map uri="CreateExampleFormOnly"><security https="true" auth="false"/><response name="success" type="view" value="CreateExampleFormOnly"/></request-map>
|
|
<request-map uri="dashboardExample"><security https="true" auth="false"/><response name="success" type="view" value="dashboardExample"/></request-map>
|
|
|
|
<request-map uri="printExampleFOPFonts">
|
|
<security https="true" auth="true"/>
|
|
<response name="success" type="view" value="printExampleFOPFonts"/>
|
|
</request-map>
|
|
<!-- end of request mappings -->
|
|
|
|
<!-- View Mappings -->
|
|
<view-map name="main" type="screen" page="component://example/widget/example/CommonScreens.xml#main"/>
|
|
<view-map name="help" type="screen" page="component://example/widget/example/ExampleScreens.xml#help"/>
|
|
|
|
<view-map name="FindExample" type="screen" page="component://example/widget/example/ExampleScreens.xml#FindExample"/>
|
|
<view-map name="EditExample" type="screen" page="component://example/widget/example/ExampleScreens.xml#EditExample"/>
|
|
<view-map name="EditExampleItems" type="screen" page="component://example/widget/example/ExampleScreens.xml#EditExampleItems"/>
|
|
<view-map name="EditExampleFeatureAppls" type="screen" page="component://example/widget/example/ExampleScreens.xml#EditExampleFeatureAppls"/>
|
|
<view-map name="ExampleReportHtml" type="screen" page="component://example/widget/example/ExampleScreens.xml#ExampleReport"/>
|
|
<view-map name="ExampleReportPdf" type="screenfop" page="component://example/widget/example/ExampleScreens.xml#ExampleReport" content-type="application/pdf" encoding="none"/>
|
|
|
|
<view-map name="FindExampleFeature" type="screen" page="component://example/widget/example/ExampleFeatureScreens.xml#FindExampleFeature"/>
|
|
<view-map name="EditExampleFeature" type="screen" page="component://example/widget/example/ExampleFeatureScreens.xml#EditExampleFeature"/>
|
|
<view-map name="EditExampleFeatureExampleAppls" type="screen" page="component://example/widget/example/ExampleFeatureScreens.xml#EditExampleFeatureExampleAppls"/>
|
|
|
|
<view-map name="FormWidgetExamples" type="screen" page="component://example/widget/example/FormWidgetExampleScreens.xml#FormWidgetExamples"/>
|
|
|
|
<view-map name="LookupExampleFeature" type="screen" page="component://example/widget/example/ExampleFeatureScreens.xml#LookupExampleFeature"/>
|
|
<!-- ajax view mappings -->
|
|
<view-map name="findExampleAjax" type="screen" page="component://example/widget/example/ExampleAjaxScreens.xml#AjaxExample"/>
|
|
<view-map name="ListExampleFormOnly" type="screen" page="component://example/widget/example/ExampleAjaxScreens.xml#ListExampleFormOnly"/>
|
|
<view-map name="CreateExampleFormOnly" type="screen" page="component://example/widget/example/ExampleAjaxScreens.xml#CreateExampleFormOnly"/>
|
|
<view-map name="printExampleFOPFonts" type="screenfop" page="component://example/widget/example/FormWidgetExampleScreens.xml#printExampleFOPFonts" content-type="application/pdf" encoding="none"/>
|
|
<!-- end of view mappings -->
|
|
</site-conf>
|