Spring+SpringMVC+Mybatis+Maven+CXF+WebService整合之服务端

WebService服务端项目结构:
Spring+SpringMVC+Mybatis+Maven+CXF+WebService整合之服务端
Spring+SpringMVC+Mybatis+Maven+CXF+WebService整合之服务端
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.erry</groupId>
<artifactId>HydSSMDemo2</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging> <properties>
<!-- spring版本号 -->
<spring.version>4.0.2.RELEASE</spring.version>
<!-- mybatis版本号 -->
<mybatis.version>3.2.6</mybatis.version>
<!-- log4j日志文件管理包版本 -->
<!-- <slf4j.version>1.7.7</slf4j.version> -->
<!-- <log4j.version>1.2.17</log4j.version> -->
</properties> <dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<!-- 表示开发的时候引入,发布的时候不会加载此包 -->
<scope>test</scope>
</dependency>
<!-- <dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency> --> <!-- spring核心包 -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency> <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency> <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.version}</version>
</dependency> <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency> <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.version}</version>
</dependency> <dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- mybatis核心包 -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>${mybatis.version}</version>
</dependency>
<!-- mybatis/spring包 -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.2.2</version>
</dependency> <!-- 导入java ee jar 包 -->
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency> <!-- 导入dbcp的jar包,用来在applicationContext.xml中配置数据库 -->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
</dependency> <!-- JSTL标签类 -->
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- 日志文件管理包 -->
<!-- log start -->
<!-- <dependency> -->
<!-- <groupId>log4j</groupId> -->
<!-- <artifactId>log4j</artifactId> -->
<!-- <version>${log4j.version}</version> -->
<!-- </dependency> --> <!-- 格式化对象,方便输出日志 -->
<!-- <dependency> -->
<!-- <groupId>com.alibaba</groupId> -->
<!-- <artifactId>fastjson</artifactId> -->
<!-- <version>1.1.41</version> -->
<!-- </dependency> --> <!-- <dependency> -->
<!-- <groupId>org.slf4j</groupId> -->
<!-- <artifactId>slf4j-api</artifactId> -->
<!-- <version>${slf4j.version}</version> -->
<!-- </dependency> -->
<!-- -->
<!-- <dependency> -->
<!-- <groupId>org.slf4j</groupId> -->
<!-- <artifactId>slf4j-log4j12</artifactId> -->
<!-- <version>${slf4j.version}</version> -->
<!-- </dependency> -->
<!-- log end -->
<!-- 映入JSON -->
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.13</version>
</dependency>
<!-- 上传组件包 -->
<!-- <dependency> -->
<!-- <groupId>commons-fileupload</groupId> -->
<!-- <artifactId>commons-fileupload</artifactId> -->
<!-- <version>1.3.1</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>commons-io</groupId> -->
<!-- <artifactId>commons-io</artifactId> -->
<!-- <version>2.4</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>commons-codec</groupId> -->
<!-- <artifactId>commons-codec</artifactId> -->
<!-- <version>1.9</version> -->
<!-- </dependency> --> <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.1.8</version>
</dependency>
<!--web service 以下都是cxf必备的-->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.1.8</version>
</dependency>
<!--
不加这个包会报错Unable to locate spring NamespaceHandler for XML schema
namespace [http://cxf.apache.org/jaxws]
-->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>3.1.8</version>
</dependency> <!--java实现webservice,不部署到tomcat,需要jetty包支持-->
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
<version>3.1.8</version>
</dependency> </dependencies> </project>

pom.xml

 package com.javen.model;

 import java.io.Serializable;

 public class User implements Serializable{
private Integer id; private String userName; private String password; private Integer age; public Integer getId() {
return id;
} public void setId(Integer id) {
this.id = id;
} public String getUserName() {
return userName;
} public void setUserName(String userName) {
this.userName = userName == null ? null : userName.trim();
} public String getPassword() {
return password;
} public void setPassword(String password) {
this.password = password == null ? null : password.trim();
} public Integer getAge() {
return age;
} public void setAge(Integer age) {
this.age = age;
} @Override
public String toString() {
return "User [id=" + id + ", userName=" + userName + ", password="
+ password + ", age=" + age + "]";
}
}

User

 package com.javen.dao;

 import java.util.ArrayList;
import java.util.Map; import com.javen.model.User; public interface UserMapper{ public ArrayList<User> selectAll(); public Integer selectLogin(Map map); public User selectById(int id); public void updateById(int id); public void deleteById(int id);
}

UserMapper

 <?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="com.javen.dao.UserMapper">
<resultMap id="BaseResultMap" type="com.javen.model.User">
<id column="id" jdbcType="BIGINT" property="id" />
<!-- column 代表数据库一方,property代表实体类一方 -->
<result column="user_name" jdbcType="VARCHAR" property="userName" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="age" jdbcType="BIGINT" property="age"/>
</resultMap>
<!-- resultMap返回复数的结果 -->
<select id="selectAll" resultMap="BaseResultMap">
select * from user_t
</select>
<!-- 参数类型为Map,可以有多个值,返回值类型为Integer -->
<select id="selectLogin" parameterType="Map" resultType="Integer">
select id from user_t where user_name=#{userName} and password=#{password}
</select> </mapper>

UserMapper.xml

 package com.javen.service;
import java.util.ArrayList;
import java.util.Map;
import javax.jws.WebMethod;
import javax.jws.WebService;
import com.javen.model.User;
//表示这是一个@WebService服务接口
@WebService
public interface IUserService {
//@WebMethod注解,表示服务发布时被注解的方法也会随之发布
@WebMethod
public ArrayList<User> selectAll();
@WebMethod
public Integer selectLogin(Map map);
@WebMethod
public User selectById(int id);
@WebMethod
public void updateById(int id);
@WebMethod
public void deleteById(int id); }

IUserService

 package com.javen.service.impl;

 import java.util.ArrayList;
import java.util.Map; import javax.jws.WebService; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import com.javen.dao.UserMapper;
import com.javen.model.User;
import com.javen.service.IUserService;
//这是接口的实现类。 endpointInterface属性,格式:包名.接口名
@Service
@WebService(endpointInterface="com.javen.service.IUserService")
public class UserServiceImpl implements IUserService{ @Autowired
UserMapper userDao;
// @Autowired
User user; public void deleteById(int id) {
// TODO Auto-generated method stub } public ArrayList<User> selectAll() {
ArrayList<User> user=userDao.selectAll();
return user; } public Integer selectLogin(Map map) {
return userDao.selectLogin(map);
} public User selectById(int id) {
// TODO Auto-generated method stub
return null;
} public void updateById(int id) {
// TODO Auto-generated method stub } }

UserServiceImpl

 package com.javen.controller;

 import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map; import javax.servlet.http.HttpServletRequest; //import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody; import com.javen.model.User;
import com.javen.service.IUserService; @Controller
@RequestMapping("/")
public class UserController {
@Autowired
IUserService iUserService; @RequestMapping("/")
public String login(){
return "login";
} @RequestMapping(value="loginUser",method={RequestMethod.POST})
@ResponseBody
public int loginUser(HttpServletRequest request,Model model){
System.out.println("login...");
Map map=new HashMap();
String userName=request.getParameter("userName");
String password=request.getParameter("password");
System.out.println("账号:"+userName+"\n"+"密码:"+password);
map.put("userName", userName);
map.put("password", password);
Integer id=iUserService.selectLogin(map);
System.out.println("id:"+id);
return id; } @RequestMapping("/test")
public String test(HttpServletRequest request,Model model){
System.out.println("test");
ArrayList<User> user=iUserService.selectAll();
model.addAttribute("user", user);
return "index";
}
}

UserController

 package com.javen.listener;
//import java.net.MalformedURLException;
//import javax.xml.ws.Endpoint;
//import com.javen.service.impl.UserServiceImpl; public class WebServicePublishListener{
//WebService服务发布
// public static void main(String[] args)
// throws MalformedURLException {
// Endpoint.publish("http://localhost:11111/WS_WebService", new UserServiceImpl());
//
// }
}

WebServicePublishListener

 driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
url=jdbc:sqlserver://localhost:1433;databaseName=HydSSmDemo_TEST
username=ZOOUSER
password=ZOOUSER

jdbc.properties

 <?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:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
<!-- 自动扫描该包,使SpringMVC认为包下用了@controller注解的类是控制器 -->
<context:component-scan base-package="com.javen.controller" />
<!-- 扩充了注解驱动,可以将请求参数绑定到控制器参数 -->
<mvc:annotation-driven/>
<!-- 静态资源处理 css js imgs -->
<mvc:resources location="/css/" mapping="/css/**"></mvc:resources>
<mvc:resources location="/js/" mapping="/js/**"></mvc:resources>
<!-- 启动SpringMVC的注解功能 -->
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>
<!-- 定义跳转的文件的前后缀 ,视图模式配置-->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<!-- 这里的配置我的理解是自动给后面action的方法return的字符串加上前缀和后缀,变成一个 可用的url地址 -->
<property name="prefix" value="/WEB-INF/jsp/" />
<property name="suffix" value=".jsp" />
</bean>
</beans>

spring-mvc.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:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
<!-- 自动扫描 -->
<context:component-scan base-package="com.javen" /> <!-- 引入配置文件 -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location" value="classpath:jdbc.properties" />
</bean> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="${driver}" />
<property name="url" value="${url}" />
<property name="username" value="${username}" />
<property name="password" value="${password}" />
<!-- 初始化连接大小 -->
<property name="initialSize" value="${initialSize}"></property>
<!-- 连接池最大数量 -->
<property name="maxActive" value="${maxActive}"></property>
<!-- 连接池最大空闲 -->
<property name="maxIdle" value="${maxIdle}"></property>
<!-- 连接池最小空闲 -->
<property name="minIdle" value="${minIdle}"></property>
<!-- 获取连接最大等待时间 -->
<property name="maxWait" value="${maxWait}"></property>
</bean> <!-- spring和MyBatis完美整合,不需要mybatis的配置映射文件 -->
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<!-- 自动扫描mapper.xml文件 -->
<property name="mapperLocations" value="classpath:com/javen/dao/*.xml"></property>
</bean> <!-- DAO接口所在包名,Spring会自动查找其下的类 -->
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.javen.dao" />
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
</bean> <!-- (事务管理)transaction manager, use JtaTransactionManager for global tx -->
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource" />
</bean> </beans>

spring-mybatis.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:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"
default-lazy-init="true">
<!-- 引入CXF Bean定义如下,早期的版本中使用 。 -->
<!-- 3.0以下都需要引入这三个文件,3.0以上只需要cxf.xml这一个xml文件就好 -->
<!-- <import resource="classpath*:META-INF/cxf/cxf.xml" /> -->
<!-- <import resource="classpath*:META-INF/cxf/cxf-extension-soap.xml" /> -->
<!-- <import resource="classpath*:META-INF/cxf/cxf-servlet.xml" />--> <!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 发布webservice xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
<!-- WebService的实现Bean定义 -->
<!-- com.javen.service.impl.UserServiceImpl是接口实现类
web.xml配置了webservice的访问路径/server/*,那么/server/web-publish?wsdl就是该webservice的访问路径;
该webservice的访问路径前面要加上项目的路径 localhost:8080/项目名/server/web-publish?wsdl
-->
<bean id="iUserService" class="com.javen.service.impl.UserServiceImpl" />
<!-- 1.jax-ws endpoint定义
2.implementor="#iUserService",iUserService是接口,首字母小写
3. jaxws:endpoint标签的id自定义就好
4.address="/web-publish"是服务发布的地址,和web.xml中的<url-pattern>/server/*</url-pattern>标签的值相结合-->
<jaxws:endpoint id="myService" implementor="#iUserService"
address="/web-publish">
</jaxws:endpoint>
<!--xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 发布webservice xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-->
</beans>

spring-webservice.xml

 <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>HydSSmDemo</display-name>
<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> <!-- Spring和mybatis和webservice的配置文件 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring*.xml</param-value>
</context-param>
<!-- 编码过滤器 -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<async-supported>true</async-supported>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Spring监听器 -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<!-- 防止Spring内存溢出监听器 -->
<listener>
<listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>
</listener> <!-- Spring MVC servlet -->
<servlet>
<servlet-name>SpringMVC</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring-mvc.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>SpringMVC</servlet-name>
<!-- 此处可以可以配置成*.do,对应struts的后缀习惯 -->
<url-pattern>/</url-pattern>
</servlet-mapping> <!-- ??CXF?????Servlet -->
<servlet>
<servlet-name>CXFServlet</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<!--<url-pattern>/server/*</url-pattern> 服务发布的url,和address="/web-publish"还有项目路径相互组合成完整的服务发布链接
http://localhost:8080/WS_WebService/server/web-publish?wsdl -->
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/server/*</url-pattern>
</servlet-mapping> </web-app>

web.xml

 $(function(){
$("#sub").click(function(){
var userName=$("#userName").val();
var password=$("#password").val();
$.ajax({
type:'post',
dataType:'json',
url:'./loginUser',
async: true,
data:{
userName:$("#userName").val(),
password:$("#password").val()
},
success:function(data){
if(data!=null){
alert("success");
window.location.href='./test';
}
}
});
}); $("#res").click(function(){
$("#userName").val("");
$("#password").val("");
}); });

table_Style.js

 table tr td{
text-align:center;
}

table_Style.css

 <%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link href="${pageContext.request.contextPath}/css/table_Style.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/table_Style.js"></script>
</head>
<body>
<h1 style='color:red'>Hello word!</h1>
<body>
<table id="" cellpadding="0" cellspacing="0" border="1" width="700">
<tr>
<th>序号</th><th>姓名</th><th>年龄</th>
</tr>
<c:forEach items="${user}" var="u" varStatus="stat">
<tr>
<td>${stat.index+1}</td><td>${u.userName}</td><td>${u.age}</td>
</tr>
</c:forEach>
</table>
</body>
</html>

index.jsp

 <%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-3.3.1.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/table_Style.js"></script>
</head>
<body>
<h1>Login</h1>
<table id="" cellpadding="0" cellspacing="0" border="1" width="300">
<tr>
<td align="right">登录名:</td><td>
<input type="text" id="userName" name="userName">
</td>
</tr>
<tr>
<td align="right">密码:</td><td>
<input type="password" id="password" name="password">
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="button" id="sub" value="登录">&nbsp;
<input type="reset" id="res" value="清空">
</td>
</tr>
</table> </body>
</html>

login.jsp

项目启动成功后进入 http://localhost:8080/WS_WebService/server/web-publish?wsdl 页面查看 WSDL(WebService描述语言)

项目登录页面链接: http://localhost:8080/WS_WebService/

上一篇:J2EE基础总结(1)——J2EE入门


下一篇:J2EE基础之Servlet