...
Code Block |
---|
<resource-loader name="main" type="component"/>
|
3. In <webapp> tag, we have different attributes and their purpose is as follows:
...
Code Block |
---|
<context-param> <param-name>localDispatcherName</param-name> <param-value>practice</param-value> <description>A unique name used to identify/recognize the local dispatcher for the Service Engine</description> </context-param> |
...
...
Code Block |
---|
<context-param> <param-name>mainDecoratorLocation</param-name> <param-value>component://practice/widget/CommonScreens.xml</param-value> <description>The location of the main-decorator screen to use for this webapp; referred to as a context variable in screen def XML files.</description> </context-param> |
...
Step - 10 : Now its the time to run you first practice application:
Start server by : java -Xmx256M -jar ofbiz.jar (the -Xmx256M command just ensures that the program has enough memory) Then hit the url http://localhost:8080/practice/control/main in your browser.
Browser should show "This is first practice"
Output Screen :
Step - 11 : Now create a file in webapp directory "practice" by name index.jsp (Contents of this file can be taken from "example" component), this file is responsible for redirecting the response to control/main if you give url http://localhost:8080/practice/ and if you give url like http://localhost:8080/practice/unknown/requestit will be redirected to the redirectPath specified in web.xml. In that case, ContextFilter filter out the request and use this redirect path to redirect the request.
...