Struts2 Package

排除 AcroForm 中 JavaScript 脚本的 Bug 本文介绍了Acrobat JavaScript脚本故障排除的基本方法。首先应检查控制台窗口的错误报告,通过具体示例演示了5类常见错误:语法错误(如缺少大括号)、未终止字符串、未定义变量、运算符混淆及变量作用域问题,并逐步给出修复方案。文章还提供了调试流程UML图和实用经验总结,强调关注细节(如分隔符匹配)、正确使用运算符和变量作用域等要点。最后建议采用系统化调试方法,包括关闭/重新打开表单等完整性测试。 阅读详情

Struts2 Package Configuration

The package element has one required attribute, name, which acts as the key for later reference to the package. The extends attribute is optional and allows one package to inherit the configuration of one or more previous packages - including all interceptor, interceptor-stack, and action configurations.

name 属性设定作用

  1 在子package需要继承于这个父package。name 属性可以作为标示父package

  2 便于多人协同开发(资料上没有写)

Note that the configuration file is processed sequentially down the document, so the package referenced by an "extends" should be defined above the package which extends it.

The optional abstract attribute creates a base package that can omit the action configuration.

Attribute

Required

Description

name

yes

key to for other packages to reference

extends

no

inherits package behavior of the package it extends

namespace

no

see Namespace Configuration

Abstract

no

Declares package to be abstract (no action configurations required in package)

 

为什么extends是可选属性但是在struts.xml中必须要配置extends="struts-default?

struts-defaul.xmt是struts-core包中的默认配置文件。是无法修改的:其中配置name属性值为” struts-defaul”package标签如下:

<package name="struts-default" abstract="true">

省略其内容

</package>

struts.xml 基于此的,所以必须要配置extends="struts-default。而在

namespace

namespace attribute subdivides action configurations into logical modules, each with its own identifying prefix. Namespaces avoid conflicts between action names. Each namespace can have its own "menu" or "help" action, each with its own implementation. While the prefix appears in the browser URI, the tags are "namespace aware", so the namespace prefix does not need to be embedded in forms and links.

Struts 2 Namespaces are the equivalent of Struts Action 1 modules, but more convenient and flexible.

Default Namespace

The default namespace is "" - an empty string. The default namespace is used as a "catch-all" namespace. If an action configuration is not found in a specified namespace, the default namespace is also be searched. The local/global strategy allows an application to have global action configurations outside of the action element "extends" hierarchy.

The namespace prefix can be registered with Java declarative security, to ensure only authorized users can access the actions in a given namespace.

Default Namespace 相当于其他所有Namespace的根目录,(目录=请求url)

以tomcat服务器为例 假设项目名称是struts2

那么Default Namespace 是http://localhost:8080/struts2_2

如果 jsp页面 A 的form 设定如下

<form action="<%=path%>/xuxl1/xuxl2/namespace.action" method="post">

省略内容

</form>

如果 jsp页面B的form 设定如下

<form action="<%=path%>/xuxl1/namespace.action" method="post">

省略内容

</form>

其中String path = request.getContextPath()

Struts.xml 配置如下

         <package name="struts" extends="struts-default">

                   <action name="namespace" class="xuxl.struts.action.DefaultNameSpacetTest">

                            <result name="success">/DefaultNamespaceSuccess.jsp</result>

                   </action>

         </package>

         <package name="xuxl" extends="struts-default" namespace="/xuxl1/xuxl2">

                   <action name="namespace" class="xuxl.struts.action.NameSpacetTest">

                            <result name="success">/NamespaceSuccess.jsp</result>

                   </action>

         </package>

页面A 提交请求路径为http://localhost:8080/struts2_2 /xuxl1/xuxl2/namespace.action

那么 这个请求就由xuxl.struts.action.NameSpacetTest 处理

页面B 提交请求路径为http://localhost:8080/struts2_2 /xuxl1/namespace.action

在struts.xml文件中没有定义namespace=” /xuxl1” 的package 标签

在Default Namespace 中配置了<action name="namespace" class="xuxl.struts.action.DefaultNameSpacetTest">

所以页面B 提交请求xuxl.struts.action.DefaultNameSpacetTest 处理

 

 

Namespace prefix 权限访问服务器资源

Root Namespace

A root namespace ("/") is also supported. The root is the namespace when a request directly under the context path is received. As with other namespaces, it will fall back to the default ("") namespace if a local action is not found.

         <package name="xuxl2" extends="struts-default" namespace="/">

                   <action name="root" class="xuxl.struts.action.RootTest">

                            <result name="success">/Root.jsp</result>

                   </action>

         </package>

输入请求url : http://localhost:8080/struts2_2/root.action 

便可以调用action:xuxl.struts.action.RootTest

Namespace Example

<package name="default">

    <action name="foo" class="mypackage.simpleAction">

        <result name="success" type="dispatcher">greeting.jsp</result>

    </action>

 

    <action name="bar" class="mypackage.simpleAction">

        <result name="success" type="dispatcher">bar1.jsp</result>

    </action>

</package>

 

<package name="mypackage1" namespace="/">

    <action name="moo" class="mypackage.simpleAction">

        <result name="success" type="dispatcher">moo.jsp</result>

    </action>

</package>

 

<package name="mypackage2" namespace="/barspace">

    <action name="bar" class="mypackage.simpleAction">

        <result name="success" type="dispatcher">bar2.jsp</result>

    </action>

</package>

How the Code Works

If a request for /barspace/bar.action is made, the /barspace namespace is searched for the bar action. If found, the bar action is executed, else it will fall back to the default namespace. In the Namespace Example, the bar action does exist in the /barspace namespace, so the bar action will be executed, and if "success" is returned, the request will be forwarded to bar2.jsp.

Falling Back to Foo

If a request is made to /barspace/foo.action, the namespace /barspace will be checked for action foo. If a local action is not found, the default namespace is checked. In the Namespace Example, there is no action foo in the namespace /barspace, therefore the default will be checked and /foo.action will be executed.

In the Namespace Example, if a request for moo.action is made, the root namespace ('/') is searched for a moo action; if a root action is not found, the default namespace is checked. In this case, the moo action does exist and will be executed. Upon success, the request would be forwarded to bar2.jsp.

Getting to the Root

If a request is made for /foo.action, the root / namespace will be checked. If foo is found, the root action will be selected. Otherwise, the framework will check the default namespace. In the Namespace Example, the foo action does not exist in the root namespace, so the default namespace is checked, and the default foo action is executed.

 

Namespaces are not a path!

Namespace are not hierarchical like a file system path. There is one namespace level. For example if the URL /barspace/myspace/bar.action is requested, the framework will first look for namespace /barspace/myspace. If the action does not exist at /barspace/myspace, the search will immediately fall back to the default namespace "". The framework will not parse the namespace into a series of "folders". In the Namespace Example, the bar action in the default namespace would be selected.

 

 1 按照请求的路径,匹配package ,若匹配成功再匹配action 

  2 匹配失败直接,到default namespace 匹配

 最多匹配 两次匹配package 

Amazon Skills:51个AI技能赋能亚马逊运营,从选品到广告全链路分析 在电商运营领域,数据分析和自动化工具正成为提升效率的关键。其核心原理在于将专业经验转化为结构化指令,使AI能够执行标准化流程。这种技术价值体现在降低专业门槛、提升决策效率,尤其适用于亚马逊这类数据驱动的电商平台。通过将选品、关键词研究、FBA费用计算、PPC广告优化等运营框架编码为可执行指令,AI助手能够模拟专家思维进行市场分析。Amazon Skills项目正是这一理念的实践,它提供51个覆盖运营全链路的技能模块,让卖家在自然对话环境中获得专业分析支持,实现从市场研究到利润核算的自动化工作流。 阅读详情

相关推荐

遥感图像语义分割的全流程实现(Python代码)

本节介绍了加载遥感 RGB 图像和对应的单通道掩膜(mask)。掩膜中每个像素值为类别索引(如0=背景,1=植被,2=建筑),通过 transform 统一缩放(256×256)和归一化(ImageNet 均值/标准差),确保输入模型的一致性。# 自定义数据集类(适配遥感RGB+单通道掩膜)mask = Image.open(mask_path).convert("L") # 单通道掩膜return image, mask.squeeze(0).long() # 返回RGB图像和类别索引。

qq_42679807的博客 1852

struts2之入门程序和package配置讲解

目录 1 struts2入门程序 1.1 下载包 1.2 新建项目 1.2.1 新建项目并添加struts2依赖的jar文件 1.2.2 web.xml 1.2.3 struts.xml 1.2.4 编写业务逻辑Action(LoginAction) 1.2.5 编写页面login.jsp和index.jsp 1.2.6配置struts.xml 2struts2中package详解 2.1 package内元素详解 2.1.1package元素属性 2.1.2Action元....

上善若泪 2026

从零到一:嵌入式车载通信中间件VSOMEIP的跨平台构建之旅

本文详细介绍了嵌入式车载通信中间件VSOMEIP的跨平台构建过程,重点解析了交叉编译环境配置、Boost库编译、VSOMEIP定制化编译等关键技术环节。通过实战案例展示了在ARM架构嵌入式设备上的部署与调试方法,为开发者提供了一套完整的VSOMEIP嵌入式应用解决方案。

lilh34434的博客 196

Struts2中的package

Struts2 中的 package属性     package name="build" extends="struts-default" namespace="/"> 默认形式为: package name="build" extends="struts-default" namespace="/">         

吾生也有涯,而学也无涯,以有涯随无涯 457

