将jsp文件从tomcat移动到weblogic的时候出现错误。
导致错误的代码:
<%
@ page language
=
"
java
"
contentType
=
"
text/html;charset=gb2312
"
%>
<%
@ page language="java"
import
=
"
java.sql.*
"
%>
浏览器上的错误信息:
导致错误的代码:
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
Parsing of JSP File '/index.jsp' failed:
/index.jsp(2): page directive language at /index.jsp:2 previously defined at /index.jsp:1
probably occurred due to an error in /index.jsp line 2:
<%@ page language="java" import="java.sql.*" %>
probably occurred due to an error in /index.jsp line 2:
<%@ page language="java" import="java.sql.*" %>
Mon Jan 15 14:48:28 CST 2007
解决方法:
修改代码为:
<%
@ page language
=
"
java
"
contentType
=
"
text/html;charset=gb2312
"
%>
<%
@ page
import
=
"
java.sql.*
"
%>
为何同样代码在tomcat可运行,在weblogic却要做这个修改,望路人指点,谢谢!
解决方法:
修改代码为:
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
![](https://i-blog.csdnimg.cn/blog_migrate/6810355c2f78c12e91b7997a8e8c583a.gif)
为何同样代码在tomcat可运行,在weblogic却要做这个修改,望路人指点,谢谢!