Starting Struts2摘抄(1)

MobaXterm终端工具个人学习版安装包及常用配置备份 资源包含 MobaXterm 个人版的安装包以及日常运维常用的基础配置备份文件。适用于网络工程师及运维人员用于日常的服务器管理、SSH 连接及串口调试。 压缩包内附带了个人整理的软件使用技巧与配置说明(仅供个人学习参考)。请各位同行下载后注意,技术工具请尽量支持官方正版,本资源仅供个人测试与交流使用,切勿用于商业环境。 立即下载

 在我阅读完成后,我会尽力翻译全书。为大家提供Struts2的学习资料。

web.xml配置

<filter>

    <filter-name>struts2</filter-name>

    <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>

</filter>

<filter-mapping>

    <filter-name>struts2</filter-name>

    <url-pattern>/*</url-pattern>

</filter-mapping>

使用过struts的同学可以很容易理解这里。毕竟这里跟注册actionservlet控制器的格式是差不多的。但是要注意,这里注册了一个过滤器类。第一,struts2里面,控制器不再是一个actionservlet负责跳转方向。而是一个过滤器,action仅仅作为M层,跳转过程由过滤器和解释器来做。大家可能看到这里觉得没什么新奇的。对,但是从这里可以引出struts2的架构来,大家可以自行了解,也可以看我翻译的Starting Struts2里面的图。

struts.xml配置文件

这里的文件与struts-config.xml差别太大了。这里struts.xml有两个作用。第一,它作为后台的一个界面,共开发人员修改整个架构的配置参数。在struts2-core-*.jar包里面有一个叫default.properties的文件作为配置文件。这里面有相关参数设置,而且可以通过struts.xml里面的<constant...标签进行覆盖。具体配置参数可以查看:

http://struts.apache.org/2.x/docs/strutsproperties.html这里提供的struts-default.xml文件。具体配置项需要e文不错的同学自行察看。我没有太多时间翻译。而且大家仔细看看绝对有好处。写的很详细的。

第二个作用就是,这里使struts2框架可以灵活装配拆卸。<include...标签可以使整个框架配置文件按照模块划分。每个模块构造自己的控制逻辑,然后注册给过滤器。这样实现模块化的控制器。当然使用

<action name="*"...的配置,可以实现所有情况的处理。这是后话了。

【YOLOv7-环境搭建】PyTorch安装后输出版本显示No module named ‘Torch’的解决方法 【YOLOv7-环境搭建】PyTorch安装后输出版本显示No module named ‘Torch’的解决方法:①检查PyCharm导入的环境是否错误②添加Torch包 阅读详情

相关推荐

工业视觉检测实战指南:从硬件配置到AI算法部署

本文提供了一套完整的工业视觉检测系统搭建实战指南。从硬件选型(相机、光源、镜头、工控机)到AI算法(深度学习模型)部署,详细解析了如何为生产线配置一双“会思考的眼睛”。重点探讨了深度学习算法在复杂缺陷识别中的应用,并分享了模型训练、优化及云边协同部署的实战心得,旨在帮助工程师实现从实验室Demo到7x24小时稳定运行的工业落地。

weixin_29051193的博客 457

Starting Struts2摘抄(3)

package example;public class Login extends ExampleSupport { /**  * 添加序列ID,系统自动生成,added by wangkuo 117527  */ private static final long serialVersionUID = 4340282834311892506L; public String execut

Vincent--programming life 554

3D Slicer:从入门到精通(二)——入门指南

本篇文章包含开始使用3D Slicer所需的信息,包括如何安装和快速开始使用基本功能,以及在哪里找到更多信息。

walt3433的博客 2万+

Starting Struts2摘抄(2)

上次我们看到了Struts2框架给我们带来新的平台配置理念。书我已经看到1/3的样子,现在进行一下总结。感觉摘抄这个题目不太贴切了。不过,这里的内容很大程度上是我对这本书的一些摘要,并且包含一些我的理解。还请各位读友与我多多交流。这里展示的是struts.xml文件配置,和我在分析该文件时一些注释。  --http://struts.apache.org/dtd/struts-2.0.

Vincent--programming life 646

Windows 10/11下Drive Composer Pro 2.9.0完整安装与连接ACS880变频器实战教程

本文详细介绍了在Windows 10/11系统上安装Drive Composer Pro 2.9.0并连接ACS880变频器的完整教程。从系统环境准备、软件安装到许可证配置,再到USB、蓝牙和以太网三种连接方式的实战操作,帮助工业自动化工程师快速掌握ABB变频器的调试技巧。

weixin_32956805的博客 528

