手动配置SSI框架

瑞萨RX MCU SSI模块FIT驱动API详解与PCM音频传输实战 在嵌入式音频系统开发中,同步串行接口(SSI)是实现I2S、TDM等高速音频协议通信的核心硬件模块。其工作原理基于时钟同步与时分复用,主设备产生位时钟和帧同步信号,以全双工方式与音频编解码器交换PCM数据流。该技术通过集成FIFO和支持DMA,显著降低了CPU负载,确保了高带宽、低延迟的音频数据传输,对于构建便携式录音设备、数字音频处理器等产品至关重要。瑞萨FIT技术将复杂的SSI寄存器操作封装为标准化API,如R_SSI_Open、R_SSI_Write等,极大地提升了代码的可移植性和开发效率。本文聚焦于 阅读详情

SSI框架为struts、spring、ibatis,在该框架中,使用ibatis作为数据持久层,其中ibatis使用最新版本mybatis3。

注:本文使用版本:struts-2.3.4、spring-3.2.1、mybatis-3.2.1  

  
一、框架下载  
1、Struts2:http://struts.apache.org/download   
2、Spring:http://www.springsource.org/download/community  
3、mybatis:https://code.google.com/p/mybatis/downloads/detail?name=mybatis-3.2.1.zip  
mybatis-spring: https://code.google.com/p/mybatis/downloads/list?q=label:Product-Spring  
  
二、创建项目,添加jar包  
1、创建java web项目testSSI.  
2、添加struts包:  
aopalliance-1.0.jar、  
freemarker-2.3.19.jar,  
ognl-3.0.5.jar,  
struts2-core-2.3.4.jar,  
struts2-spring-plugin-2.3.4.jar,  
xwork-core-2.3.4.jar,  
commons-fileupload-1.2.2.jar、  
commons-logging-api-1.1.jar、  
commons-io-2.0.1.jar、  
commons-lang-2.4.jar、  
commons-lang3-3.1.jar、  
commons-logging-api-1.1.jar。
3、添加spring包:
spring-aop-3.2.1.RELEASE.jar、  
spring-aspects-3.2.1.RELEASE.jar、  
spring-beans-3.2.1.RELEASE.jar、  
spring-context-3.2.1.RELEASE.jar、  
spring-context-support-3.2.1.RELEASE.jar、  
spring-core-3.2.1.RELEASE.jar、  
spring-expression-3.2.1.RELEASE.jar、  
spring-jdbc-3.2.1.RELEASE.jar、  
spring-orm-3.2.1.RELEASE.jar、  
spring-test-3.2.1.RELEASE.jar、  
spring-tx-3.2.1.RELEASE.jar、  
spring-web-3.2.1.RELEASE.jar。
4、添加ibatis包:
mybatis-3.2.1.jar  
mybatis-spring-1.2.0.jar  
5、添加其他包:
ojdbc14.jar 【下载地址 http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.html 】  
aspectjweaver.jar 【下载地址 http://search.maven.org/remotecontent?filepath=org/aspectj/aspectjweaver/1.6.12/aspectjweaver-1.6.12.jar 】  
javassist-3.15.0-GA.jar  
c3p0-0.9.1.jar  【下载地址:https://code.google.com/p/aicms/downloads/detail?name=c3p0-0.9.1.jar&can=2&q=】
三、配置struts  
1、配置struts核心过滤器。  
打开web.xml,配置struts核心过滤器和过滤器映射。  
web.xml文件代码如下:
<?xml version="1.0" encoding="UTF-8"?>  
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   
    http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">  
    <display-name></display-name>  
      
    <!-- 定义Struts 2的核心控制器 -->   
    <filter>  
        <filter-name>struts2</filter-name>  
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>  
    </filter>  
    <filter-mapping>  
        <filter-name>struts2</filter-name>  
        <url-pattern>*.action</url-pattern>  
    </filter-mapping>  
  
    <listener>  
        <listener-class>org.apache.struts2.dispatcher.ng.listener.StrutsListener</listener-class>  
    </listener>  
  
    <welcome-file-list>  
        <welcome-file>index.html</welcome-file>  
        <welcome-file>index.htm</welcome-file>  
        <welcome-file>index.jsp</welcome-file>  
        <welcome-file>default.html</welcome-file>  
        <welcome-file>default.htm</welcome-file>  
        <welcome-file>default.jsp</welcome-file>  
    </welcome-file-list>  
  
</web-app>
2、建立BaseAction。  
新建包com.hsinghsu.testSSI.action,在其中建立类BaseAction,继承ActionSupport类。  
BaseAction.java文件代码如下:
package com.hsinghsu.testSSI.action;  
  
import com.opensymphony.xwork2.ActionSupport;  
  
public class BaseAction  extends ActionSupport{  
  
    /**  
     *   
     */  
    private static final long serialVersionUID = 4565394360208096613L;  
  
}
3、编写测试struts的Action。  
在包com.hsinghsu.testSSI.action中建立LoginAction类,继承BaseAction,作为简单的struts测试。  
LoginAction.java文件代码如下:
package com.hsinghsu.testSSI.action;  
  
public class LoginAction extends BaseAction {  
  
    /**  
     *   
     */  
    private static final long serialVersionUID = -6144396976094110475L;  
      
    public String execute() throws Exception   
    {    
        return "success";    
    }    
  
}
4、配置action。  
在struts.xml文件中,添加对LoginAction的配置。  
struts.xml文件代码如下:
<?xml version="1.0" encoding="UTF-8" ?>  
  
<!DOCTYPE struts PUBLIC  
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"  
    "http://struts.apache.org/dtds/struts-2.3.dtd">  
  
<struts>  
    <constant name="struts.objectFactory" value="spring" />  
    <constant name="struts.i18n.encoding" value="UTF-8" />  
    <constant name="struts.i18n.reload" value="false" />  
    <constant name="struts.configuration.xml.reload" value="false" />  
    <constant name="struts.custom.i18n.resources" value="globalMessages" />  
    <constant name="struts.action.extension" value="action,," />  
  
    <constant name="struts.convention.package.locators.basePackage"  
              value="com.hsinghsu.testSSI.action" />  
    <constant name="struts.convention.result.path" value="/" />  
    <constant name="struts.serve.static" value="true" />  
    <constant name="struts.serve.static.browserCache" value="false" />  
      
      
    <package name="com.hsinghsu.testSSI.action.test" extends="struts-default">  
        <action name="login" class="com.hsinghsu.testSSI.action.LoginAction">  
            <result name="success">/jsp/welcome.jsp</result>  
        </action>  
    </package>  
      
</struts>
5、建立测试jsp页面  
新建测试jsp页面welcome.jsp。  
welcome.jsp文件代码如下:
<%@ page language="java" pageEncoding="UTF-8"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
<html>  
<head>  
<title>IWelcome</title>  
</head>  
<body>  
Welcome HsingHsu  
</body>  
</html> 
6、配置spring  
打开applicationContext.xml文件,配置spring,添加action bean。  
applicationContext.xml文件代码如下:
<?xml version="1.0" encoding="UTF-8"?>  
<beans xmlns="http://www.springframework.org/schema/beans"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"  
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"  
    xmlns:context="http://www.springframework.org/schema/context"  
    xsi:schemaLocation="  
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd  
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd  
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd  
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd  
       ">  
         
    <bean id="loginAction" class="com.hsinghsu.testSSI.action.LoginAction"/>   
       