避坑实录:用certificate-manager重置vCenter 6.7证书时遇到的三个致命陷阱

本文详细解析了使用certificate-manager重置vCenter 6.7证书时可能遇到的三大致命陷阱,包括进度卡在85%的服务启动僵局、脚本突然退出的静默杀手以及密码错误锁死的隐藏机制。通过实战验证的解决方案和高级恢复技巧,帮助系统管理员有效避免vCenter环境瘫痪,确保证书更新过程顺利进行。

g5h6i7j的博客 919

比利时风电光伏负荷一体化数据集解析与应用

本文深度解析了由比利时输电系统运营商Elia集团提供的风电光伏负荷一体化数据集。该数据集整合了负荷、风电与光伏出力数据,并包含多时间尺度的官方预测值,时间跨度长达四年,是研究能源转型、构建电力预测模型及分析电网运行的宝贵资源。文章详细介绍了数据价值、字段含义、实战应用场景(如预测模型基准测试、风光互补性分析)以及数据处理指南,为相关领域的研究与开发提供了高质量数据基础和实践参考。

weixin_29200741的博客 429

struts2 package元素配置

package 元素的所有属性及对应功能: Attribute Required Description name yes key to for other packages to reference ---包名称,用来让别的包继承时使用不能有重复 extends no inherits package behavior of the package it ...

给太阳洒水的博客 187

10位PWM能否满足电梯±5mm平层精度?4位扩展法让10位PWM达到14位精度

电梯平层精度直接关系乘坐舒适性与安全性,而PWM分辨率是决定精度的关键因素之一。10位PWM能否满足±5mm的平层精度要求?本文从分辨率与物理量的对应关系出发,结合工程精度需求与实战对比,给出明确的选型结论与解决方案,请参考优快云博客《4位扩展法:基于ATtiny816的高精度PWM软件扩展方法》和《低成本高精度PWM:4位扩展法原理、实现和工程实践》。10位PWM的分辨率为 $2^{10} = 1024$ 级。

m0_73354873的博客 244

struts2 package 属性说明

package节点是整个配置的核心部分。每个package,从语义上讲,其实代表了每一个独立的模块。在这个模块中,你可以定义隶属于这个模块的行为方式,而与其他的模块没有关系。所以,每个package都有独立的interceptor、result-type和action的定义,绝大多数的Runtime配置定义都是通过package节点实现的。接下来我们就来详细讨论一下package中的属性和子节点。

LL_zhuo的专栏 713

一篇把 Transport 做到可复制的实战指南:从 CTS 底层表到 LSMW、Variant、Layout、TABU、Query、SAPscript 全对象搬运

本文深入解析SAP系统中的Transport机制,将其视为可审计、可追溯的变更流水线。文章从CTS/Transport Organizer通用方法论和具体对象搬运手法两个层面展开,详细介绍了LSMW项目、程序Variant、屏幕/ALV Layout、表数据、ABAP Query、SAPscript和SO10标准文本等对象的传输策略。通过真实案例说明,代码对象往往能被正确传输,但"运行体验"和"业务配置"却常被遗漏,导致QAS测试正常而PRD环境异常。文章提供了一套可

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 172

【EPS精品教程】EPS2016三维测图版安装教程(附EPS2016安装包下载地址)

EPS地理信息工作站是北京清华山维新技术开发有限公司历经十五年精心研发和打造,为满足“以地理信息服务为中心”的信息化测绘生产需求而推出的测绘生产活动多种业务模块集成化软件系统。主要功能有:(1)测绘与地理信息多业务模块集成管理;(2)多元多尺度多种类数据集成管理;(3)跨平台异构数据转换;(4)数据监理;(5)自动缩编与综合;(6)坐标转换与动态投影;(7)地理信息模板定制;(8)GIS地理信息描述与CAD图形表达一体化支持;(9)GIS数据库更新维护;(10)图形打印与地图出版。 一、安装过程 EP..

智慧空间实验室 2万+

Struts2框架之Struts配置文件package元素

