Main steps for adding struts to WebLogic Portal

Source: Internet
Author: User

Step 1: add the struts program to the portal
(1) copy the struts application to a new directory in your webapp. The directory you choose to place the struts application will become the struts module path for the application in the portal. For example, if your struts application directory is test, the module of your application is/test. Copy the struts-config.xml for your struts application to the WEB-INF /. under pageflow-Struts-generated/, change the file name. The naming rule is jpf-Struts-config-<dir>. XML, jpf-struts-config-test.xml in this example. using this naming rule allows the behavior servlet in the portal to dynamically register the struts application module. (2) Add the following content to the struts configuration file: <controller classname = "com. bea. wlw. netui. pageflow. config. pageflowcontrollerconfig "multipartclass =" com. bea. wlw. netui. pageflow. upload. pageflowmultipartrequesthandler "inputforward =" true "processorclass =" com. bea. wlw. netui. pageflow. pageflowrequestprocessor "> <set-property value =" true "property =" isreturntopagedisabled "/> <set-property value =" true "property =" isreturntoactiondisabled "/> </controller> (3) copy the Java file required in the corresponding struts to the WEB-INF/src, in this example teststruts. (4)

Adjust the newly added jpf-Struts-config-<dir>. XML according to the directory to make it consistent with the directory structure in the workshop. <? XML version = "1.0" encoding = "UTF-8"?> <! Doctype Struts-config public "-// Apache Software Foundation // DTD struts configuration 1.1 // en" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> <! -- Generated from/test/testcontroller. jpf on Thu Mar 30 23:22:05 CST 2006 --> <Struts-config> <form-beans/> <global-limits/> <global-forwards/> <form-beans> <form -Bean name = "useractionform" type = "teststruts. useractionform "/> </form-beans> <action-mappings> <! -- Action validate = "false" Scope = "request" type = "test. testcontroller "Path ="/begin "> <forward path ="/index. JSP "name =" success "/> </Action --> <action validate =" false "Scope =" request "Path ="/startaction "type =" teststruts. startaction "> <forward name =" success "Path ="/login. JSP "/> </Action> <action validate =" false "Scope =" request "name =" useractionform "Path ="/loginaction "type =" teststruts. loginaction "> <forward name =" success "Path ="/success. JSP "/> <forward name =" Err "Path ="/err. JSP "/> </Action-mappings> <controller classname =" com. bea. wlw. netui. pageflow. config. pageflowcontrollerconfig "multipartclass =" com. bea. wlw. netui. pageflow. upload. pageflowmultipartrequesthandler "inputforward =" true "processorclass =" com. bea. wlw. netui. pageflow. pageflowrequestprocessor "> <set-property value =" true "property =" isreturntopagedisabled "/> <set-property value =" true "property =" isreturntoactiondisabled "/> </controller> </Struts-config> 2. configure the struts program as portlets. Create portlets in the test directory and select create struts portlets. Note: To generate a Portlet for struts, action must be taken as the portal, and JSP cannot be used as the portal.

Select module URI for struts. In this example, select the test directory, that is, the generated Portlet is placed under the test directory. select struts config file in this example select jpf-struts-config-test.xml add configuration file select an action as the portal of the Portlet and then add the generated portlets to the portal.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.