</beans>
7、配置Spring监听器  
打开web.xml,添加Spring监听器。  
web.xml文件代码如下:
<?xml version="1.0" encoding="UTF-8"?>  
<web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee   
    http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">  
    <display-name></display-name>  
      
    <context-param>  
        <param-name>contextConfigLocation</param-name>  
        <param-value>  
        classpath:applicationContext.xml  
        </param-value>  
    </context-param>  
  
    <!-- ssh 中文过滤 -->  
    <filter>  
        <filter-name>characterEncoding</filter-name>  
        <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>  
        <init-param>  
            <param-name>encoding</param-name>  
            <param-value>utf-8</param-value>  
        </init-param>  
        <init-param>  
            <param-name>forceEncoding</param-name>  
            <param-value>true</param-value>  
        </init-param>  
    </filter>  
    <filter-mapping>  
        <filter-name>characterEncoding</filter-name>  
        <url-pattern>/*</url-pattern>  
    </filter-mapping>  
  
    <!-- 定义Struts 2的核心控制器 -->   
    <filter>  
        <filter-name>struts2</filter-name>  
        <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>  
    </filter>  
    <filter-mapping>  
        <filter-name>struts2</filter-name>  
        <url-pattern>*.action</url-pattern>  
    </filter-mapping>  
  
    <!-- 对Spring 容器进行实例化 -->  
    <listener>  
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>  
    </listener>  
    <listener>  
        <listener-class>org.apache.struts2.dispatcher.ng.listener.StrutsListener</listener-class>  
    </listener>  
  
    <welcome-file-list>  
        <welcome-file>index.html</welcome-file>  
        <welcome-file>index.htm</welcome-file>  
        <welcome-file>index.jsp</welcome-file>  
        <welcome-file>default.html</welcome-file>  
        <welcome-file>default.htm</welcome-file>  
        <welcome-file>default.jsp</welcome-file>  
    </welcome-file-list>  
  
</web-app>
8、配置tomcat并启动,在浏览器中输入http://localhost:8686/testSSI/login.action   

   则页面会显示Welcome HsingHsu。


四、配置ibatis  

1、建立数据库与数据表  
本文采用oracle数据库,建立T_TEST_USER表,新建列ID,NAME,PWD,AGE,SEX。插入一条数据,如id:1,name:hsing,pwd:hsu。  
2、配置ibatis数据库连接等配置。新建jdbc.oracle.properties文件。  
jdbc.oracle.properties文件代码如下:
ibatis.connection.driver_class oracle.jdbc.driver.OracleDriver  
ibatis.connection.url jdbc:oracle:thin:@10.127.58.1:1521:ora11g  
ibatis.connection.username adm  
ibatis.connection.password adm  
  
c3p0.acquireIncrement=3  
c3p0.idleConnectionTextPeriod=900  
c3p0.minPoolSize=2  
c3p0.maxPoolSize=50  
c3p0.maxStatements=100  
c3p0.numHelperThreads=10  
c3p0.maxIdleTime=600  
c3p0.initialPoolSize=3 
3、配置spring,添加ibatis支持。  
修改applicationContext.xml文件,添加ibatis支持。  
applicationContext.xml文件代码如下: 
<?xml version="1.0" encoding="UTF-8"?>  
<beans xmlns="http://www.springframework.org/schema/beans"  
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"  
    xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"  
    xmlns:context="http://www.springframework.org/schema/context"  
    xsi:schemaLocation="  
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd  
       http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.1.xsd  
       http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd  
       http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd  
       ">  
  
    <bean id="placeholderConfig"  
        class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">  
        <property name="location">  
            <value>classpath:jdbc.oracle.properties</value>  
        </property>  
    </bean>  
  
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"  
        destroy-method="close">  
        <property name="jdbcUrl" value="${ibatis.connection.url}" />  
        <property name="driverClass" value="${ibatis.connection.driver_class}" />  
        <property name="user" value="${ibatis.connection.username}" />  
        <property name="password" value="${ibatis.connection.password}" />  
        <property name="acquireIncrement" value="${c3p0.acquireIncrement}" />  
        <property name="initialPoolSize" value="${c3p0.initialPoolSize}" />  
        <property name="minPoolSize" value="${c3p0.minPoolSize}" />  
        <property name="maxPoolSize" value="${c3p0.maxPoolSize}" />  
        <property name="maxStatements" value="${c3p0.maxStatements}" />  
        <property name="numHelperThreads" value="${c3p0.numHelperThreads}" />  
        <property name="maxIdleTime" value="${c3p0.maxIdleTime}" />  
    </bean>  
  
    <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">  
        <property name="configLocation" value="classpath:sqlMapConfigMybatis.xml" />  
        <property name="dataSource" ref="dataSource" />  
    </bean>  
  
    <bean id="abstractDao" abstract="true">  
        <property name="sqlSessionFactory" ref="sqlSessionFactory" />  
    </bean>  
      
    <bean id="userDao"  
        class="com.hsinghsu.testSSI.dao.impl.UserDaoImpl"  
        parent="abstractDao" />  
  
    <context:component-scan base-package="com.hsinghsu.testSSI">  
        <context:exclude-filter type="annotation"  
            expression="org.springframework.stereotype.Controller" />  
    </context:component-scan>  
  
</beans>
4、配置ibatis映射文件  
新建sqlMapConfigMybatis.xml,添加ibatis映射文件  
代码如下:
<?xml version="1.0" encoding="UTF-8"?>    
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN"    
    "http://mybatis.org/dtd/mybatis-3-config.dtd">  
  
<configuration>  
    <mappers>  
        <!-- 配置sql语句文件 -->  
        <mapper resource="com/hsinghsu/testSSI/data/User.xml" />  
    </mappers>  
</configuration>
5、创建持久层实体类。  
创建包com.hsinghsu.testSSI.model,创建User类,添加5个私有成员,对应数据表中5个属性,并一定要添加set和get方法。  
User.java文件代码如下:
package com.hsinghsu.testSSI.model;  
  
public class User {  
  
    private Long id;  
    private String name;  
    private String pwd;  
    private Long age;  
    private Long sex;  
  
    public Long getId() {  
        return id;  
    }  
  
    public void setId(Long id) {  
        this.id = id;  
    }  
  
    public String getName() {  
        return name;  
    }  
  
    public void setName(String name) {  
        this.name = name;  
    }  
  
    public String getPwd() {  
        return pwd;  
    }  
  
    public void setPwd(String pwd) {  
        this.pwd = pwd;  
    }  
  
    public Long getAge() {  
        return age;  
    }  
  
    public void setAge(Long age) {  
        this.age = age;  
    }  
  
    public Long getSex() {  
        return sex;  
    }  
  
    public void setSex(Long sex) {  
        this.sex = sex;  
    }     
  
} 
6、配置User映射文件  
创建包com.hsinghsu.testSSI.data。该包主要放置对应类的映射文件。  
新建User.xml,添加其sql的映射  
代码如下:
<?xml version="1.0" encoding="UTF-8"?>    
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"    
     "http://mybatis.org/dtd/mybatis-3-mapper.dtd">  
  
<mapper namespace="UserMapper">  
  
    <!-- select 语句,传参一个,返回User对象 。注:select id as id,name as name,pwd as pwd   
        的as后面的名称要与User类中属性名称要一一对应 -->  
    <select id="getUserByName" parameterType="String"  
        resultType="com.hsinghsu.testSSI.model.User">  
        select  
        id as id,name as name,pwd as pwd  
        from T_TEST_USER  
        WHERE NAME = #{name}  
    </select>  
  
    <insert id="insertUser" parameterType="com.hsinghsu.testSSI.model.User">  
        insert into  
        T_TEST_USER(ID,NAME,PWD,AGE,SEX)  
        values(#{id},#{name},#{pwd},#{age},#{sex})  
    </insert>  
  
</mapper>
五、编写java代码  
1、编写DAO接口  
新建包com.hsinghsu.testSSI.dao,创建接口UserDao。  
UserDao.java文件代码如下:
package com.hsinghsu.testSSI.dao;  
  
import com.hsinghsu.testSSI.model.User;  
  
public interface UserDao {  
      
    public User getUserByName(String name);  
  
} 
2、编写DAO实现  
新建包com.hsinghsu.testSSI.dao.impl,创建实现类UserDaoImpl。  
UserDaoImpl.java文件代码如下:
package com.hsinghsu.testSSI.dao.impl;  
  
import java.util.ArrayList;  
import java.util.HashMap;  
import java.util.List;  
import java.util.Map;  
  
import org.mybatis.spring.support.SqlSessionDaoSupport;  
import org.springframework.stereotype.Repository;  
  
import com.hsinghsu.testSSI.dao.UserDao;  
import com.hsinghsu.testSSI.model.User;  
  
@Repository(value = "userDao")  
public class UserDaoImpl extends SqlSessionDaoSupport implements UserDao {  
  
    @Override  
    public User getUserByName(String name) {  
  
        User user = new User();  
  
        // select语句,传入一个参数,返回User对象  -------------------------------------------------------------------------  
        user = getSqlSession().selectOne("UserMapper.getUserByName", name);// select语句,传入一个参数,返回User对象  
  
        //insert语句,传入一个对象  -------------------------------------------------------------------------------------  
        User oneUser = new User();  
        oneUser.setId(Long.parseLong("6"));  
        oneUser.setName("go07");  
        oneUser.setPwd("pesd07");  
        oneUser.setAge(Long.parseLong("25"));  
        oneUser.setSex(Long.parseLong("1"));  
        //int result = getSqlSession().insert("UserMapper.insertUser",oneUser);//insert语句,传入一个对象  
        //System.out.println("insert result:"+result);  
          
  
        return user;  
    }  
  
} 
3、修改action类  
编辑修改LoginAction类。  
LoginAction.java文件代码如下:
package com.hsinghsu.testSSI.action;  
  
import org.springframework.beans.factory.annotation.Autowired;  
  
import com.hsinghsu.testSSI.dao.UserDao;  
import com.hsinghsu.testSSI.model.User;  
  
public class LoginAction extends BaseAction {  
  
    /**  
     *   
     */  
    private static final long serialVersionUID = -439437585357651788L;  
  
    @Autowired  
    private UserDao userDao;  
  
    private User user;  
  
    private String username;  
    private String password;  
  
    public String execute() throws Exception {  
        user = userDao.getUserByName(username);  
        if (user != null) {  
            if (user.getPwd().equals(password)) {  
                return SUCCESS;  
            }  
        }  
        return ERROR;  
    }  
  
    public String getUsername() {  
        return username;  
    }  
  
    public void setUsername(String username) {  
        this.username = username;  
    }  
  
    public String getPassword() {  
        return password;  
    }  
  
    public void setPassword(String password) {  
        this.password = password;  
    }  
  
}  
4、新建用户登录页面。  
添加login.jsp。  
login.jsp文件代码如下:
<%@ page language="java" pageEncoding="UTF-8"%>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">  
<html>  
<head>  
<title>Insert title here</title>  
</head>  
<body>  
    <form action="mylogin.action" method="post">    
        Username:<input type="text" name="username"/><br/>    
        Password:<input type="password" name="password"/><br/>    
        <input type="submit" value="Submit"/>     
    </form>  
