• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

org.springframework.web.servlet.DispatcherServlet noHandlerFound error

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
web.xml is:

<?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" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
<display-name>SpringDwr</display-name>
<welcome-file-list>
<welcome-file>/jsp/Home.jsp</welcome-file>
</welcome-file-list>


<servlet>
<servlet-name>dispatcher</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>dispatcher</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>



</web-app>


dispatcher-servlet.xml is :

<?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:dwr="http://www.directwebremoting.org/schema/spring-dwr"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.directwebremoting.org/schema/spring-dwr
http://www.directwebremoting.org/schema/spring-dwr-3.0.xsd">

<bean id="datasource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="oracle.jdbc.driver.OracleDriver"></property>
<property name="url" value="jdbc:oracle:thin:@localhost:1521:XE"></property>
<property name="username" value="vechile"></property>
<property name="password" value="vechile"></property>
</bean>

<!-- Business Layer Configuration -->
<bean id="loginbusiness" class="com.vechile.business.businessimpl.LoginBusinessImpl">
<property name="logindata" ref="logindata"></property>
</bean>

<bean id="routeBusiness" class="com.vechile.business.businessimpl.RouteBusinessImpl">
<property name="routeData" ref="routeData"></property>
</bean>

<bean id="timeBusiness" class="com.vechile.business.businessimpl.TimeBusinessImpl">
<property name="timeData" ref="timeData"></property>
</bean>
<bean id="employeeBusiness" class="com.vechile.business.businessimpl.EmployeeBusinessImpl">
<property name="employeeData" ref="employeeData"></property>
</bean>
<!-- Business Layer Configuration -->

<!-- Data Layer Configuration -->
<bean id="logindata" class="com.vechile.data.dataimpl.LoginDataImpl">
<property name="dataSource" ref="datasource"></property>
</bean>

<bean id="routeData" class="com.vechile.data.dataimpl.RouteDataImpl">
<property name="dataSource" ref="datasource"></property>
</bean>

<bean id="timeData" class="com.vechile.data.dataimpl.TimeDataImpl">
<property name="dataSource" ref="datasource"></property>
</bean>

<bean id="employeeData" class="com.vechile.data.dataimpl.EmployeeDataImpl">
<property name="dataSource" ref="datasource"></property>
</bean>
<!-- Data Layer Configuration -->


<!-- <dwr:controller id="dwrController" debug="true"></dwr:controller> -->
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="alwaysUseFullPath" value="true"></property>
<property name="mappings">
<props>
<!-- <prop key="/dwr/**/*">dwrController</prop> -->
<prop key="/login.html">logincont</prop>
<prop key="/route.html">routecont</prop>
<prop key="/time.html">timecont</prop>
<prop key="/employee.html">employeecont</prop>
<prop key="/register.html">registercont</prop>
</props>
</property>
</bean>


<!-- Controller Layer Configuration -->
<bean id="logincont" class="com.vechile.controller.LoginController">
<property name="commandClass" value="com.vechile.bean.LoginBean"></property>
<property name="commandName" value="lgb"></property>
<property name="successView" value="AdminHome"></property>
<property name="loginbusiness" ref="loginbusiness"></property>
</bean>

<bean id="routecont" class="com.vechile.controller.RouteController">
<property name="commandClass" value="com.vechile.bean.RouteBean"></property>
<property name="commandName" value="RB"></property>
<property name="successView" value="AdminHome"></property>
<property name="routeBusiness" ref="routeBusiness"></property>
</bean>

<bean id="timecont" class="com.vechile.controller.TimeController">
<property name="commandClass" value="com.vechile.bean.TimeBean"></property>
<property name="commandName" value="TB"></property>
<property name="successView" value="AdminHome"></property>
<property name="timeBusiness" ref="timeBusiness"></property>
</bean>

<bean id="employeecont" class="com.vechile.controller.EmployeeController">
<property name="commandClass" value="com.vechile.bean.EmployeeBean"></property>
<property name="commandName" value="EB"></property>
<property name="successView" value="AdminHome"></property>
<property name="employeeBusiness" ref="employeeBusiness"></property>
</bean>

<bean id="registercont" class="com.vechile.controller.RegisterController">
<property name="commandClass" value="com.vechile.bean.RegisterBean"></property>
<property name="commandName" value="RGB"></property>
<property name="successView" value="Home"></property>
</bean>
<!-- Controller Layer Configuration -->

<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/jsp/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>


</beans>


jsp page is :

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<link href="<%=request.getContextPath()%>/css/style.css"
rel="stylesheet" type="text/css" />
<script type="text/javascript"
src="<%=request.getContextPath()%>/js/Register.js"></script>
</head>
<body>
<form action="register.html" method="post" name="registerform">
<fieldset>
<legend>Registration form</legend>
<table>
<tr>
<td>Name :</td>
<td><input type="text" name="name" />
</td>
</tr>
<tr>
<td>Address :</td>
<td><textarea rows="10" cols="20" name="address"></textarea>
</td>
</tr>
<tr>
<td>Email :</td>
<td><input type="text" name="email" />
</td>
</tr>
<tr>
<td>Username :</td>
<td><input type="text" name="username" />
</td>
</tr>
<tr>
<td>Password :</td>
<td><input type="password" name="password" />
</td>
</tr>
<tr>
<td>Confirm Password :</td>
<td><input type="password" name="confirmpassword" />
</td>
</tr>
<tr>
<td id="web-buttons-idmb27q"><a href="#" title="Register" onclick="registerClick();"
style="background-image: url(<%=request.getContextPath()%>/images/Registerbutton.png); width: 83px; height: 34px; display: block;"><br />
</a></td>
</tr>
</table>
</fieldset>
</form>
</body>
</html>

js file is:

function registerClick(){
document.registerform.submit();
}

error on clicking on this button is :

Mar 29, 2012 12:33:29 PM org.springframework.web.servlet.DispatcherServlet noHandlerFound
WARNING: No mapping found for HTTP request with URI [/Vechile/jsp/register.html] in DispatcherServlet with name 'dispatcher'
 
shakti rath
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i hope i will get any answer from any one
 
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please change the following line


to

.
 
shakti rath
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have tried this way. It is still not working
 
Piyush Mangal
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

i have tried this way. It is still not working



Are you getting the same error as below after the changes I suggested?

Mar 29, 2012 12:33:29 PM org.springframework.web.servlet.DispatcherServlet noHandlerFound
WARNING: No mapping found for HTTP request with URI [/Vechile/jsp/register.html] in DispatcherServlet with name 'dispatcher'



Can you post the new error message that you see now.

 
shakti rath
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes
 
Piyush Mangal
Ranch Hand
Posts: 196
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I guess, your changes were not picked up by the web server . otherwise it should have given you either a different error or fixed your problem.

 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic