SpringMVC一直报404,实在找不出问题

环境是eclipse+maven

图片说明
图片说明
图片说明

8个回答

你不懂springmvc的跳转流程吗?

第一点 你把第二张图40行的改成 “/” ,
第二点 把index.jsp放到WebRoot下试试

cai772088996
cai772088996 是的!这种也不行
大约 3 年之前 回复
FiangAsDre
GreenRookie 回复cai772088996: 什么都不改 就在return “/index” 这样都不行吗?
大约 3 年之前 回复
cai772088996
cai772088996 回复FiangAsDre: 还是不行哈亲
大约 3 年之前 回复
FiangAsDre
GreenRookie 按照你这配置做了个demo,问题错误就是你return “index”,问题,变成return “/index”正常
大约 3 年之前 回复

工程名是不是设置了?
web.xml 全帖出来

cai772088996
cai772088996 直接访问工程也是404哦
大约 3 年之前 回复
caogang_90
caogang_90 回复cai772088996:你直接访问工程名试试看能不能访问到默认页面
大约 3 年之前 回复
cai772088996
cai772088996 就是图里的了亲,抬头为:<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"> <display-name>Archetype Created Web Application</display-name>
大约 3 年之前 回复
  <?xml version="1.0" encoding="UTF-8"?>

xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
Archetype Created Web Application