</body>  
</html>
5、修改struts.xml配置文件  
struts.xml文件代码如下:
<?xml version="1.0" encoding="UTF-8" ?>  
  
<!DOCTYPE struts PUBLIC  
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"  
    "http://struts.apache.org/dtds/struts-2.3.dtd">  
  
<struts>  
    <constant name="struts.objectFactory" value="spring" />  
    <constant name="struts.i18n.encoding" value="UTF-8" />  
    <constant name="struts.i18n.reload" value="false" />  
    <constant name="struts.configuration.xml.reload" value="false" />  
    <constant name="struts.custom.i18n.resources" value="globalMessages" />  
    <constant name="struts.action.extension" value="action,," />  
  
    <constant name="struts.convention.package.locators.basePackage"  
              value="com.hsinghsu.testSSI.action" />  
    <constant name="struts.convention.result.path" value="/" />  
    <constant name="struts.serve.static" value="true" />  
    <constant name="struts.serve.static.browserCache" value="false" />  
      
      
    <package name="com.hsinghsu.testSSI.action.test" extends="struts-default">  
        <action name="login" class="com.hsinghsu.testSSI.action.LoginAction">  
            <result name="success">/jsp/welcome.jsp</result>  
        </action>  
          
        <action name="mylogin" class="com.hsinghsu.testSSI.action.LoginAction">   
            <result name="success">/jsp/welcome.jsp</result>  
            <result name="error">/jsp/login.jsp</result>  
        </action>  
    </package>  
      
