struts2框架在jsp页面无法解析EL表达式的问题解决
是在struts2下要解决该问题,需要两个条件:
1、确保该应用为J2EE的应用,即在web.xml下保证有以下配置信息:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
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_2_5.xsd">
以上配置信息如果是通过MyEclipse建立的应用都会有的。因此关键是下面一步:
2、在jsp页面上设置EL表达式属性,使jsp页面能够解析EL表达式:
<%@page isELIgnored="false" %>
该属性jsp页面可能无法辨别出来,但无碍于jsp页面的解析。
相关文档:
用了commons-fileupload-1.2.jar和commons-io-1.3.2.jar这两个包。
save.jsp
<%@ page language="java" contentType="text/html;charset=utf-8"%>
<%@ page import="java.util.*"%>
<%@ page import="java.io.*"%>
<%@ page import="java.util.regex.*"%>
<%@ page import="org.apache.co ......
<%@ page language="java" import="kg.TestBean2;" %>
<%@ page contentType="text/html;charset=gb2312" %>
<html>
<head>
<title>HelloBean</title>
</head>
<body>
<%--
<%
kg.TestBean2 testbean=(kg.TestBean2)session.setAttribute("testbean");
if ......
最近在自己做的项目中需要用到在线编辑器,在网上搜了下,发现了ckeditor,当然网上有好几种在线编辑器,不知道为什么选择了ckeditor,本来打算用Fckeditor的,但是看到网上还需要导入好几个JAR包,还要进行一堆配置,有点麻烦,本来项目中也就用一下,还要那么麻烦地去配置。
于是去ckeditor网站下载了最新版本的ckeditor, ......
JSP共有以下9种基本内置组件(可与ASP的6种内部组件相对应):
1.request 用户端请求,此请求会包含来自GET/POST请求的参数。
2. response 网页传回用户端的回应 。
3.pageContext 网页的属性是在这里管理 。
4.session 与请求有关的会话期。
5.ap ......
struts-config:
<action path="/articleManage" name="articleManageForm" scope="request" type="auction.action.ArticleManageAction" validate="false">
<forward name="atriclesList" path="/WEB-INF/publish/articleManage/atriclesList.jsp"/>
<forward ......