新手的超级菜鸟问题:struts中配置web.xml后无法显示jsp(配置前可以显示)

来源:百度知道 编辑:UC知道 时间:2024/05/24 19:12:20
我刚开始学struts,按照课本的实例写了一个,但运行时提示找不到jsp文件。我有写了一个简单的helloworld.jsp实例,还是不行。后来把web.xml换成配置前的web.xml后,可以显示helloworld.jsp,为什么配置web.xml后不能显示jsp文件,怎样改后才能显示,望高手指点!!!!!!!配置web.xml就是在以前的基础上插入了一段代码。内容:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the Licens

struts2 啊,你把FILTER改成Listener试试,还有,struts2一般后缀用 .action,不用 .do

<filter-class>
</filter-class>
org.apache.struts2.dispatcher.FilterDispatcher 可能不对
你的struts版本不一样

ISO-8859-这里变成UTF-8,意思是显示中文编码的