spring - javax.servlet.ServletException: Could not resolve view with name in servlet with name 'dispatcher' -
javax.servlet.servletexception: not resolve view name
i'm new spring mvc. got issue here. i'm trying view handler function. issue is returning error, have seen lot of times , solved. i'm totally stuck. please me?
@requestmapping(value="/editcasetypes.htm", method = requestmethod.get) public modelandview loadeditcasetypepage(@modelattribute("addcasetypes") casetypesformbean casetypesformbean, modelmap model, httpsession session, httpservletrequest request) throws exception { string editthis="20"; if(!editthis.equals("") && editthis!=null){ casetypesformbean.setcasetypecd(integer.parseint(editthis)); casetypesbusinessdelegate.editcasetypetodb(casetypesformbean); } model.addattribute(casetypesformbean); return new modelandview("addcasetypes", model); }
i'm adding header part of jsp:
<body onload="init()"> <form:form modelattribute="addcasetypes" id="addcasetypes"> <div id="wrapper_popup"> <c:if test="${success}"> <div class="successmsg">${message}</div> </c:if> <c:if test="${errors}"> <div class="errormsg">${message}</div> </c:if> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="frmtable"> <tr> <td class="label"><spring:message code="lblcasetype" /><span class="mand">*</span></td> <td><form:input path="casetype" id="casetype" tabindex="1" maxlength="80" onchange="zervalidationname(this.value, this.id);"/></td> </tr> </table>
tiles-defs:
<definition name="editcasetypes" extends="popuplayout"> <put-attribute name="title" value="cctns"/> <put-attribute name="body" value="/web-inf/jsp/addcasetypes.jsp"/> </definition>
view.prop addcasetypes.(class)=org.springframework.web.servlet.view.tiles2.tilesview addcasetypes.url=editcasetypes
in which, i'm trying reuse addcasetype page edit. add functionality working fine. edit, upon clicking link, i'm getting error:
info: csrfguard analyzing request /cctns/editcasetypes.htm info: 2016-07-19 18:47:28,863|info |httpsslworkerthread-8080-2|org.additionalmaster.spring.managecasetaskscontroller|189|:inside loadeditcasetypepage() info: 2016-07-19 18:47:28,863|info |httpsslworkerthread-8080-2|org.cctns.additionalmaster.spring.managecasetaskscontroller|193|:id edit >> 20 info: 2016-07-19 18:47:28,863|info |httpsslworkerthread-8080-2|org.additionalmaster.dao.casetypesdaoimpl|276|:to edit >> 20 severe: standardwrappervalve[dispatcher]: pwc1406: servlet.service() servlet dispatcher threw exception javax.servlet.servletexception: not resolve view name 'editcasetypes' in servlet name 'dispatcher' @ org.springframework.web.servlet.dispatcherservlet.render(dispatcherservlet.java:1029) @ org.springframework.web.servlet.dispatcherservlet.dodispatch(dispatcherservlet.java:817) @ org.springframework.web.servlet.dispatcherservlet.doservice(dispatcherservlet.java:719) @ org.springframework.web.servlet.frameworkservlet.processrequest(frameworkservlet.java:644) @ org.springframework.web.servlet.frameworkservlet.doget(frameworkservlet.java:549) @ javax.servlet.http.httpservlet.service(httpservlet.java:734) @ javax.servlet.http.httpservlet.service(httpservlet.java:847) @ org.apache.catalina.core.applicationfilterchain.servletservice(applicationfilterchain.java:427) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:333) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:214) @ org.owasp.csrfguard.csrfguardfilter.dofilter(csrfguardfilter.java:79) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:246) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:214) @ org.cctns.cas.state.online.filter.responsefilter.dofilter(responsefilter.java:74) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:246) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:214) @ com.sun.identity.agents.filter.amagentbasefilter.allowrequesttocontinue(amagentbasefilter.java:130) @ com.sun.identity.agents.filter.amagentbasefilter.dofilter(amagentbasefilter.java:80) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:246) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:214) @ org.cctns.cas.state.online.filter.multipartfilter.dofilter(multipartfilter.java:114) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:246) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:214) @ org.cctns.cas.state.online.filter.crossscriptingfilter.dofilter(crossscriptingfilter.java:26) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:246) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:214) @ org.cctns.cas.state.online.filter.authfilter.dofilter(authfilter.java:166) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:246) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:214) @ org.springframework.web.filter.characterencodingfilter.dofilterinternal(characterencodingfilter.java:88) @ org.springframework.web.filter.onceperrequestfilter.dofilter(onceperrequestfilter.java:76) @ org.apache.catalina.core.applicationfilterchain.internaldofilter(applicationfilterchain.java:246) @ org.apache.catalina.core.applicationfilterchain.dofilter(applicationfilterchain.java:214) @ org.apache.catalina.core.standardwrappervalve.invoke(standardwrappervalve.java:313) @ org.apache.catalina.core.standardcontextvalve.invokeinternal(standardcontextvalve.java:287) @ org.apache.catalina.core.standardcontextvalve.invoke(standardcontextvalve.java:218) @ org.apache.catalina.core.standardpipeline.doinvoke(standardpipeline.java:648) @ org.apache.catalina.core.standardpipeline.doinvoke(standardpipeline.java:593) @ com.sun.enterprise.web.webpipeline.invoke(webpipeline.java:94) @ com.sun.enterprise.web.pesessionlockingstandardpipeline.invoke(pesessionlockingstandardpipeline.java:98) @ org.apache.catalina.core.standardhostvalve.invoke(standardhostvalve.java:222) @ org.apache.catalina.core.standardpipeline.doinvoke(standardpipeline.java:648) @ org.apache.catalina.core.standardpipeline.doinvoke(standardpipeline.java:593) @ org.apache.catalina.core.standardpipeline.invoke(standardpipeline.java:587) @ org.apache.catalina.core.containerbase.invoke(containerbase.java:1093) @ org.apache.catalina.core.standardenginevalve.invoke(standardenginevalve.java:166) @ org.apache.catalina.core.standardpipeline.doinvoke(standardpipeline.java:648) @ org.apache.catalina.core.standardpipeline.doinvoke(standardpipeline.java:593) @ org.apache.catalina.core.standardpipeline.invoke(standardpipeline.java:587) @ org.apache.catalina.core.containerbase.invoke(containerbase.java:1093) @ org.apache.coyote.tomcat5.coyoteadapter.service(coyoteadapter.java:291) @ com.sun.enterprise.web.connector.grizzly.defaultprocessortask.invokeadapter(defaultprocessortask.java:666) @ com.sun.enterprise.web.connector.grizzly.defaultprocessortask.doprocess(defaultprocessortask.java:597) @ com.sun.enterprise.web.connector.grizzly.defaultprocessortask.process(defaultprocessortask.java:872) @ com.sun.enterprise.web.connector.grizzly.defaultreadtask.executeprocessortask(defaultreadtask.java:341) @ com.sun.enterprise.web.connector.grizzly.defaultreadtask.dotask(defaultreadtask.java:263) @ com.sun.enterprise.web.connector.grizzly.defaultreadtask.dotask(defaultreadtask.java:214) @ com.sun.enterprise.web.portunif.portunificationpipeline$putask.dotask(portunificationpipeline.java:382) @ com.sun.enterprise.web.connector.grizzly.taskbase.run(taskbase.java:264) @ com.sun.enterprise.web.connector.grizzly.ssl.sslworkerthread.run(sslworkerthread.java:106) info: 2016-07-19 18:47:28,878|debug|httpsslworkerthread-8080-2|org.apache.tiles.impl.basictilescontainer|615|:render request recieved definition 'standardhttperror'
can please me?
heyy, quick response. i'm adding web.xml part below..
<?xml version="1.0" encoding="utf-8"?> <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"> <context-param> <param-name>contextconfiglocation</param-name> <param-value> /web-inf/applicationcontext.xml <!-- /web-inf/applicationcontext-security.xml--> </param-value> </context-param> <context-param> <param-name>log4jconfiglocation</param-name> <param-value>/web-inf/log4j.properties</param-value> </context-param> <servlet> <servlet-name>dispatcher</servlet-name> <servlet-class>org.springframework.web.servlet.dispatcherservlet</servlet-class> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>dispatcher</servlet-name> <url-pattern>*.htm</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>javascriptservlet</servlet-name> <url-pattern>/javascriptservlet</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>redirect.jsp</welcome-file> </welcome-file-list> <error-page> <error-code>404</error-code> <location>/errors/404.htm</location> </error-page> </error-page> </web-app>
Comments
Post a Comment