在 SAP 世界里拥抱非 SAP 技术:一名 ABAP 开发者的成长路径与实战方法论

那段时间非常煎熬,但它带来的回报也很真实:你会更尊重“可观测性”的价值,也会更愿意在 SAP 场景里把日志、追踪、断言、隔离测试做扎实。解决这类问题,靠的并不是某个神奇的 SAP 函数,而是跨栈的工程设计:接口要有业务幂等键,SAP 侧要有落库与锁策略,返回要有可识别的状态码,异常要能回放,补偿要有可追踪的工单或队列。这套体系吸引我的地方,在于它更贴近真实业务:客户要的往往不是“能打印”,而是“能规范地输出”,包括版式、字体、条码、二维码、电子签章位置、分页规则、多语言、合规水印、可回写的交互字段等。

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

Starting Struts2摘抄(6)

 自定义Interceptor的实施方案:1.实现Interceptor接口,该接口定义如下: public interface Interceptor extends Serializable {      void Destory();        void Init();        String intercept(ActionInvocation invocation)     

Vincent--programming life 749

32、运算放大器的工作原理与应用

本文详细介绍了运算放大器的工作原理与多种应用场景,涵盖开环与闭环放大器的基本概念、理想运算放大器的特性及其‘黄金规则’。文章深入解析了反相放大器、同相放大器、单位增益跟随器与反相器的配置和增益计算,并探讨了电压比较器及窗口比较器的工作机制。同时提供了运算放大器在实际应用中的选型流程、使用注意事项以及常见故障排查方法,帮助读者全面掌握运算放大器的设计与应用要点。

u5v6w7的博客 163

Starting Struts2摘抄(4)

 Struts2解释器:负责异常处理、文件上传、回调生命周期以及认证。支撑action的预处理和后处理涉及的解释器:1.Spring Framework -- ActionAutowiringInterceptor2.Request String and Form Values -- ParametersInterceptor3.Servlet-based object -- Serv

Vincent--programming life 645

28_Spring AI 干货笔记之 OpenAI 聊天功能

本文详细介绍了在Spring AI框架中集成OpenAI聊天模型的方法。内容涵盖API密钥配置、通过starter依赖启用自动配置、连接与模型参数的详细设置,并重点说明了运行时选项的动态覆盖机制。文章还深入讲解了多模态处理(图像与音频)、结构化输出、函数调用等高级功能,提供了示例控制器和手动配置指南,并讨论了与OpenAI兼容服务器的适配与推理模型思维链的获取。

在科技的浪潮中,我们寻找着创新的火种,在代码的海洋里,我们编织着智慧的网。腾飞开源,就是这样一个由技术精英汇聚而成的博客平台,我们致力于分享在Java、Python、IoT和人工智能等领域的最新研究成果和实战经验。 在腾飞开源的博客上,你会看到紧跟技术前 1656

Microsemi Libero系列教程(六)——Identify片上逻辑分析仪的使用

文章目录FPGA如何进行在线调试关于Microsemi片上逻辑分析仪FPGA片上逻辑分析仪原理预期效果0.准备一个创建好的Libero工程1.新建identify工程,并添加想要监测的信号2.管脚分配,编译下载3.设置触发类型4.IICE逻辑分析仪核资源占用 系列教程:Microsemi Libero系列教程 FPGA如何进行在线调试 对于嵌入式系统来说,如单片机,进行硬件级程序调试时,通常采用的是JLink/ST-Link调试器,在线调试的方式来获取程序实时运行的状态,可以观察程序运行流程、各种变量的值

whik1194的博客 1万+

Starting Struts2摘抄(5)

 如果使用的不是struts-default.xml里面缺省的解释器,那么我们需要在web.xml当中对解释器进行声明,并指定路径等操作,以便在package、action等位置进行使用。具体如下:    使用指定的Interceptor的位置有两个1.指定action当中引用使用解释器2.在包内所有action指定使用一个解释器用法如下(并未实践过)view.jsp有一点

Vincent--programming life 600

【Matlab光伏功率预测】基于GRU门控循环单元的光伏功率时间序列预测(附MATLAB代码)

【Matlab光伏功率预测】基于GRU门控循环单元的光伏功率时间序列预测(附MATLAB代码)

k8291121的博客 1100

asp.net里面页面定位

我要在这里写的,完全是在我这个菜鸟的基础上,如果您看到觉得简单,请不要抱怨。如果您发现错误,我会虚心听您指教。如果要交朋友……常来我的blog座座。QQ:94768815                                                                                                                 

Vincent--programming life 3535

深度学习工具包 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")

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

一个利用堆栈实现的正整数10进制向16进制的转化程序

/*用STACK将任意一个十进制数转化为十六进制数,输出*/#include "Stdio.h"#include "Conio.h"#define stackinitsize 100;#define stackincrement 10;typedef struct{    int *base;   int *top;    int stacksize;}sqstack; 

Vincent--programming life 2785

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

第一次按装solaris的流水帐

18:41开始安装Solaris10以第一张光盘启动,但是检测SCSI设备的时候,认为光盘从IDE设备下不可使用。报错:看到kernel是UNIx的18:43第一次死机,没办法,可能是内存值较小,好像不应该挂栽软驱,总是启动这个solaris有4种安装方式选择:1.Solaris Interactive2.Custom Jumpstart3.Solaris Interactive Text(con

Vincent--programming life 2235

efm32 入门.pdf

本PDF共计22页,介绍的是操作驱动API,下载与否自己斟酌。

Jboss4.2.*版本环境搭建产生问题解决总结

 环境搭建过程中,myeclipse配合jboss使用。奇怪现象是:当我配置myeclipse当中服务器通过。运行测试通过。运行中热部署通过。但是独立运行时报错如下:java.lang.UnsupportedClassVersionError: javax/****问题。查看jboss AS官方notes发现,jboss4.2以上的版本都必须要求1.5版本以上的jdk。从表面上看是编译器版本不

Vincent--programming life 2034

DataStructure---LinkList 链表C语言实现代码

//=============================================================//链表具体函数实现部分//=============================================================#include "LinkList.h"#include #include "stdafx.h"void main(){ 

Vincent--programming life 1948

DataStructure---LinkedList,链表(定义部分)

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//                    Produced  By  fishstudio (R)  @  Aug, 2005//Description://    This is a ADT(Abstract D

Vincent--programming life 1945

DataStructure----LinerList,线性表C实现

//=============================================================================//LinerList.h//=============================================================================//初始化队列的长度#define LIST_INIT_S

Vincent--programming life 1827

串比较的若干算法归类————普通、KMP算法

KMP算法不是我想出来的,搜索一下网上描述很多,这里会在最后引用一段描述,给出的仅仅是算法。而且你会惊奇的发现,这个算法简直就是动过小手术的一个算法的重载,这里写下就是方便你的记忆,下面开始://++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//                      

Vincent--programming life 1556

最后的战役

这是最后的战役,对大学来说,对大学的我来说……                                                         ——题记也许这篇文章在本不应该出现的地方出现了,看着blog上自己的东西,忽然意识到已经是本科末路无归途的师哥,但又闻项目色变的菜鸟,心里难免有些难过。写下来,作为程序员生涯中的留念,倒也不错,当然,这是最后的战役,对大学来说,对大学的我来

Vincent--programming life 1500

minix管道实现小究

在考研复习时候遇到的问题,很想写下来,虽然时间已经很紧张,但是在我们师生的问答互助之间,学术似乎更显神圣了,比起肮脏的考试制度来说……(请配合代码看)问题表述:      在minix里面,使用如下命令会使系统在2个进程之间建立管道用来进行进程之间的通讯:      #cat file1 file2|sort     那么它的作用显而易见,列出file1和2的内容并排序放入另一文件。那么在内核当中

Vincent--programming life 1359

大学一年级做过的一道程序题——螺旋矩阵

/*螺旋矩阵*/#include #include #define DOWN    0#define LEFT    1#define UP      2#define RIGHT   3//N*N矩阵#define N   5void printMatrix(int *a[], int n) {    int i, j;    for (i = 0; i         for (j = 0;

Vincent--programming life 1276

一个分布式系统的偶然研究(updated)

这是一次很偶然的发现,连自己都觉得意外..............背景:1.本宿舍楼浴室            2.一卡通校园卡以及读卡收费器(自动感应)            3.刷卡规则,将一卡通卡片放在读卡器正面,1秒左右自动读取1元并开始放水,每4秒计费一次,每次               扣除1分钱。1元钱全部扣除或者再次刷卡都可将洗澡水停下。消费金额按照读卡器扣除金额为准。研究:2张

Vincent--programming life 1218

关于二叉树前序输入且输出结构的算法实现

#include #include #include #define ElementType int#define  MaxSize 511 //the number of the node is 2^levels-1                     //and the max level is 9//An array to store each value of the node i

Vincent--programming life 1207
上一篇: Jboss4.2.*版本环境搭建产生问题解决总结
下一篇: Starting Struts2摘抄(2)
fishstudio
博客等级 码龄23年 4粉丝 41原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值