encodingFilter
/*

<servlet>
    <servlet-name>SpringMVC</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:spring-mvc.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    <async-supported>true</async-supported>
</servlet>
<servlet-mapping>
    <servlet-name>SpringMVC</servlet-name>
    <url-pattern>/</url-pattern>
</servlet-mapping>
<welcome-file-list>
    <welcome-file>/index.jsp</welcome-file>
</welcome-file-list>
</web-app>  

少了元数据扫描路径吧

  <!-- 元数据扫描 -->  
     <context:component-scan base-package="com.javen.*"></context:component-scan>
cai772088996
cai772088996 context:component-scan base-package="com.javen.controller",这个com.javen.controller不就是我的路径了吗亲
大约 3 年之前 回复
AbsenceOfTrace
这很耳东先生 回复cai772088996:要加扫描路径~那句只是支持元数据
大约 3 年之前 回复
cai772088996
cai772088996 有这句亲,第二张图的第一句就是了
大约 3 年之前 回复

context:component-scan base-package="com.javen.controller",这个com.javen.controller不就是我的路径了吗亲

xml上面有加这个吗

 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:context="http://www.springframework.org/schema/context"   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd    http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd  http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"     default-lazy-init="false">  
cai772088996
cai772088996 有的,抬头都是直接拷贝的老师教程,一个不少
大约 3 年之前 回复

你们老师没告诉你可以不在类上写注解,但是方法要写@RequestMapping嘛!

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
SpringMVC访问路径正确但是一直报404问题
环境:eclipse霓虹灯版+jdk1.8+Tomcat 9+jar是4.16版本 目录结构如下: web.xml中的配置如下: springmvc-servlet.xml配置如下: hello.jsp页面部分代码 访问路径: 页面报错,jQuery路径找不到 后台提示错误是Handler没有映射 org.springframework.web.serv...
简单的struts2一直报404
开发环境 eclipse 4.4 + jre7 + tomcat8.0.9 + struts2.3.16rnrn[img=https://img-bbs.csdn.net/upload/201408/17/1408285839_422343.png][/img]rnrn导入包rncommons-logging-1.13rnfreemarker-2.3.19rnognl-3.0.6rnstruts2-core-2.3.16.3rnxwork-core-2.3.16.3rncommons-fileupload-1.3.1rnrnweb.xmlrnrnrnrn StrutsDemo1rn rn rn struts2rn org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilterrn rn rn rn struts2rn /*rn rn rn rn index.jsprn rnrnrnrnrnstruts.xmlrnrnrnrnrnrn rn rn /index.jsprn rn rnrnrnrnrn在使用tomcat8.0运行报错rnrn八月 17, 2014 10:28:58 下午 org.apache.struts2.dispatcher.Dispatcher errorrn严重: Dispatcher initialization failedrnjava.lang.RuntimeException: java.lang.reflect.InvocationTargetExceptionrn at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:301)rn at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)rn at com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:207)rn at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)rn at com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:93)rn at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:487)rn at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:484)rn at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:584)rn at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)rn at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:340)rn at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:229)rn at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)rn at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)rn at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)rn at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)rn at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)rn at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)rn at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)rn at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4603)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5210)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)rn at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)rn at java.util.concurrent.FutureTask.run(FutureTask.java:166)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)rn at java.lang.Thread.run(Thread.java:722)rnCaused by: java.lang.reflect.InvocationTargetExceptionrn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:601)rn at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)rn ... 28 morernCaused by: java.lang.ExceptionInInitializerErrorrn at com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:84)rn ... 33 morernCaused by: java.lang.IllegalArgumentException: Javassist library is missing in classpath! Please add missed dependency!rn at ognl.OgnlRuntime.(OgnlRuntime.java:168)rn ... 34 morernCaused by: java.lang.ClassNotFoundException: javassist.ClassPoolrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1324)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Class.java:186)rn at ognl.OgnlRuntime.(OgnlRuntime.java:165)rn ... 34 morernrn八月 17, 2014 10:28:58 下午 org.apache.catalina.core.StandardContext filterStartrn严重: Exception starting filter struts2rnjava.lang.reflect.InvocationTargetException - Class: com.opensymphony.xwork2.inject.ContainerImpl$MethodInjectorrnFile: ContainerImpl.javarnMethod: injectrnLine: 301 - com/opensymphony/xwork2/inject/ContainerImpl.java:301:-1rn at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:501)rn at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57)rn at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)rn at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)rn at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:105)rn at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4603)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5210)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)rn at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)rn at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)rn at java.util.concurrent.FutureTask.run(FutureTask.java:166)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)rn at java.lang.Thread.run(Thread.java:722)rnCaused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetExceptionrn at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:301)rn at com.opensymphony.xwork2.inject.ContainerImpl$ConstructorInjector.construct(ContainerImpl.java:438)rn at com.opensymphony.xwork2.inject.ContainerBuilder$5.create(ContainerBuilder.java:207)rn at com.opensymphony.xwork2.inject.Scope$2$1.create(Scope.java:51)rn at com.opensymphony.xwork2.inject.ContainerBuilder$3.create(ContainerBuilder.java:93)rn at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:487)rn at com.opensymphony.xwork2.inject.ContainerBuilder$7.call(ContainerBuilder.java:484)rn at com.opensymphony.xwork2.inject.ContainerImpl.callInContext(ContainerImpl.java:584)rn at com.opensymphony.xwork2.inject.ContainerBuilder.create(ContainerBuilder.java:484)rn at com.opensymphony.xwork2.config.impl.DefaultConfiguration.createBootstrapContainer(DefaultConfiguration.java:340)rn at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:229)rn at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)rn at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)rn at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)rn ... 15 morernCaused by: java.lang.reflect.InvocationTargetExceptionrn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)rn at java.lang.reflect.Method.invoke(Method.java:601)rn at com.opensymphony.xwork2.inject.ContainerImpl$MethodInjector.inject(ContainerImpl.java:299)rn ... 28 morernCaused by: java.lang.ExceptionInInitializerErrorrn at com.opensymphony.xwork2.ognl.OgnlValueStackFactory.setContainer(OgnlValueStackFactory.java:84)rn ... 33 morernCaused by: java.lang.IllegalArgumentException: Javassist library is missing in classpath! Please add missed dependency!rn at ognl.OgnlRuntime.(OgnlRuntime.java:168)rn ... 34 morernCaused by: java.lang.ClassNotFoundException: javassist.ClassPoolrn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1324)rn at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177)rn at java.lang.Class.forName0(Native Method)rn at java.lang.Class.forName(Class.java:186)rn at ognl.OgnlRuntime.(OgnlRuntime.java:165)rn ... 34 morernrn八月 17, 2014 10:28:58 下午 org.apache.catalina.core.StandardContext startInternalrn严重: Error filterStart
springmvc页面报404错误解决
最近开始学习使用springmvc, 第一个列子是配置了一个视图 controller代码如下: package com.cotroller; import com.fasterxml.jackson.core.JsonProcessingException; import org.springframework.stereotype.Controller; import org.spring
springMVC一直404是哪里的问题啊?
[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/1.gif][/img]rn这配置也看着没啥问题啊。。求指点rn[color=#FF0000]springmvc.xml配置[/color]rn[code=java]rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn[/code]rnrn[color=#FF0000]web.xml配置[/color]rn[code=java]rn rnrn SpringMVCrn rn org.springframework.web.context.ContextLoaderListenerrn rn rn rn SpringConfigrn rn org.springframework.web.servlet.DispatcherServletrn rn rn contextConfigLocationrn rn /WEB-INF/config/springmvc-config.xmlrn rn rn 1rnrnrn SpringConfigrn /rnrn rnrn[/code]rnrn[color=#FF0000]Controller类(就只截了输入的页面了)[/color]rn[code=java]rn rn @RequestMapping(value="/book_list")rn public String bookList(Model model)rn logger.info("book_list");rn List books=bookService.getAllBooks();rn model.addAttribute("books", books);rn rn return "BookList";rn rn rn[/code]rnrn求大佬们帮帮忙了
学springMVC中,明明能跑的服务器,突然一直报404了
遇到问题的过程:  学习springmvc,界面返回一直用的jsp,上面要求改成返回json格式,所以就需要加入 Jackson-all.jar的包,但是一开始加包时,加错了,发现后直接在工程里右键删除了.....之后启动tomcat不报错,但是访问页面时,就一直是404错误. 解决的办法: 选中项目右键->properties ->java build path ->Libraries 把
实在找不出错误在哪里?
这是一个data.cpprn在main.cpp使用extern 使用这些数据,rn[code=C/C++]#include "glhelper.h"rnfloat item1[14][2] =rn rn 32.598f,120.498f,rn 32.597f,120.524f,rn 32.590f,120.560f,rn 32.575f,120.641f,rn 32.571f,120.696f,rn 32.570f,120.735f,rn 32.572f,120.757f,rn 32.577f,120.785f,rn 32.581f,120.808f,rn 32.593f,120.832f,rn 32.605f,120.864f,rn 32.612f,120.874f,rn 32.617f,120.879f,rn 32.617f,120.896frn;rnfloat item2[24][2] =rn rn 32.633f,120.698f,rn 32.598f,120.698f,rn 32.571f,120.697f,rn 32.570f,120.735f,rn 32.572f,120.757f,rn 32.577f,120.785f,rn 32.581f,120.808f,rn 32.589f,120.828f,rn 32.565f,120.841f,rn 32.555f,120.848f,rn 32.540f,120.851f,rn 32.512f,120.854f,rn 32.464f,120.855f,rn 32.446f,120.853f,rn 32.422f,120.853f,rn 32.402f,120.850f,rn 32.382f,120.843f,rn 32.349f,120.846f,rn 32.337f,120.850f,rn 32.300f,120.872f,rn 32.274f,120.877f,rn 32.258f,120.873f,rn 32.216f,120.883f,rn 32.190f,120.890frn;rnfloat item3[13][2] =rnrn 32.448f,120.544f,rn 32.440f,120.609f,rn 32.437f,120.665f,rn 32.434f,120.697f,rn 32.437f,120.745f,rn 32.449f,120.795f,rn 32.463f,120.841f,rn 32.464f,120.858f,rn 32.464f,120.883f,rn 32.465f,120.895f,rn 32.467f,120.903f,rn 32.495f,120.954f,rn 32.512f,120.988frn;rnrnfloat item4[24][2] =rn rn 32.5222f,120.5380f,rn 32.5211f,120.5545f,rn 32.5193f,120.5727f,rn 32.5196f,120.5952f,rn 32.5184f,120.6028f,rn 32.5152f,120.6198f,rn 32.5146f,120.6366f,rn 32.5141f,120.6494f,rn 32.5118f,120.6566f,rn 32.5107f,120.6735f,rn 32.5134f,120.6791f,rn 32.5132f,120.7071f,rn 32.5128f,120.7609f,rn 32.5088f,120.8268f,rn 32.5078f,120.8390f,rn 32.5180f,120.8806f,rn 32.5201f,120.8937f,rn 32.5154f,120.9233f,rn 32.5093f,120.9398f,rn 32.5080f,120.9575f,rn 32.5110f,120.9662f,rn 32.5128f,120.9886f,rn 32.5319f,121.0f,rn 32.5676f,121.022frn;[/code]rnrnrnVS2008 报错如下: rnrn1>------ 已启动生成: 项目: editor, 配置: Release Win32 ------rn1>正在编译...rn1>data.cpprn1>.\data.cpp(21) : error C2146: 语法错误 : 缺少“”(在标识符“,120”的前面)rn1>.\data.cpp(21) : error C2146: 语法错误 : 缺少“”(在标识符“,120”的前面)rn1>.\data.cpp(21) : error C2146: 语法错误 : 缺少“;”(在标识符“,120”的前面)rn1>.\data.cpp(21) : error C2143: 语法错误 : 缺少“;”(在“常量”的前面)rn1>.\data.cpp(21) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrn1>.\data.cpp(21) : error C2143: 语法错误 : 缺少“;”(在“”的前面)rn1>.\data.cpp(21) : error C2059: 语法错误 : “”rn1>.\data.cpp(22) : error C2143: 语法错误 : 缺少“;”(在“”的前面)rn1>.\data.cpp(22) : error C2447: “”: 缺少函数标题(是否是老式的形式表?)rn1>.\data.cpp(23) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(24) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(25) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(26) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(27) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(28) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(29) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(30) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(31) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(32) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(33) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(34) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(35) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(36) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(37) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(38) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(39) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(40) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(41) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(42) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(43) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(44) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(45) : error C2059: 语法错误 : “”rn1>.\data.cpp(45) : error C2143: 语法错误 : 缺少“;”(在“”的前面)rn1>.\data.cpp(45) : error C2059: 语法错误 : “”rn1>.\data.cpp(48) : error C2146: 语法错误 : 缺少“”(在标识符“,120”的前面)rn1>.\data.cpp(48) : error C2146: 语法错误 : 缺少“”(在标识符“,120”的前面)rn1>.\data.cpp(48) : error C2146: 语法错误 : 缺少“;”(在标识符“,120”的前面)rn1>.\data.cpp(48) : error C2143: 语法错误 : 缺少“;”(在“常量”的前面)rn1>.\data.cpp(48) : error C4430: 缺少类型说明符 - 假定为 int。注意: C++ 不支持默认 intrn1>.\data.cpp(48) : error C2086: “int ,120”: 重定义rn1> .\data.cpp(21) : 参见“,120”的声明rn1>.\data.cpp(48) : error C2143: 语法错误 : 缺少“;”(在“”的前面)rn1>.\data.cpp(48) : error C2059: 语法错误 : “”rn1>.\data.cpp(49) : error C2143: 语法错误 : 缺少“;”(在“”的前面)rn1>.\data.cpp(49) : error C2447: “”: 缺少函数标题(是否是老式的形式表?)rn1>.\data.cpp(50) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(51) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(52) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(53) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(54) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(55) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(56) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(57) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(58) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(59) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(60) : error C2470: “,”: 看起来像函数定义,但没有参数列表;跳过明显的函数体rn1>.\data.cpp(61) : error C2059: 语法错误 : “”rn1>.\data.cpp(61) : error C2143: 语法错误 : 缺少“;”(在“”的前面)rn1>.\data.cpp(61) : error C2059: 语法错误 : “”rn1>.\data.cpp(64) : error C2143: 语法错误 : 缺少“;”(在“”的前面)rn1>.\data.cpp(64) : error C2447: “”: 缺少函数标题(是否是老式的形式表?)rn1>.\data.cpp(90) : fatal error C1004: 发现意外的文件尾rn1>生成日志保存在“file://g:\OpenGL\editor\Release\BuildLog.htm”rn1>editor - 61 个错误,0 个警告rn========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========
实在找不出错误的原因,,^_^
程序很简单,,是定义十个分数,从中找出各个阶段的数,,但我返回就会出错 rnrndate segmentrna db 76,69,84,90,73,88,99,63,100,80rns6 db 0 ;60~69rns7 db 0rns8 db 0rns9 db 0rns10 db 0rncrlf db 13,10,'$'rnrndate endsrnrncode segmentrnmain proc farrnassume cs:code,ds:daternrnstart:rnmov ax,daternmov ds,axrncall sortrnrnmov cx,5rnlea si,s6rngo_on:rnmov dl,ds:[si]rnadd dl,30hrnmov ah,02hrnint 21hrnlea dx,crlfrnmov ah,09hrnint 21hrninc sirnloop go_onrnrnrnmov ax,4c00hrnint 21hrnrnmain endprnrnrnsort proc nearrnrnmov dx,10rnlea si,arnmov cx,10rnnext:rncmp byte ptr [si],69rnjbe add_s6rncmp byte ptr [si],79rnjbe add_s7rncmp byte ptr [si],89rnjbe add_s8rncmp byte ptr [si],99rnjbe add_s9rnjmp add_s10rnrnadd_s6:rninc s6rndec dxrncmp dx,0rnjb exitrninc sirnjmp nextrnrnadd_s7:rninc s7rndec dxrncmp dx,0rnjb exitrninc sirnjmp nextrnrnadd_s8:rninc s8rndec dxrncmp dx,0rnjb exitrninc sirnjmp nextrnrnadd_s9:rninc s9rndec dxrncmp dx,0rnjb exitrninc sirnjmp nextrnrnadd_s10:rninc s10rndec dxrncmp dx,0rnjb exit rninc sirnjmp nextrnexit: rn retrnsort endprnrncode endsrnend startrn rnrnrnrnrnrn
SpringMvc接受json参数报404问题解决
先说下SpringMvc接受Json格式的几种方式 1可以直接 @RequestBody String json中接收json格式字符串 输出 {&quot;name&quot;:&quot;tom&quot;,&quot;age&quot;:&quot;12&quot;} 2可以定义一个对象来接收参数,@RequestBody UserTest user,前提是对象中的属性要和请求的参数名称和类型要对应 注意:这里对象的定义要是一个POJO,不要用内部...
springMVC,请求无法到达controller,报404
导语: 遇到404,大家都清楚是请求路径的问题,要么是没有这个路径,要么请求路径和实际路径不一致。springMVC的项目,访问时,404时,后台也不会有任何提示。所以就得寻根溯源,一点点捋。 问题描述: 浏览器访问路径没有问题,controller路径映射也没有问题,那么为什么会404呢。大家一定在网上看到了很多关于配置的问题,为什么在此不描述呢?因为这个项目是个成型的项目,基础配置肯定没...
springMVC报404需考虑的因素
1.web.xml文件中配置: springmvc org.springframework.web.servlet.DispatcherServlet contextConfigLocation classpath:springmvc-servlet.xml 1 springmvc *.do 这里设置找的xml是classpath下的spring
SpringMvc 界面jquery报404 无法解决
web.xml:rn rn rn springmvcrn org.springframework.web.servlet.DispatcherServletrn rn contextConfigLocationrn classpath:spring/spring-mvc.xmlrn rn 1rn rn rn rn springmvcrn rn /rn rn不管是用*.do还是/都不行。rn后来在spring-mvc.xml中配置 也不管用,求解啊rnrn谷歌控制台:query:8 Uncaught ReferenceError: $ is not defined at query:8
Restful的SpringMvc中返回ModelAndView报404
如果方法返回string时可以访问,换成返回ModelAndView就成404了,rn希望来个高手帮解决一下[img=https://forum.csdn.net/PointForum/ui/scripts/csdn/Plugin/003/onion/3.gif][/img]rnController:rn[code=java]@Scope("prototype")rn@RestControllerrn@RequestMapping("/products")rnpublic class TestController rnrn private static Log log = LogFactory.getLog(TestController.class);rn rn static rn log.info("****************************************************************************");rn rnrn @RequestMapping("/show")rn public ModelAndView show() rn// public String show() rn String msg = "hello";rn return new ModelAndView("hello","msg",msg);rn// return msg;rn rn rn rn[/code]rnweb.xml:rn[code=html]rn appServletrn org.springframework.web.servlet.DispatcherServletrn rn contextConfigLocationrn classpath:springmvc-servlet.xmlrn rn 1rn rnrn rn appServletrn /rn [/code]rnspringmvc-servlet.xml:rn[code=html]rn rn rn rn rn rn /pages/rn rn rn .jsprn rn [/code]rn项目结构目录:rn[img=https://img-bbs.csdn.net/upload/201504/14/1428985661_268527.png][/img]rn返回ModelAndView的结果rn[img=https://img-bbs.csdn.net/upload/201504/14/1428985715_224282.png][/img]rn返回String的结果rn[img=https://img-bbs.csdn.net/upload/201504/14/1428986350_240955.png][/img]
SpringMvc ajax 404 问题
使用spring springMVc 在ajax返回值时候出现了404 错误rnController 代码rn[code=java]@RequestMapping(value = "/login")rn public Object login(Model model, HttpSession session) rn Map map = new HashMap();rn*************************************rn XXXXX登录验证 rn if(Tools.isEmpty(errInfo))rn errInfo =CONST.PD_SUCCESS; //验证成功rn rn-->>最后的maprn map.put("result", errInfo);rn // AppUtil.returnObject(new PageData(), map);rn return map;rn[/code] rnrn AJAXrn[code=html]rn $.ajax(rn type: "POST",rn url: '<%=path%>/user/login.do',rn data: ****,rn dataType:'text',rn cache: false,rn success: function(data)rn alert(data)rn if("success" == data.result)rn saveCookie();rn window.location.href="main/index";rn rn ,rn error: function(XMLHttpRequest, textStatus, errorThrown) rn alert(XMLHttpRequest.status);rn alert(XMLHttpRequest.readyState);rn alert(textStatus);rn rn );rn[/code]rnrn下面是报的错:rn[img=https://img-bbs.csdn.net/upload/201606/27/1467011744_591969.jpg][/img]rnPS;已经跑到后台数据库 设置了 result的值
springMvc的404的问题
404情况一般就是路径的问题,分为如下几种: 1、springmvc扫描配置的问题,即访问路径的问题,仔细检查扫描配置路径是否正确 2、进入了方法还是404,那就说明返回路径有问题,其他报错就是500内部错误,返回路径主要是页面是否存在,重定向路径是否能够访问等等 3、还有一种特殊的就是配置方面的拦截,也就是我遇到的这种 能够登录但看不到菜单等等,其他的请求有部分都404,没进去contr
报404
如果发现404的错误: 1.首先请检查spring配置文件是否将对应的service实现类引入 如: 2.检查路径是否正确
求救,springMVC为什么一直报找不到controller
看着视频自学springMVC,但是现在总是报这个错误 No mapping found for HTTP request with URI [/springMVC2/user/data/toUser] in DispatcherServlet with name 'springMVC2',网上的各种方法都试过了。实在是没办法了,求大神帮忙……rn[code=java]package com.rfid.annotion;rnrnimport javax.servlet.http.HttpServletRequest;rnrnimport org.springframework.stereotype.Controller;rnimport org.springframework.web.bind.annotation.RequestMapping;rnrn@Controllerrn@RequestMapping("/user/data")rnpublic class SpringAnntion rn rn @RequestMapping("/addUser")rn public String addUser(String userName,String password,HttpServletRequest request)rn rn request.setAttribute("userName", userName);rn request.setAttribute("password", password);rn return "/userManager";rn rn rn @RequestMapping("/delUser")rn public String delUser(HttpServletRequest request)rn String result ="this is delUser------优化版";rn request.setAttribute("result", result);rn return "/jquery";rn rn @RequestMapping("/toUser")rn public String toUser(HttpServletRequest request)rn return "/addUser";rn rn[/code]rn[code=text]rn<%@ page language="java" contentType="text/html; charset=UTF-8"rn pageEncoding="UTF-8"%>rn<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>rnrnrnrn rn rn Insert title herern rnrnrn rn 用户名 :rn 密码:rn rn rn rn rn rnrnrnrn[code=text]rnrnrn springMVC1rn rn index.htmlrn index.htmrn index.jsprn default.htmlrn default.htmrn default.jsprn rn rn rn springMVC2rn org.springframework.web.servlet.DispatcherServletrn rn contextConfigLocationrn classpath*:config/spring-servlet.xmlrn rn 1rn rn rn rn rn rn springMVC2rn /rn rnrn[code=text]rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn[/code]rn[/code]rn[/code]rn
高手帮忙,实在找不出原因
Extjs的combox组件没有办法加载数据rn代码如下:rnvar deptselect = new Ext.data.Store(rn reader:new Ext.data.JsonReader(rn root:'root',rn fields:['id','name']rn ),rn proxy:new Ext.data.HttpProxy(rn url:'fbinfo.do?method=initDeptCombo'rn )rn);rnrnvar formpanel = Ext.create('InfoFB_FormPanel',rn layout:'form',rn labelWidth:80,rn labelAlign :'right',rn items:[rn layout:'column',rn frame:true,rn items:[rn xtype:'combo',rn id:'fbdept_id',rn name:'fbdept',rn hiddenName:'sub_fbdept', rn columnWidth:.6,rn allowBlank:false,rn fieldLabel:'反馈科室',rn emptyText:'--请选择--',rn store:deptselect,rn mode:'remote',rn loadingText:'loading',rn displayField:'name',rn valueField:'id',rn forceSelection:true,rn typeAhead:truern ]rn);rnrnvar infofbForm = function()rn var infofbWin = Ext.create('hosp.view.InfoFB',rn modal:true,rn resizable :false,rn constrain:true,rn closeAction:'hide',rn items:formpanelrn );rn infofbWin.show();rn;rnaction部分:rnpublic ActionForward initDeptCombo(ActionMapping mapping, ActionForm form,rn HttpServletRequest request, HttpServletResponse response)rn throws Exception rn response.setContentType("text/html;charset=utf-8"); rn PrintWriter out = null;rn BrowseSvr bssvr = null;rn String json = "";rn tryrn bssvr = new BrowseSvrImp();rn json = bssvr.initDeptCombo();rn out = response.getWriter();rn out.write(json); //json值:"root":["id":"500","name":"网络管理科"]rn System.out.println(json);rn catch(MyException e)rn throw new MyException("初始化加载部门信息失败!");rn rn out.flush();rn out.close();rnrn return null;rn rnjson值:"root":["id":"500","name":"网络管理科"]
python 运行实在找不出错误
[img=https://img-bbs.csdn.net/upload/201805/08/1525753670_870936.png][/img]rn求大佬解答
iis8.5部署wcf rest service的问题,一直报404的错误
之前在iis6.0上部署加了.net映射后就能正常访问了,iis8.5上就一直报404的问题,求大牛帮帮忙,给点资料(快被搞疯了)
记录一次Springmvc访问controller一直404的问题
具体配置SpringMvc就不再赘述了 具体配置可以参看:https://www.cnblogs.com/zyw-205520/p/4771253.html 下面说下问题: 访问controller层一直报404   1.首先,访问头如图: 必须是以Application context处配置的名称开头,如图,无论项目名是什么都是:localhost:8080/demo/{cont...
递归出了问题,但是实在找不出,help
#includern#includernrnconst int N=11; rnconst int mod=9973;rnrnrnvoid matrix_mult(int a[][N],int b[][N],int c[][N])//a[0][1]存放矩阵行数,a[1][0]存放列数 rnrn int i,j,k;rn for(i=1;i<=a[0][1];i++)rn for(j=1;j<=b[1][0];j++)rn rn c[i][j]=0;rn for(k=1;k<=a[1][0];k++) rn c[i][j]+=(a[i][k]*b[k][j])%mod;rn c[i][j] %= mod; rn rn c[0][1]=a[0][1];rn c[1][0]=b[1][0];rnrnvoid m_y(int a[][N],int b[][N],long k)//计算a^b%crnrn int c1[N][N];rn if(k==2) matrix_mult(a,a,b);rn rn else if(k%2==0)rn rn m_y(a,b,k/2);rn for(int i=1;i<=b[0][1];i++)rn for(int j=1;j<=b[1][0];j++)rn c1[i][j]=b[i][j];rn c1[0][1]=b[0][1];rn c1[1][0]=b[1][0];rn matrix_mult(c1,c1,b);rn rn else m_y(a,b,k-1);rn for(int i=0;i<=b[0][1];i++)rn for(int j=0;j<=b[1][0];j++)rn c1[i][j]=b[i][j];rn matrix_mult(c1,a,b);rn rnrnrnrnint main()rnrn int t,n;rn long k;rn rn int sum=0;rn rn int a[N][N],b[N][N];rn scanf("%d",&t);rn while(t--)rn rn scanf("%d %ld",&n,&k);rnrn for(int i=1;i<=n;i++)rn rn for(int j=1;j<=n;j++)rn scanf("%d",&a[i][j]);rnrn rn a[0][1]=n;rn a[1][0]=n;rn m_y(a,b,k);rn rn for(int i=1;i<=b[1][0];i++)rn sum+=b[i][i];rn printf("%d\n",sum%mod);rn for(int i=0;i
帮我看看----------------实在找不出那里有问题!
为什么这个单选按钮实现不了我要的的呢?rn选了一个以后其它再按就没有用了!????rnrnimport java.awt.*;rnimport java.applet.Applet;rnimport java.awt.event.*;rnrnpublic class TextCheckboxgr extends Applet implements ItemListenerrnrn CheckboxGroup style;rn Checkbox p,b,i;rn Button btn;rn public void init()rn rn style=new CheckboxGroup();rn p=new Checkbox("PLAIN",true,style);rn b=new Checkbox("BOLD",false,style);rn i=new Checkbox("ITALIC",false,style);rn btn=new Button("EFFECT");rn add(p);rn add(b);rn add(i);rn add(btn);rn p.addItemListener(this);rn b.addItemListener(this);rn i.addItemListener(this);rn rn rn public void itemStateChanged(ItemEvent e)rn rn Checkbox temp;rn Font oldF=btn.getFont();rn if(e.getItemSelectable() instanceof Checkbox)rn rn temp=(Checkbox)(e.getItemSelectable());rn if(temp.getLabel()=="PLAIN");rn btn.setFont(new Font(oldF.getName(),Font.PLAIN,12));rn if(temp.getLabel()=="BOLD");rn btn.setFont(new Font(oldF.getName(),Font.BOLD,13));rn if(temp.getLabel()=="ITALIC");rn btn.setFont(new Font(oldF.getName(),Font.ITALIC,14)); rn rn rn
HTML5+CSS问题,找了半天实在找不出错
本来这个页面已经写好了,很正常的,然后我写其他页面改了下CSS,就出问题了,我训着记忆改了回去,这个页面就这样了,找了一晚上找不出来问题,求大神帮忙看一下rn[code=html]rnrnrnrn rn XXX的个人信息rn rn rnrnrn rn rn OA协同办公系统rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn rn XXX的个人信息rn rn 员工号:rn 姓名:rn rn rn 性别:rn 年龄:rn rn rn 所属部门:rn 职位:rn rn rn 兴趣爱好:rn 移动电话:rn rn rn 电子邮件:rn 固定电话:rn rn rn 系统角色:rn 密码:rn rn rn rn rn 个人介绍:rn rn rn rnrn rn rnrnrn[/code]
C 的走迷宫问题 实在找不出问题所在了。。。
mice.txt文件内容n24 24 1 1 24 1 n0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0n0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0n0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0n0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0n0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0n0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0n0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0n0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0n0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0n0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0n0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0n0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0n0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0n0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0n0 0 0 0 1 0 0 0 0 1 1 1 1 1 1 0 0 0 0 1 0 0 0 0n0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0n0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0n0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0n0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0n1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 0 0 0n0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0n0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0n0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0n0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0nn-------------------------------------------------------------------n(感觉是search的问题 但找不出问题)nn#include n#includenint V=0;nnint xnum;nint ynum;nint a[100][100];nntypedef structnn int x;n int y;nNODE;ntypedef structnn NODE nownode;n NODE prenode;n int dir;nGRID;nNODE start;nNODE end;nGRID grid;nnnvoid Init()nnn FILE *fp;n fp=fopen("mice.txt","r");n fscanf(fp,"%d%d%d%d%d%d",&xnum,&ynum,&start.x,&start.y,&end.x,&end.y);//24 24 1 1 24 1n int i,j;n for(j=0;j<=ynum+1;j++)n for(i=0;i<=xnum+1;i++)n a[j][i]=1;n for(j=1;j<=ynum;j++)n for(i=1;i<=xnum;i++)n fscanf(fp,"%d",&a[j][i]);n //grid.nownode.x =start.x;n //grid.nownode.y=start.y; n grid.nownode=start;n fclose(fp);n nnnnnvoid search(int x,int y)n n if((x==24)&&(y==1))n V=1;n elsen a[x][y]=1;n if((V==0)&&(a[x][y+1]==0)) //向右查找----------v==0 可避免在V==1时的不必要搜索 第一个if里的可略 n search(x,y+1);n if((V==0)&&(a[x+1][y]==0))//向下查找n search(x+1,y);n if((V==0)&&(a[x][y-1]==0)) //向左查找n search(x,y-1);n if((V==0)&&(a[x-1][y]==0)) //向上查找n search(x-1,y); n n a[x][y]=0;n if(V=1)n a[x][y]=2;n nnnnint main()nn int x,y;n Init();n x=grid.nownode.x;n y=grid.nownode.y;n printf("%d %d\n",start.x,start.y);n printf("%d %d %d \n",a[24][1],a[24][0],a[25][1]);n printf("%d \n",V);n search(x,y);nn for(int i=0;i<=xnum+1;i++) nnfor(int j=0;j<=ynum+1;j++) nprintf("%d",a[i][j]);nprintf("\n");nn n scanf("%d",&x);n return 0;n n
关于springMVC使用@RequestMapping()无法访问url,报404的问题
今天在写项目的时候,遇到了明明加了注解“@RequestMapping()”而且url写的没有一点点点点点错误,但是请求的时候还是报了404错误。解决办法:找到spring-mvc配置文件并加上:&amp;lt;mvc:annotation-driven /&amp;gt;&amp;lt;mvc:annotation-driven /&amp;gt; :使用这个配置会自动注册DefaultAnnotationHandlerMap...
Glide加载网络图片报404问题
公司用第三方的服务器,然后上传视频的过程中,发现一个问题,就是上传视频到服务器后,根据返回封面链接,显示视频封面,使用glide加载,但是一直没有正常显示出来,当当前activity挂起来过会又进来时,发现又加载出来了,一直没找到什么问题,后面再glide加了个监听,看到的异常是链接无效问题,看了下链接,发现也没问题,就想到是不是又时差问题,于是打了个log,一返回结果,立马访问封面链接,还真是这
在SpringMvc中解决404的问题
1.我们都知道SpringMvc很好用,但是今天我用的时候出现了一个很让人困惑的问题 这是控制器,所以请求路径应该是跟路径下的      category/login    这是毋庸置疑 的 这是配置跳转的页面,上边我返回的是一个"seuucss",那么经过这个配置,请求会跳转到 "WEB-INF/views/success.jsp"  这也是对的 可以看到这个
Springmvc关于静态资源的404问题
问题:failed to load resource: the server responded with a status of 404 (not found) 打开html页面css样式,js脚本以及图片无法加载,检查源码的时候出现如上错误 解决方案:在Springmvc.xml配置文件中添加如下代码 根本原因:在web.xml文件中在进行se
vue+nginx 路由报404的问题
vue刷新是报404错误 项目的后台前端使用vue开发,独立部署在Nginx下, 刷新会报404的错误 修改Nginx 配置文件 #反向代理 location ^~ /common/ { proxy_connect_timeout 360; proxy_send_timeout 360; proxy_read_timeout 360; pr...
SpringMvc跳转报404问题
SpringMvc跳转报404问题**代码如下 import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping
SpringMVC的@RequestMapping开发问题,404
在@controller加入@RequestMapping,运行时后台无报错,但页面会显示404错误,看看是哪的问题,代码如下:rn@Controllerrn@RequestMapping("/Cabinet")rnpublic class CabinetListControllerrn rn @Autowiredrn private CabinetService cabinetService;rnrn @RequestMapping("/queryCabinet")rn public ModelAndView queryCabinet() throws Exception rn // TODO Auto-generated method stubrn List cabinetList =cabinetService.findCabinetHeadList(null);rn rnrn ModelAndView modelAndView = new ModelAndView();rnrn modelAndView.addObject("cabinetList",cabinetList );rn modelAndView.setViewName("cabinet/cabinetList");rn return modelAndView;rn rnrnDEBUG时如下,访问controller正常,并且成功访问数据库,并且成功返回ModelAndViewrnrnDEBUG [http-bio-8080-exec-6] - ==> Preparing: SELECT cabinet_head.* FROM cabinet_head rnDEBUG [http-bio-8080-exec-6] - ==> Parameters: rnDEBUG [http-bio-8080-exec-6] - <== Total: 2rnDEBUG [http-bio-8080-exec-6] - Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1ca905c]rnDEBUG [http-bio-8080-exec-6] - Returning JDBC Connection to DataSourcernDEBUG [http-bio-8080-exec-6] - Rendering view [org.springframework.web.servlet.view.JstlView: name 'cabinet/cabinetList'; URL [WEB-INF/jsp/cabinet/cabinetList.jsp]] in DispatcherServlet with name 'springmvc'rnDEBUG [http-bio-8080-exec-6] - Added model object 'cabinetList' of type [java.util.ArrayList] to request in view with name 'cabinet/cabinetList'rnDEBUG [http-bio-8080-exec-6] - Forwarding to resource [WEB-INF/jsp/cabinet/cabinetList.jsp] in InternalResourceView 'cabinet/cabinetList'rnDEBUG [http-bio-8080-exec-6] - Successfully completed requestrnrn但是页面会报404的错误rnHTTP Status 404 - /FaceRecognitionCabinet/Cabinet/WEB-INF/jsp/cabinet/cabinetList.jsprnrntype Status reportrnrnmessage /FaceRecognitionCabinet/Cabinet/WEB-INF/jsp/cabinet/cabinetList.jsprnrndescription The requested resource is not available.rnrnApache Tomcat/7.0.56rn
同样实在视图解析中的jsp页面为什么就是报404????
![图片说明](https://img-ask.csdn.net/upload/201712/22/1513929711_370626.png)rnrn奉献上我的web.xml中的代码配置其实也和这个页面没有一点的关系。。rnrnrn```rn rnrn leaverecords-ssmrn rn opp.jsprn rn rn rn rn contextConfigLocationrn classpath:applicationContext-*.xmlrn rn rn org.springframework.web.context.ContextLoaderListenerrn rn rn rn rn rn springMvcrn org.springframework.web.servlet.DispatcherServletrn 1rn rn contextConfigLocationrn classpath:springMvc.xmlrn rn rn rn springMvcrn /rn rn rn rn rn rn encodingFilterrn org.springframework.web.filter.CharacterEncodingFilterrn rn encodingrn UTF-8rn rn rn rn encodingFilterrn /*rn rn rnrn```rnrnrnrn为什么啊??前俩个jsp页面可以打开,但是就是opp.jsp就是报404?为什么啊?这就是一个简简单单的页面没有和后台进行任何的交互。。所以就是不知道为什么老报404.。。rnrnrn明白了,事情解决了。。。想起来我哪里错了。。谢谢大家。。
Tomcat部署WEB项目一直404
Tomcat部署web项目,Tomcat成功运行,但是项目无法部署,是什么原因[img=https://img-bbs.csdn.net/upload/201906/02/1559414048_679443.png][/img]
网页报404解决办法
今天调试的时候报404错误了,这个时候我在后台requestMapping()映射的方法设置断点,该方法没有进去。如果你和我是一样的情况的话,试试以下办法: 1.仔细检查你的URL,每一个字母都和后台映射的URL相比较; 2.如果第一个你检查了没有发现问题,那么,请检查你的&quot;/&quot;是否缺少,不说了,想哭,今天搞了多久才发现。     ps:Chrome和Firefox浏览器——&amp;gt;F1...
为什么报错误404
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>rn<%@ page import="tool.*"%>rn<%@page import="tool.JDBCConnection"%>rnrnrnrn rn 对图片发表评论rn rnrnrnrn rn <%rn rnint i=Integer.parseInt(request.getParameter("picture_id"));rn//request.setCharacterEncoding("GBK");rn//String picture_title=format.StrFormat(request.getParameter("picture_title"));rnJDBCConnection dbconn=new JDBCConnection();rnConnection conn=dbconn.getConnection();rnString sql="select * from dto_picinfo where photoid=?";rnPreparedStatement pstmt=null;rnJDBCConnection dbc=null;rndbc=new JDBCConnection();rnpstmt=dbc.getConnection().prepareStatement(sql);rnpstmt.setInt(1,i); rn//pstmt.setInt(1,Integer.parseInt((String)request.getSession().getAttribute("photoid"))); rnResultSet rs1=pstmt.executeQuery();rnif(rs1.next())rn%>rnrn rn rn 标题:<%=rs1.getString("pic_object")%>rn rn rn rn rnrn rn <%JDBCConnection dbconn1=new JDBCConnection();rnConnection conn1=dbconn.getConnection();rnString SQL="select * from dto_comment where dataid=?";rnPreparedStatement pstmt1=null;rnJDBCConnection dbc1=null;rndbc=new JDBCConnection();rnpstmt1=dbc.getConnection().prepareStatement(SQL);rnpstmt1.setInt(1,i); rn//pstmt.setInt(1,Integer.parseInt((String)request.getSession().getAttribute("photoid"))); rnResultSet rs=pstmt1.executeQuery();rn while(rs.next())rn %>rnrnrn 评论内容:rn <%=rs.getString("Content")%>rn 发表人:<%=rs.getString("user_name")%> 发表时间:<%=rs.getString("comment_time")%>rn rnrn<%%>rn rn 发表评论:rn rn rn rn rn rn rn rnrn rn rn rnrn rn rn rnrn rn rn rn rnrnrn 返回rnrn<%rnrs1.close();rnpstmt.close();rnrs.close();rnpstmt1.close();rnconn.close();rn%>rnrnrnrn rn This is the description of my J2EE componentrn This is the display name of my J2EE componentrn slt_picture< rvlet-name>rn servlet.slt_picture< rvlet-class>rn < rvlet>rnrnrnrn slt_picture< rvlet-name>rn /slt_picturern < rvlet-mapping>rn
struts2总是报404
自己写了一个struts2的小实例程序,但是部署到tomcat上后,启动tomcat时报rnjava.lang.NullPointerExceptionrn at com.opensymphony.xwork2.util.FileManager$FileRevision.needsReloading(FileManager.java:209)rn at com.opensymphony.xwork2.util.FileManager.fileNeedsReloading(FileManager.java:60)rn at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.needsReload(XmlConfigurationProvider.java:325)rn at org.apache.struts2.config.StrutsXmlConfigurationProvider.needsReload(StrutsXmlConfigurationProvider.java:168)rn at com.opensymphony.xwork2.config.ConfigurationManager.conditionalReload(ConfigurationManager.java:220)rn at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:61)rn at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:774)rn at org.apache.struts2.dispatcher.ng.InitOperations.initStaticContentLoader(InitOperations.java:77)rn at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:49)rn at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:221)rn at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:302)rn at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:78)rn at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3635)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4222)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:920)rn at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:883)rn at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)rn at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)rn at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)rn at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)rn at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)rn at org.apache.catalina.core.StandardService.start(StandardService.java:448)rn at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)rn at org.apache.catalina.startup.Catalina.start(Catalina.java:552)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)rn at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)rnrn然后访问时,报404!求解啊!!
为什么项目部署报404
我经历此问题的原因是:因为tomcat6.0和jre1.8不兼容!换成tomcat7.0就好了
springMVC上传图片遇到404
最近一个项目遇到图片上传时一直报404,查了各种原因,均不是。最后猛然想到上传文件的配置。 贴出: &amp;lt;!-- SpringMVC上传文件时,需要配置MultipartResolver处理器 --&amp;gt; &amp;lt;bean id=&quot;multipartResolver&quot; class=&quot;org.springframework.web.multipart.commons....
springmvc页面跳转404
不管是我自己写的程序还是用别人的程序,运行没问题,只要一跳转立刻报错404。n如果单独运行success.jsp是没问题的,但是再地址栏输入index.jsp之后再跳转还是会404n求大神解答一下![图片说明](https://img-ask.csdn.net/upload/201711/28/1511841022_625657.png)![图片说明](https://img-ask.csdn.net/upload/201711/28/1511841032_230344.png)![图片说明](https://img-ask.csdn.net/upload/201711/28/1511841038_685629.png)![图片说明](https://img-ask.csdn.net/upload/201711/28/1511841047_362698.png)![图片说明](https://img-ask.csdn.net/upload/201711/28/1511841058_43312.png)![图片说明](https://img-ask.csdn.net/upload/201711/28/1511841071_430689.png)![图片说明](https://img-ask.csdn.net/upload/201711/28/1511841079_711839.png)![图片说明](https://img-ask.csdn.net/upload/201711/28/1511841102_668038.png)
Springmvc helloworld 总是404
页面路径结构这样的rn[img=https://img-bbs.csdn.net/upload/201402/23/1393135612_78732.jpg][/img]rnrnweb.xmlrn rn springmvcrn org.springframework.web.servlet.DispatcherServletrn rn contextConfigLocationrn classpath*:/springmvc-servlet.xmlrn rn 1rn rn rn springmvcrn /rn rnrnrnspringmvc-servlet.xml rn rn rn /WEB-INF/html/ rn rn rn .html rn rn rnrncontrollerrn @RequestMapping(value="/", method = RequestMethod.GET)rn public String csList(ModelMap model)rn rn return "helloWorld"; // debug的时候能正确访问到这rn rnrnrnrn现在是访问的时候能正确的访问到 controller 并且return了rn[img=https://img-bbs.csdn.net/upload/201402/23/1393135996_360516.jpg][/img]rn但是一直是上面的错误
相关热词 c++和c#哪个就业率高 c# 批量动态创建控件 c# 模块和程序集的区别 c# gmap 截图 c# 验证码图片生成类 c# 再次尝试 连接失败 c#开发编写规范 c# 压缩图片好麻烦 c#计算数组中的平均值 c#获取路由参数