最简单的struts2-convention-plugin2.2.1的例子
来源:百度文库 编辑:神马文学网 时间:2024/04/28 14:53:12
环境说明:MyEclipse 8.6.1JDK1.6.0_21Tomcat 6.0.29 项目结构如下: web.xml
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_2_5.xsd">
struts2
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter
struts2
/*
index.jsp
struts.xml
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
index.jsp <%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
My JSP 'index.jsp' starting page
This is my JSP page.
hello-world.jsp
Hello world!
以上为所有项目文件代码,jar包为官方包。。。 运行截图 使用struts convention一定要细心!弄了一天,终于好了,结果还不知道到底刚开始是哪里错了 另:最好不要配, 和
/page/error.jsp
刚开始一直是默认跳到error.jsp后注释了这两个之后就正常了。。。不知道大家碰到过这种问题没。。。
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
struts.xml
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
This is my JSP page.
hello-world.jsp
Hello world!
以上为所有项目文件代码,jar包为官方包。。。 运行截图 使用struts convention一定要细心!弄了一天,终于好了,结果还不知道到底刚开始是哪里错了 另:最好不要配,
最简单的struts2-convention-plugin2.2.1的例子
struts2.0简单的例子
类的简单例子
一个spring的简单例子
一个简单的XML Schema的例子
简单的列表框ListBox的例子
C# Remoting的一个简单例子
以一个最简单的例子把OO的JavaScript说明白
以一个最简单的例子把OO的JavaScript说明白
电脑培训:理解面向对象编程的简单例子
对Jena的简单理解和一个例子_1
对Jena的简单理解和一个例子_2
对Jena的简单理解和一个例子_1
对Jena的简单理解和一个例子_2
对Jena的简单理解和一个例子
Struts2的各种技术
eclipse的struts2插件
struts2的小知识
抽象工厂的例子
一个BPEL的例子
一个BPEL的例子
CommomDialog使用的例子
管理人性化的例子
犹太人的小例子