Spring MVC Tutorial with Example part 3

preview_player
Показать описание

For More Queries WhatsApp or Call on : +919008963671

Follow on Facebook:

Subscribe to our other channel:
Telusko Hindi :
Рекомендации по теме
Комментарии
Автор

for anyone having the 404 error even after adding request mapping annotations, make sure you create your package and classes in src/main/java NOT src/main/resources, if maven doesn't create the src/main/java folder, just create the folder and move the package folders/classes there and that should resolve the no mapping error

Pato
Автор

Hi Navin,
First off, thanks very much for all the effort that you're putting in to create these videos. Indeed these are helpful.

First time, I faced issues while creating this setup on my machine. However looks like we missed the following which prevented us from getting the response after spring request.

Following modifications I did, in order to get rid of 404 error:

1. In <spring>-servlet.xml add the following, to the cheat code provided by Navin.

<mvc:annotation-driven />

<context:component-scan base-package="com.telusko" />

<mvc:default-servlet-handler />

2. Then create a folder "java" under src/main, then create Controller with the package.

Make sure, you do a build and the restart the server.

Profit!

Thanks again Navin for the wonderful work that you're doing :-).

mohammadshareef
Автор

for error of 404 .. plz check that u should have src/main/java/com if its src/main/resources/com then just drag the com folder from resource to java. Create java folder if it doesn't exist.... obviously the content of com will shift along...

narcodescom
Автор

hi NavinI am getting an error when I enter the 2 numbers Click on ok I am getting HTTP Status 404in console : No mapping found for HTTP request with I can get print message in console plz help me thanks

lakshmism
Автор

For anyone having 404 error even after creating src/main/java folder, change <url-pattern> in web.xml file from *.htm to /. Worked for me.

mladjangadzic
Автор

Gettting Error as below




Circular view path [add]: would dispatch back to the current handler URL [/DemoMVC/add] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)

Indu-
Автор

Very nice series of tutorials on Spring MVC. One question - Can't you just make this application to run in hot deployment mode whenever there is a code change? That will save us from restarting the tomcat everytime there is a code change.

ayasswain
Автор

for anyone having the 404 error even after adding request mapping annotations

I have solved this issue by below steps:

1. Right click the Maven Project -> Build Path -> Configure Build Path
2. In Order and Export tab, you can see the message like '2 build path entries are missing'
3. Now select 'JRE System Library' and 'Maven Dependencies' checkbox
4. Click OK

vipingupta
Автор

finally worked!! changing the configurations in build path..

sarath
Автор

बहुत बहुत धनवाद सर जी 🙏
Thanks a lot sir 🙏

kamleshthapliyal
Автор

If you are getting error noHandlerFound
WARNING: No mapping found for HTTP request with URI [/DemoMVC/add] in DispatcherServlet with name 'telusko'" the AddController.java should be created under " main/java/com/telusko/" folder.

omshinde
Автор

It works for me.... check if there are some typo in the name of the file or incorrect path of java files

GiuseppeDAgostinorekrux
Автор

No mapping found for HTTP request with URI [/DemoMVC/add] in DispatcherServlet with name 'telusko'
im facing above error.... please help

amangupta
Автор

in lacture 2 sir has created #AddController in src>main>resources but in lacture 3, #AddController is present in src>main>resources .. i.e, sir has created src>main>java inside java Resources..

yogeshbhatt
Автор

It doesn't work, even if I have the controller class in the src main java path. I get the following error(http 404): The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

radudamian
Автор

Circular view path [add]: would dispatch back to the current handler URL [/DemoMVC/add] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)

felipemellofonseca
Автор

For those having the error of "No mapping found", just create a java folder under the main folder under src. It will automatically create an "src/main/java" folder under "Java Resources". Create the "AddController" class there.

ruahden
Автор

As shown in this tutorial, I modified the AddController to return a string and I created the Display.jsp. When I run it, I see the console msg "I am here" which tells me I hit the controller logic. But I then get a 404 "/DemoMVC/display.jsp" "The requested resource is not available.". My server can't find the static jsp file. I added its directory to the build path but it didn't matter. I could use some help. I don't understand why it's unable to find this file.

charleslaine
Автор

No mapping found for HTTP request with URI [/DemoMVC/add] in DispatcherServlet with name 'vinay' i am getting this error even i did exactly like he explained. tried creating many times. everytime same error.

vinayuddagiri
Автор

This is pretty poor practice. There are all these comments, why dont you reply to any of them. How do you plan to makke your tutorials useful if people have questions? SMH

shashgo
join shbcf.ru