Struts的故事,以及Struts1.3编程入门最简代码欣赏

本文介绍了如何从下载Struts1.3开始,在Eclipse中创建WEB工程,配置web.xml和struts-config.xml,编写ActionForm和Action,创建index.jsp页面,最终部署到Tomcat并运行。Struts作为早期MVC框架,简化了JSP中业务逻辑的处理,减少了代码冗余。
摘要由CSDN通过智能技术生成
  1. 在struts官网下载struts-1.3.10-all.zip https://struts.apache.org/download.cgi
  2. 在Eclipse创建WEB工程,并将struts-1.3.10\lib目录的jar拷贝到WEB工程的lib目录cfaca7423a5b40a3a82db9714c03e236.jpeg

 3、参考struts-1.3.10\src\apps\examples的例子,在WEB-INF目录下创建web.xml

978619752dfc4a028c0cb64294ccc969.jpeg

<?xml version="1.0" encoding="iso-8859-1"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
   
         http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<!DOCTYPE web-app PUBLIC
        "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>
    <display-name>Struts Examples Application</display-name>
    <!-- St
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值