Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Eclipse Can';无法在Tomcat上运行Jsp文件,不支持的编码:_Eclipse_Jsp_Tomcat_Servlets - Fatal编程技术网

Eclipse Can';无法在Tomcat上运行Jsp文件,不支持的编码:

Eclipse Can';无法在Tomcat上运行Jsp文件,不支持的编码:,eclipse,jsp,tomcat,servlets,Eclipse,Jsp,Tomcat,Servlets,我试图在Tomcat服务器上运行一个jsp页面,但一直出现以下错误: HTTP状态500-不支持的编码: 这是我的jsp文件: <%@ page language="java" %> <%@ page import="java.util.*" %> <%@ page import="mod.catal.*" %> <%@ page import="pres.beans.*" %> <html> <head> enter c

我试图在Tomcat服务器上运行一个jsp页面,但一直出现以下错误:

HTTP状态500-不支持的编码:

这是我的jsp文件:

<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="mod.catal.*" %>
<%@ page import="pres.beans.*" %>
<html>
<head>

enter code here<title>Catégories</title>
</head>
<body bgcolor="#FFFFFF">
<%  CategorieForm cf=(CategorieForm)session.getAttribute("catForm");%>
<form method='post' action='catalogue'>
<table border='1' align='center'>
 <tr>
  <td>Chercher une catégorie:<input type='text' name='motCle' value='<%=(cf!=null)?cf.getMotCle():"" %>'></td>
<td><input type='submit' name='chercheCat' value='Chercher'></td>
</tr>
</table>
</form>
<form method='post' action='catalogue'>
<table border='1' align='center'>
<tr>
  <td>Id Catégorie<td>Nom Catégorie</td><td>Description</td>
</tr>
<tr>
 <td></td>
 <td><input type='text' name='nomCat'></td>
 <td><input type='text' name='description' size='40'></td>
 <td><input type='submit' name='addCat' va<%@ page contentType="text/html; charset=" %><%@ page contentType="text/html; charset=" %>lue='Ajouter'></td>
</tr>
 <% if(cf!=null){
  Iterator<Categorie> lesCat=cf.getLesCat().iterator();
  while (lesCat.hasNext()){
   Categorie cat=(Categorie)lesCat.next();%>
 <tr>
  <td><%=cat.getIdCat()%></td>
  <td><%=cat.getTitre()%></td>
  <td><%=cat.getDescription()%></td>
  <td><a href='catalogue?idCat=<%=cat.getIdCat()%>'>Supprimer</a></td>

 </tr>
<%
  }
  }
%>
  </table>
</form>

</body>
</html>

我试图在jsp文件中添加一个定义编码类型的头文件,但我一直得到*Unsupported encoding:*的空编码类型。

不要忘记jsp的ContentType声明中的字符集。所以

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

不要忘记JSP的ContentType声明中的字符集。所以

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>


你试过这个吗??还有问题吗?这确实有帮助,我现在还有其他问题,但是对于这个问题,你的评论有帮助,如果你在一个新的答案上重写这个评论,加上一些解释,那么我会选择它。你试过这个吗??还有问题吗?这确实有帮助,我现在还有其他问题,但是对于这个问题,你的评论有帮助,如果你在一个新的答案上重写这个评论,加上一些解释,那么我会选择它。