zoukankan      html  css  js  c++  java
  • OA查找用户

    最近一段开始研究OA,开始了大量写代码,锻炼一下,收获还是挺大的,我弄懂了servlet的流程:

     servlet的工作模式

      客户端发送请求至服务器
      服务器启动并调用Servlet,Servlet根据客户端请求生成响应内容并将其传给服务器

      服务器将响应返回客户端

     以下是一个具体的查找并显示用户的实例:

    1.先编写页面

    代码

     2.配置WEB-INF中system.xml文件

      1)在<action-mappings> 中添加

        <!-- 添加 根据资源号查找用户表单实现 -->
            <action attribute="flowuserForm"   name="flowuserForm" parameter="method" path="/searchuser" scope="request"
                type="cn.ac.sict.ietd.system.action.FlowUserAction">
                <forward name="searchuser" path="/Web/Users/searchuser.jsp" />
                <forward name="selectedusers" path="/Web/Users/SelectedUsers.jsp"/>    
                <forward name="show" path="/Web/Users/showSelectedUsers.jsp" />
                <forward name="showweituo" path="/Web/Users/showSelectedWTUsers.jsp"/>
                <forward name="selectnextuser" path="/Web/Users/selectnextuser.jsp"/>
                <forward name="searchAlluser" path="/Web/Users/selectcommission.jsp" />
                    
            </action>

     2)在 <form-beans>中添加

        <form-bean name="flowuserForm" type="cn.ac.sict.ietd.system.form.FlowUserForm" />
        </form-beans>

     3.在src这编写后台java代码,分三层

       1).  Action:

       

    代码

    2).Service

      

    代码

    3) .Form

    代码
  • 相关阅读:
    Ubuntu 16.04下SecureCRT无法输入中文的解决思路
    Ubuntu 16.04安装SecureCRT替代XShell
    SVN提交时报错:Commit blocked by pre-commit hook (exit code 1) with no output.
    Spring Cloud ZooKeeper集成Feign的坑2,服务调用了一次后第二次调用就变成了500,错误:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is com.n
    Spring Cloud ZooKeeper集成Feign的坑1,错误:Consider defining a bean of type 'org.springframework.web.client.RestTemplate' in your configuration.
    Ubuntu 16.04 GNOME下解决Sublime Text3中文输入(ibus)(转)
    Spring Cloud简介/版本选择/ZooKeeper例子搭建简单说明
    Maven奇怪的问题,当找不到Maven输出的提示错误时可以试下这个方法
    Ubuntu 16.04系统启动时卡在:(initramfs)
    Eclipse创建Maven多模块工程
  • 原文地址:https://www.cnblogs.com/monica/p/1606223.html
Copyright © 2011-2022 走看看