Reputation: 103
I am trying spring MVC program and this is my directory structure when I run this program it works properly and when I hit the enter key and direct it to the next page i.e the action page.
it shows this page
HTTP Status 404 - /MVC_HelloWorld/hello.ap
type Status report
message /MVC_HelloWorld/hello.ap
description The requested resource is not available.
In my form action page I have written this my inde.jsp page
<h1> Hello World</h1>
<form action="./hello.ap">
NAME: <input type="text" name="name">
<input type="Submit" value="Say Hello">
</form>
Is the problem with the path or directory structure is wrong?
Upvotes: 0
Views: 162
Reputation: 68
The directory structure as I can see is correct. But the action you are setting in the form should be only the text like "hello.ap" it should not include / or ./ try with hello.ap and name the requestMaping in your controller to hello.ap.
Upvotes: 1