</struts>
6、运行tomcat,在浏览器中输入http://localhost:8686/testSSI/jsp/login.jsp 会显示登录页面,如果成功会显示welcome 。失败则会继续要求登录。  
  
注:i.文件结构为:/src/main/resources,src/main/java,并将其添加到build path中。【Java Build Path - Add Folder】  
ii./src/main/resources下文件有:struts.xml、applicationContext.xml、jdbc.oracle.properties、sqlMapConfigMybatis.xml  
src/main/java下包结构为:com.hsinghsu.testSSI.model、com.hsinghsu.testSSI.dao、com.hsinghsu.testSSI.dao.impl、com.hsinghsu.testSSI.data、com.hsinghsu.testSSI.action。  
iii.修改web的输出目录,Java Build Path - Default output folder:testSSI/WebContent/WEB-INF/classes。  
iv.添加jar包时将jar包放在WebContent/WEB-INF/lib文件夹下。
SSI技术集成Web工程实战指南 本文还有配套的精品资源,点击获取 简介:SSI整合Web工程是将SSI技术与Web应用程序集成的过程,SSI是一种服务器端脚本语言,能够在HTML页面中插入动态内容。本工程已在MyEclipse环境中配置好SSI支持,开发者可以轻松运行和调试。项目包括SSI基本概念、Web服务器和MyEclipse环境配置、HTML与SSI的结合使用、性能与安全考虑、现代Web技术的替代方... 阅读详情

