Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The Controller Servlet is configured using the control.xml file in the WEB-INF folder. That file has three kind kinds of XML elements which are important now:

...

The uri attribute is used to match a request-map to the actual request. Kind Keep in mind that the webapp name and control have already been matched by the servlet container to dispatch processing here. Therefore in our example, the remainder of the URL to match here is just "main".

The request map for the URI main looks like this:

...

The security element might intercept the processing of the request. If auth="true" and there is no valid OFBiz user attached to the current servlet session, processing will branch into rendering a login screen to obtain a valid OFBiz user, than then return and check if the currently authenticated user has sufficient authorization for this request. (??? Is this really handled here), after that, processing will continue. If the user logged in before and there is a valid OFBiz user available in the session, processing will just continue. Should the request come in as plain HTTP and httphttps="true" is set, the controller servlet will redirect the client browser to the corresponding HTTPS URL.

...

The type of the view is screen (type="screen") and the screen definition is read from the URI "component://party/widget/partymgr/PartyScreens.xml#findparty". The component: protocol is a OFBiz internal mechanism which retrieves just the screen definition for the findparty screen from the file PartyScreens.xml. That file may contain more than one screen definition. So this mechanism primarily serves the purpose of not having to have too many small XML files, which would be the case if a single XML file could contain only one screen definition. You can rather think of such an XML file as a library of screen definitiondefinitions. We will examine that file and its format later.

...

The information from the view-map element is resolved against the handlers defined by the elements of type handler, usually in the first section of the controller.xml document. As we are rendering a view, we're only interested in handlers of type "view", so we do a lookup for a handler with type="view" and name="screen":

...