Caused by: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name /
在springmvc使用中tomcat服务出现这种问题,
<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>hello</servlet-name>
<servlet-name>/</servlet-name>
</servlet-mapping>
错把<url-pattern>/</url-pattern> 写成<servlet-name>/</servlet-name>
还有2.3版本中<servlet>应在<servlet-mapping>之前,有顺序规定,2.4则不需要
NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
需要添加Java JSTL标准标签库,jstl.jar,standard.jar,下载jakarta-taglibs-standard-1.1.2.zip这个包也可以,把lib里的jar放到项目里的/WEB-INF/lib/里即可
需要在相应的jsp中加入<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
分享到:
相关推荐
<servlet-name>registerServlet</servlet-name> <servlet-class>servlet.registerServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>registerServlet</servlet-name> <url-pattern>/...
<servlet-name>HelloWorldname</servlet-name> <!-- 此说明该<servlet/> 已经得到了注册名HelloWorldname, 既此servlet已经得到了注册名HelloWorldname, 它与<servlet-mapping/>必须注册同样的注册名 --> ...
<servlet-name>DisplayChart</servlet-name> <servlet-class>org.jfree.chart.servlet.DisplayChart</servlet-class> </servlet> <servlet-mapping> <servlet-name>DisplayChart</servlet-name> ...
<servlet-name>Quercus Servlet</servlet-name> <servlet-class>com.caucho.quercus.servlet.QuercusServlet</servlet-class> <param-name>license-directory</param-name> <param-value>WEB-INF/licenses</...
<servlet-name>AxisServlet</servlet-name> <servlet-class> org.apache.axis.transport.http.AxisServlet </servlet-class> </servlet> <servlet> <servlet-name>AdminServlet</servlet-name> ...
<servlet-name>XFireServlet</servlet-name> <servlet-class>org.codehaus.xfire.spring.XFireSpringServlet</servlet-class> </servlet> <!-- 用来管理Webservice的Servlet --> <servlet-mapping> ...
</init-param><br/> <init-param><br/> <param-name>height</param-name><br/> <param-value>20</param-value><br/> </init-param><br/> </servlet><br/> <br/> <servlet-mapping><br/> <servlet-name>checkimage</...
<servlet-name>CheckCodeImage</servlet-name> <servlet-class>com.netshop.common.util.CheckCodeImage</servlet-class> </servlet> <servlet-mapping> <servlet-name>CheckCodeImage</servlet-name> ...
<servlet-name>GetPostTestDemo</servlet-name> <url-pattern>/servlet/GetPostTestDemo</url-pattern> </servlet-mapping> 服务器端(java端) 当你在android端点击post按钮时。会输出:接受post成功 当你在...
1、 导入dwr.jar包 2、 在web.xml中配置dwr,如下: <!-- 配置DWR --> <servlet> <servlet-name>dwr-... <servlet-mapping> <servlet-name>dwr-invoker</servlet-name> <url-pattern>/dwr/*</url-pattern>
<servlet-name>velocity</servlet-name> <servlet-class>org.apache.velocity.tools.view.VelocityViewServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>velocity</servlet-name> *....
<servlet-name>account</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet...
<servlet-name>freemarker</servlet-name> <servlet-class>org.apache.struts2.views.freemarker.FreemarkerServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>freemarker</servlet-...
<servlet-name>JspServlet</servlet-name> <jsp-file>/jsp/example.jsp</jsp-file> </servlet> ``` ##### 3. `<servlet-mapping>` 元素 - **`<servlet-name>`**:此元素用于指定前面定义的Servlet的名字,必须...
<servlet-name>MyServlet</servlet-name> <servlet-class>com.example.MyServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>MyServlet</servlet-name> <url-pattern>/myservice</url-...
<servlet-name>Connector</servlet-name> <servlet-class>net.fckeditor.connector.ConnectorServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name...
【JSP/Servlet技术开发新闻发布系统】 在Web开发领域,JSP(JavaServer Pages)和Servlet是两种核心的技术,常用于构建动态、交互式的Web应用程序,如新闻发布系统。本项目"使用JSP/Servlet技术开发新闻发布系统...
<servlet-name>MyServlet</servlet-name> <servlet-class>com.example.MyServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>MyServlet</servlet-name> <url-pattern>/myServlet</url-...
<servlet-name>JspServlet1</servlet-name> <servlet-class>com.demo.JspServletDemo</servlet-class> </servlet> <servlet-mapping> <servlet-name>JspServlet1</servlet-name> <url-pattern>/JspServlet</url-...
- 在`web.xml`部署描述符中,你可以通过`<servlet>`和`<servlet-mapping>`元素来定义和映射Servlet。例如,可以为每个Servlet设置唯一的`<url-pattern>`,使得客户端可以通过特定URL访问Servlet。 3. **Servlet...