相关推荐

SSI 技术集成与应用完整教程

SSI变量类似于其他编程语言中的变量。它们可以保存信息,并在页面中通过set指令来定义。变量可以在页面的任何地方被引用或修改。<p><!宏是预定义的变量,通常由系统或用户定义,用于存储常用的数据或代码段。使用#define指令可以定义宏,然后在需要时通过include指令来插入。"-->

weixin_32661831的博客 928

android的system域解耦

android的system域解耦

鹅鹅鹅的博客 3807

SSI框架代码样例

项目中新增了log4j的配置,struts2中使用json的例子如下访问地址http://localhost:8080/school/login!toJsonDemo.action

Tomcat之——SSI的配置

1.简介:   SSI全称(Server Side Includes)是在HTML静态页面中使用的指令,当页面在服务端执行的时候是可以进行服务端解析的。这种方式可以让我们在存在的HTML页面里面分块动态生成内容而不在整个执行了CGI等服务端技术的基础之上进行动态页面服务。在返回请求的页面(包含SSI指令)前,服务器会处理这些指令,并用处理的结果替换指令,然后把页面返回。我们使用Tomcat作为H

冰河的专栏 7446

SSI完整配置实例

SSI完整配置与实例,有所有的jar包,sqlServer数所库连接

SSI_DataDriven2_SSI_模态自动识别_数据驱动随机子空间识别算法_随机子空间

数据驱动随机子空间识别算法,可自动识别模态特征,包括频率、阻尼、振型

android源码结构