类似于java中的包,在struts2的配置文件中引入了面向对象思想,便宜对action类进行分包管理、模块化开发。 package有name、extends、abstract、namespace四个常见属性 1、HelloAction演示 HelloAction.java文件 package cn.hestyle.web.action; public class HelloAction { ...

hestyle的博客 629

MATLAB代码实现了一个柱塞泵配流盘过流面积的计算和可视化功能

该MATLAB代码实现了一个柱塞泵配流盘过流面积的计算和可视化功能。输出曲线可直接用于验证设计的合理性(如是否存在过流面积突变或不足)。的不同范围,选择对应的几何模型计算过流面积。通过分段逻辑计算柱塞腔在不同旋转角度(过流面积在特定条件下会被限制(如。),确保结果符合物理实际。条件分支,根据旋转角度。

huanghm88的专栏 582

struts2 package name作用

首先更正一点,struts配置文件中的package name属性不是解决重名问题的,而是用来实现继承的,namespace才是用来解决重名的,前台和后台可以这样分 ,这样在两个包里都有test Action时在url地址中用/front/test或/back/test就能区分开了,别外继承时用extends="front"就是继承自第一个package(默认继承是default);若是第一个

4599

SIMATIC S7-1200, S7-1500 PID 控制[手册]

SIMATIC S7-1200, S7-1500 PID 控制[手册]

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

struts2中package的作用

在struts2中的struts.xml定义的package标签,其作用是用来区分多个action重名的情况 假设前后台均有名为index的package,则可用此种方式来区分,例: <package name="front" namespace="/" extends="struts-default"> <act...

weixin_34219944的博客 255

蓝牙模块HM-10手册

蓝牙模块HM-10手册,该手册对蓝牙模块HM-10进行了详细的介绍和使用方法以及一些AT指令。

Struts2中的跳转、package标签、挎包重定向、全局跳转

1、struts.xml文件中使用package标签的好处: 1、对Action标签进行分门别类的管理,将同1个功能模块的Action放在同一个package标签下。提高了项目后期的可维护性。 2、重用功能 extends用于继承一个父包,默认继承父包的配置。 A) namesapce属性【实战:必须添加namespace】 作用:在访问action时,路径必须添加namesapce的值,那么...

Java开发,人工智能,边缘计算,致力于掌握前沿技术 847

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

struts2 package name

首先更正一点,struts配置文件中的package name属性不是解决重名问题的,而是用来实现继承的,namespace才是用来解决重名的,前台和后台可以这样分<package name="front" namespace="/front" extends="default"> <package name="back" namespace="/back" extends="default">这

憧憬的专栏 1328

struts2 package节点属性

package节点是整个配置的核心部分。每个package,从语义上讲,其实代表了每一个独立的模块。在这个模块中,你可以定义隶属于这个模块的行为方式,而与其他的模块没有关系。所以,每个package都有独立的interceptor、result-type和action的定义,绝大多数的Runtime配置定义都是通过package节点实现的。接下来我们就来详细讨论一下package中的属性和子节点。

知也无涯 419

Struts2的Package的继承

由于之前使用struts2.0.3的时候可以在struts.xml里先定义一个名为auth-default的package,然后include的其他struts配置文件只要在这个定义的package下面则都可以继承 auth-default但是在新版本struts2.0.6里却不可以这么去写。必须先将auth_default定义在一个单独的配置文件中,然后其他配置文件将该配置include进来

blueilove2003的专栏 3548

Struts2配置package

package节点是整个配置的核心部分。每个package,从语义上讲,其实代表了每一个独立的模块。在这个模块中,你可以定义隶属于这个模块的行为方式,而与其他的模块没有关系。所以,每个package都有独立的interceptor、result-type和action的定义,绝大多数的Runtime配置定义都是通过package节点实现的。接下来我们就来详细讨论一下package中的属性和子节点。

i am me,haha,么么哒。。。 655

struts2 package讲解

package节点是整个配置的核心部分。每个package,从语义上讲,其实代表了每一个独立的模块。在这个模块中,你可以定义隶属于这个模块的行为方式,而与其他的模块没有关系。所以,每个package都有独立的interceptor、result-type和action的定义,绝大多数的Runtime配置定义都是通过package节点实现的。接下来我们就来详细讨论一下package中的属性和子节点。...

iteye_13271的博客 181

struts2的配置元素package

struts2的配置元素package<br />关键字: struts2 struts2的配置元素package2008-12-30 19:28<br />package 元素的所有属性及对应功能<br /> AttributeRequiredDescriptionnameyeskey to for other packages to reference ---任意的包名称,用来让别的包继承是使用不能重复extendsnoinherits package behavior of the package i

软件开发 662

struts2 package namespace限制

struts2加入package、namespace 其中: 1. package:对result限制,主要体现在&lt;global-results&gt;上。该包内的action返回result使用到global-result时,在此包范围内查找,其他包范围内部可见! namespace:主要对action访问限制。在action访问前天就命名空间。 相同的命名空间下,不能出现重复的a...

javaeye_hua 127

struts2中的package属性

struts2中的package属性 package节点是整个配置的核心部分。每个package,从语义上讲,其实代表了每一个独立的模块。 在这个模块中,你可以定义隶属于这个模块的行为方式,而与其他的模块没有关系。所以,每个package都有独立的 interceptor、result-type和action的定义,绝大多数的Runtime配置定义都...

weixin_30487317的博客 162
上一篇: struts2 常量设置
下一篇: Struts2 通过配置struts.xml中的actio标签name属性值来与请求路径映射
nttwbd
博客等级 码龄19年 10粉丝 48原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值