Html JSP中的form:form标记不断出现错误
我一直收到一个错误,说文本/在表单中的位置无效:表单 缺少表单的结束标记:表单 和未知标记形式:表单Html JSP中的form:form标记不断出现错误,html,spring,spring-mvc,jsp,model-view-controller,Html,Spring,Spring Mvc,Jsp,Model View Controller,我一直收到一个错误,说文本/在表单中的位置无效:表单 缺少表单的结束标记:表单 和未知标记形式:表单 <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <form action ="some
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<form action ="some.jsp" class="form">
<title>choose a country</title>
</head>
<body>
<h1>choose your next destination</h1>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial- scale=1.0">
<style>
* {
box-sizing: border-box;
}
.autocomplete {
position: relative;
display: inline-block;
}
input {
border: 1px solid transparent;
background-color: #f1f1f1;
padding: 10px;
font-size: 16px;
}
input[type=text] {
background-color: #f1f1f1;
width: 100%;
}
input[type=submit] {
background-color: DodgerBlue;
color: #fff;
cursor: pointer;
}
.autocomplete-items {
position: centre;
border: 1px solid #d4d4d4;
border-bottom: none;
border-top: none;
z-index: 99;
top: 100%;
left: 0;
right: 0;
}
.autocomplete-items div {
padding: 10px;
cursor: pointer;
background-color: #fff;
border-bottom: 1px solid #d4d4d4;
}
.autocomplete-items div:hover {
background-color: #e9e9e9;
}
.autocomplete-active {
background-color: DodgerBlue !important;
color: #ffffff;
}
</style>
</head>
<body>
<h2>Travel the world</h2>
<p>choose a country you'd like to go</p>
<form:form method = "GET" action=addcountry/country/ model attribute = "model" autocomplete="off">
<div class="autocomplete" style="width:300px;">
<input id="myInput" type="text" name="myCountry" placeholder="Country">
</div>
<input type=submit value ="lets go" class="btn btn-default"/>
</form>
<script>
我遇到的问题是什么?以前没有,现在问题似乎不会消失。导致此错误的原因是什么?我如何着手修复此错误?
谢谢大家! 你必须做一些事情: 将JSP文件添加到文件的顶部。 使用not by HTML关闭Spring表单标记
您没有关闭标签表单:表单,您只是关闭表单。还为表单导入taglib