android源码结构 Android 2.1 |-- Makefile |-- bionic (bionic C库) |-- bootable (启动引导相关代码) |-- build (存放系统编译规则及generic等基础开发包配置) |-- cts (Android兼容性测试套件标准) |-- dalvik (dalvik JAVA虚拟机) |-- development (应用程序开发相

817

stata 代码实现熵值法计算 含常见问题解答

2.标准化①正向指标②负向指标。

m0_74825360的博客 1217

SSI开发框架搭建学习实践

对于Java来说一个典型的优势是进行Web开发,想到Web开发大家首先想到的就是MVC开发框架。MVC的开发框架,分为三个层次: 控制层:页面展现的控制,如Struts、WebWork 、Struts2等框架; 业务层:业务逻辑实现,如Spring框架; 持久层:数据的持久化(可以简单理解为从数据库读取写入数据),如Hibernate、iBatis、MyBatis等框架。 如下图所示是一个典型的M...

chendaike的博客 673

ilqr算法原理推导及代码实践

ilqr算法原理详解

Forwarding3的博客 1741

智能车新手必看:如何用PID和差速转弯让小车跑得更稳(附代码示例)

本文详细介绍了智能车控制系统中PID算法和差速转弯的实现方法,包括位置式与增量式PID的选择、参数整定技巧以及编码器反馈的关键作用。通过代码示例和实战经验,帮助新手快速掌握智能车稳定行驶的核心技术,提升赛道表现。

mmm90的博客 122

Tomcat 各版本 配置SSI服务实现html模块化所出现的问题-

进入tomcat的conf目录下进行如下配置 在context.xml中找到context节点添加privileged <Context privileged="true"></Context> //让tomcat开启特权模式 在web.xml中配置 找到含有SSI的servlet将注释打开 并添加参数 和下面一样就行 <servlet> <servlet-name>ssi</servlet-name> <servlet-.

宝贝企鹅的博客 330

(R,线性回归)R语言里的模型诊断图(Residuals vs Fitted,Normal QQ , Scale-Location ,Residuals Leverage)

线性回归,是概率统计学里最重要的统计方法,也是机器学习中一类非常重要的算法。线性模型简单理解非常容易,但是内涵是非常深奥的。尤其是线性回归模型中的Diagnostics plot的阅读与理解一直被认为是线性回归中的一个难点。 在任何线性模型中,能够直接“lm”(模型有意义),既要考虑各个参数的t-test所得出的p-value,也要考虑总体模型F-检验得出的p-value。在这之后,还要清楚一个...

qq_35837578的博客 7万+

Java SSI框架下的文件上传

对于很多的框架下面都是有不同的文件操作方法,但是在Java语言里面,很多的东西都是离开不了其核心操作。 那么我们现在就针对Java里其中一种ssi框架进行介绍。在这里面可能很多的东西都是由Struts去配置,对于我们来说,可能手动的就比较多了,不管怎么样,用起来还是很方便的。 文件的上传的: 这种东西网上有很多,也很全。我只是在这里当成笔记来记录下了。首先我们的第一步就是要有一个jsp前段的

chenyunlin1342的博客 1621

GPT-5.5 是真好用!SCI论文润色与学术写作能力上全面提升,全流程指令已整理好!

输出规范:先输出完整的摘要正文,不添加额外说明,以Markdown表格形式提供中文自检说明,表格包含两列,列标题为“检查项”和“说明”,逐项说明是否已覆盖背景、研究问题、方法、结果及贡献,并简要评价摘要结构与表达是否符合要求,除上述内容外不输出其他信息。:你是一位(学术写作专家/期刊审稿人/论文评审专家),精通学术写作规范、逻辑结构、语法准确性及学术表达方式,你的任务是帮助提升论文的质量,包括语言润色、语法检查、逻辑优化和降低重复率。语言需简洁、正式、具有概括性,不展开具体论述,仅提供结构与要点说明。

智能AI让学术科研更容易 289

基于OpenCV实现暗通道先验去雾算法及改进,效果惊人

深度技术文,前方高能

公号:一条coding 2万+

SPI通讯的软硬件NSS SSM SSI

NSS(Slave Select,从设备选择)​。

u011878611的博客 1193

Dify 本地部署教程

到这里,Dify 就安装完成了,更多操作设置可以参考官方文档,Dify 和 FastGPT 基本上差不多,也可以同时安装一下 FastGPT 进行体验~Docker Compose 部署 | Dify。

Muti-Agent 6653

Apache 如何支持SHTML(SSI)的配置方法

Apache 如何支持SHTML(SSI)的配置方法

2409_89014517的博客 1256

【低照度图像增强系列】使用MSRCR(Multi-Scale Retinex with Color Restoration)算法对低照度图像进行增强处理

【低照度图像增强系列】使用MSRCR(Multi-Scale Retinex with Color Restoration)算法对低照度图像进行增强处理

静谧、淡雅 649

win10 跳过U8环境检测的IE WebControls.rar

win10 安装u8的时候 提示IE WebControls 不通过,这个工具可以欺骗u8的检查。 跳过U8环境检测的IE WebControls。提示导入失败后,重新检测通过。

Nginx-SSI合并服务器端文件

如果你有任何疑问或想要分享的经验,请在评论区留言交流!

m0_61787196的博客 365

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

瑞萨RX MCU SSI音频传输:基于FIT API的实战配置与避坑指南

在嵌入式音频系统开发中,PCM音频数据的稳定传输是连接微控制器与外部编解码器的核心技术。其核心原理在于通过同步串行接口,在精确的位时钟与帧同步信号控制下,实现高质量数字音频流的实时收发。Firmware Integration Technology通过提供标准化的驱动API,将复杂的硬件寄存器操作抽象为清晰的生命周期管理函数,显著提升了代码的可移植性与开发效率。这套API不仅封装了通道管理、传输控制与数据读写等核心操作,还通过预编译配置支持I2S、左对齐等多种音频格式,并能灵活适配8至32位数据宽度,从而轻

weixin_34037515的博客 406

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

iis php apache nginx,在Apache、IIS和Nginx开启如何SSI?

一些网站系统可能用到了SSI,下面就分别介绍在Apache和IIS开启如何SSI?Apache(Linux / Windows 环境通用)配置 httpd.conf(在 Apache 安装目录下的 conf/ 目录下),看有没有这两行,没有就加上:AddType text/html .shtmlAddOutputFilter INCLUDES .shtml接下来到你的虚拟主机配置项里,配置如下的一...

weixin_29218509的博客 302

tomcat开放SSI功能

1、SSI是什么 SSI技术,也叫作Serve Side Includes,通常称之为服务器端包含,使用SSI技术文件默认的后缀名为.shtml; SSI技术通过在html文件中加入SSI指令,让服务器端在输出html之前解释SSI指令,并把解释完的结果和html代码一同输出给客户端。SSI指令实在服务器端执行的。 这个SSI支持的最好的是在Apache中,可以看看 http://h...

适恒 957
上一篇: Java DOM解析XML
下一篇: mybatis3常见数据操作
专注挖煤二十年
博客等级 码龄17年 140粉丝 123原创
评论 5
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

抵扣说明:

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

余额充值