Hello JavaRanch, I dont know if this is the right thread where I should post my concern, I've been searching the categories, but I think this is the closest.
Anyway, I'm a total beginner in Spring MVC development, so I'm having a little struggle deploying my simple web-app. Please bare with me..
The thing in here is, I cannot see why my result(result.jsp) page doesn't load after I press the submit button on my first page(Student.html)
here are the codes for my simple program.
so far I can successfully load the first page (student.html)
as http://localhost:8080/HelloStudent/student.html (just to show the URL)
but as I press the submit button, I always get Error 404
and the url displays as http://localhost:8080/HelloStudent/addStudent (here i expect the result.html)
I wonder what conflicts my POST method in my controller class has with my result.jsp page or any codes in my project.
Please bare with me, I'm really new to Spring Development, I just finished a tutorial with basic development in swing. Any help would greatly appreciated, thank you. :)
edit Just like to mention, this is a part of the tutorial I found on web. I just learned something with my POST request method
I'm having a hard time finding a very good sample(a working sample in my case) that will show me how to map my form into my POST method that will load my result page..
As I search the forum I ran across some posts around that could match my problem, some of the post says that It could or It is a build & environment issue, well in my case I'm developing this simple project in Netbeans 8, Glassfish 4 and Spring 4. If not too much, would you point me in the right direction? I've been searching and searching some introductions/samples in the Google, but I always end up having issues, Error 404, Bad requests etc.., I cant find something that will run perfectly and from there, I can understand and learn ste-by-step whats going on. Another thing I want to ask if any error would have something to do with version? I cant find any sample codes with the latest frameworks(e.g Spring 4.0.1) and some latest tools(Glassfish 4). I use to see, Spring 3, and Glassfish 3 below sample codes.
I changed my url-pattern with this one, but still no luck.
I'm expecting that this url http://localhost:8080/HelloStudent, when it appears on my browser, the page will load fine(as indicated on the tutorial I'm reading), but when it loads a URL that way, it gives me a 404, so im adding a "student" in the browser's URL then it works fine, what Im expecting that it should load right after I run it , not when I put a "student" in the browser's url
after a painstakingly searching(with no luck) , and randomly shoot a bullet, I manage to resolve the problem in deploying-->run the first page
i changed my mapping value, from
I'm searching the google to understand why I need to map my value into a simple "/" to deploy and run my project, but still no luck, I don't see any example with a mapping value like this, hope anyone could enlighten me.
finally, now I know where to continue or start all over again in my introduction-to-spring, and thanks for telling me about defining a bean for logging, It will be a great of use, and I just found a full documentation of Spring 4.0 Spring 4 Documentation, thanks again
THANKS again! , actually a while ago, I also searched about IDEs, especially on spring development, majority of my search suggest Spring Tool Suite, maybe this might put me away on any deployment issues in developing Spring apps, thanks a lot! God bless
I've never won anything before. Not even a tiny ad: