Could not resolve view with name 'xxx' in servlet with name dispatcherServlet

版权声明:本文为 testcs_dn(微wx笑) 原创文章,非商用自由转载-保持署名-注明出处,谢谢。 https://blog.csdn.net/testcs_dn/article/details/80336983

SpringBoot 项目,启动后访问网页,控制台输出:

javax.servlet.ServletException: Could not resolve view with name 'loginback' in servlet with name 'dispatcherServlet'

这是因为模板文件相关配置不正确,导致找不到模板文件所致。


关于配置,请参考:

SpringBoot 项目 @EnableWebMvc 注解应用总结




javax.servlet.ServletException: Could not resolve view with name 'Success' in se

09-18

各位帮我看下啊,急死了rn这是我的控制类:rnrnpackage com.peak.riskscan.controller;rnrnimport javax.servlet.http.HttpServletRequest;rnimport javax.servlet.http.HttpServletResponse;rnrnimport org.springframework.web.servlet.ModelAndView;rnimport org.springframework.web.servlet.mvc.Controller;rnrnrnimport com.peak.riskscan.alertfeedback.dao.RgpcDao;rnrnpublic class InsertRgpcController implements Controllerrn rn private RgpcDao rgpcDao;rnrn public ModelAndView handleRequest(HttpServletRequest request,rn HttpServletResponse response) throws Exception rn // TODO Auto-generated method stubrn rn String batch_info=request.getParameter("batch_info");rn // String proccessType = request.getParameter("type");rn String expect_date=request.getParameter("expect_date");rn rn // System.out.println(batch_info);rn rnrn System.out.println(batch_info);rn rnrn System.out.println(expect_date);rn rn rn rn String successView = "";rn rn rgpcDao.insertBatchInfo(batch_info,expect_date);rn rn successView = "Success";rn /*rn rn if("check".equalsIgnoreCase(proccessType))rn rn rgpcDao.insertBatchInfo(batch_info,expect_date);rn rn successView = "checkSuccess";rn rn rn rn */rn /* rn if("check".equalsIgnoreCase(proccessType))rn // alertFeedback.setFhrq(date);rn //String fhbz = request.getParameter("flag");rn //alertFeedback.setFhbz(fhbz);rn rn //rgpc.setBatch_info(batch_info);rn rgpcDao.insertBatchInfo(batch_info,expect_date);rn rn successView = "checkSuccess";rn rn */rn rn return new ModelAndView(successView);rn rn rn rn rn rn rn rnrn public RgpcDao getRgpcDao() rn return rgpcDao;rn rnrn public void setRgpcDao(RgpcDao rgpcDao) rn this.rgpcDao = rgpcDao;rn rn rn rn rn rn rn rn rn rnrnrn这是我的properties文件,rnjstlView.class=org.springframework.web.servlet.view.JstlViewrnjstlView.url=rnrnrnshowScanErrorsView.url=/WEB-INF/jsp/scanLog/showScanErrors.jsprnScanModelListView.url=/WEB-INF/jsp/scanModel/scanModelList.jsprnallScanSuccessView.url=/WEB-INF/jsp/scanModel/allScanSuccess.jsprnbuzzDateNoMatchView.url=/WEB-INF/jsp/scanModel/buzzDateNoMatch.jsprnrndownAssignView.url=/WEB-INF/jsp/alertFeedback/downAssign.jsprndownAssignSuccessView.url=/WEB-INF/jsp/alertFeedback/downAssignSuccess.jsprndownAssignFailView.url=/WEB-INF/jsp/alertFeedback/downAssignFail.jsprncheckListView.url=/WEB-INF/jsp/alertFeedback/checkList.jsprnreplyListView.url=/WEB-INF/jsp/alertFeedback/replyList.jsprncheckInfoView.url=/WEB-INF/jsp/alertFeedback/checkInfo.jsprncheckInfo.url=/WEB-INF/jsp/alertFeedback/batchstatus.jsprnrepCheck.url=/WEB-INF/jsp/alertFeedback/batch.jsprnSuccess=/WEB-INF/jsp/alertFeedback/success.jsprnrnrnreplyInfoView.url=/WEB-INF/jsp/alertFeedback/replyInfo.jsprncheckSuccessView.url=/WEB-INF/jsp/alertFeedback/checkSuccess.jsprnreplySuccessView.url=/WEB-INF/jsp/alertFeedback/replySuccess.jsprnrepCheckView.url=/WEB-INF/jsp/alertFeedback/reCheckInfo.jsprnmodifyView.url=/WEB-INF/jsp/alertFeedback/modifyDownAssign.jsprnmodifySuccessView.url=/WEB-INF/jsp/alertFeedback/modifySuccess.jsprnaddErrorInfoView.url=/WEB-INF/jsp/alertFeedback/addErrorInfo.jsprnaddErrorInfoSuccessView.url=/WEB-INF/jsp/alertFeedback/addErrorInfoSuccess.jsprnreplyCheckView.url=/WEB-INF/jsp/alertFeedback/replyCheckInfo.jsprnreplyCheckSuccessView.url=/WEB-INF/jsp/alertFeedback/replyCheckSuccess.jsprnrnimportSuccessView.url=/WEB-INF/jsp/importModel/importSuccess.jsprnfailTableNameView.url=/WEB-INF/jsp/importModel/failTableNamelList.jsprndownloadSuccessView.url=/WEB-INF/jsp/importModel/downloadSuccess.jsprndataFileListView.url=/WEB-INF/jsp/importModel/dataFileList.jsprnnoDataPathFoundView.url=/WEB-INF/jsp/importModel/noDataPathFound.jsprnrnaddInnerAccountCheckSuccessView.url=/WEB-INF/jsp/innerAccountCheck/addSuccess.jsprnaddInnerAccountCheckView.url=/WEB-INF/jsp/innerAccountCheck/addInnerAccountCheck.jsprndeleteInnerAccountConfirmView.url=/WEB-INF/jsp/innerAccountCheck/deleteConfirm.jsprndeleteSucessView.url=/WEB-INF/jsp/innerAccountCheck/deleteSuccess.jsprncommonSuccessView.url=/WEB-INF/jsp/commonSuccess.jsprnrnaddSPzzlView.url=/WEB-INF/jsp/importantvoucher/addSPzzl.jsprndeleteSPzzlConfirmView.url=/WEB-INF/jsp/importantvoucher/deleteSPzzlConfirm.jsprnSPzzlSuccessView.url=/WEB-INF/jsp/importantvoucher/deleteSPzzlSuccess.jsprnaddSGypzyeView.url=/WEB-INF/jsp/importantvoucher/addSGypzye.jsprnupdateSGypzyeView.url=/WEB-INF/jsp/importantvoucher/updateSGypzye.jsprnupdateSGypzyeFailedView.url=/WEB-INF/jsp/importantvoucher/updateSGypzyeFailed.jsprnaddSGypzyeFailedView.url=/WEB-INF/jsp/importantvoucher/addSGypzyeFailed.jsprndeleteSGypzyeConfirmView.url=/WEB-INF/jsp/importantvoucher/deleteSGypzyeConfirm.jsprnSGypzyeSuccessView.url=/WEB-INF/jsp/importantvoucher/deleteSGypzyeSuccess.jsprnimportantVoucherSuccessView.url=/WEB-INF/jsp/importantvoucher/importantVoucherSuccess.jsprnModifyBatchInfoSuccessView.url=/WEB-INF/jsp/modifyBatchInfoSuccess.jsprnrnRollbackSuccessView.url=/WEB-INF/jsp/commonSuccess.jsprnRollbackFaildView.url=/WEB-INF/jsp/importModel/RollbackFaild.jsprnFTPNotDataFoundView.url=/WEB-INF/jsp/importModel/FTPNotDateFound.jsprnManualAllSuccessView.url=/WEB-INF/jsp/commonSuccess.jsprnImporFaildtView.url=/WEB-INF/jsp/importModel/ImportFaild.jsprnAutoSchedulerIsRunningView.url=/WEB-INF/jsp/importModel/AutoSchedulerIsRunning.jsprnafterFiveMinutesView.url=/WEB-INF/jsp/importModel/afterFiveMinutes.jsprnrnrnpreAddBlacklistView.url=/WEB-INF/jsp/blacklist/preAddBlacklist.jsprnpreDelBlacklistView.url=/WEB-INF/jsp/blacklist/preDelBlacklist.jsprnblacklistSuccessView.url=/WEB-INF/jsp/blacklist/blacklistSuccess.jsprnrnpreAddSupWaterRecordView.url=/WEB-INF/jsp/supwater/preAddSupWaterRecord.jsprnaddSupWaterRecordSuccessView.url=/WEB-INF/jsp/supwater/addSupWaterRecordSuccess.jsprnrnrninitSpdevCfgView.url=/WEB-INF/jsp/spdev/initSpdevCfg.jsprninsertSpdevCfgView.url=/WEB-INF/jsp/spdev/insertSpdevCfg.jsprninsertSpdevCfgSucessView.url=/WEB-INF/jsp/spdev/insertSpdevCfgSuccess.jsprninsertInitSpdevCfgView.url=/WEB-INF/jsp/spdev/insertInitSpdevCfg.jsprnmodifyInitSpdevCfgView.url=/WEB-INF/jsp/spdev/modifySpdevCfg.jsprnmodifySpdevCfgSucessView.url=/WEB-INF/jsp/spdev/modifySpdevCfgSuccess.jsprndeleteSpdevCfgSucessView.url=/WEB-INF/jsp/spdev/deleteSpdevCfgSuccess.jsprnmonitorSpdevView.url=/WEB-INF/jsp/spdev/monitorSpdev.jsprnrnqxfIndexSuccessView.url=/WEB-INF/jsp/qxf/qxfIndex.jsprnqxfWsbListView.url=/WEB-INF/jsp/qxf/qxfWsbList.jsprnqxfReportView.url=/WEB-INF/jsp/qxf/qxfReport.jsprnqxfActiveReportView.url=/WEB-INF/jsp/qxf/qxfActiveReport.jsprnqxfSuccess.url=/WEB-INF/jsp/qxf/qxfSuccess.jsprnqxfSuccess1.url=http://32.126.152.87:8080/RiskScan/GetQuery?S_ID=qxf_01rnqxfJdView.url=/WEB-INF/jsp/qxf/qxfJd.jsprnqxfView.url=/WEB-INF/jsp/qxf/qxfView.jsprnqxfDxPz.url=/WEB-INF/jsp/qxf/qxfDxPz.jsprnqxfProxyAdd.url=/WEB-INF/jsp/qxf/qxfProxyAdd.jsprnqxfProxyEdit.url=/WEB-INF/jsp/qxf/qxfProxyEdit.jsprninitQxfTypeView.url=/WEB-INF/jsp/qxfType/initQxfType.jsprnModifyQxfTypeSuccessView.url=/WEB-INF/jsp/qxfType/modifyQxfTypeSuccess.jsprnqxfManualSendInit.url=/WEB-INF/jsp/qxf/qxfManualSendInit.jsprn想要用ModelAndView实现页面跳转,报错错啊rnrn我要跳转到这里,怎么实现啊?rnrnSuccess=/WEB-INF/jsp/alertFeedback/success.jsprnrnrnrn

没有更多推荐了,返回首页

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试