last day (14 days later) » 

9:38 AM
0
Q: Spring web project failure

vigamageI have a Spring HelloWorld project developed by me and for the library management I used Maven in my project. My intention is to see how Spring handles url requests. I think I developed it correctly but, the outcome is not achieved. I have entered my Controller class, web.xml file and the mvc-...

 
@hotzst I added it
@ChiefTwoPencils If you mean the thing which has been commented in the code posted here, I tried that. Still the same result
 
eis
I'd suggest to move request mapping from controller and to the method like ChiefTwoPencils suggests, but you need to have the war name in the url. When you deploy your app to Tomcat, it should say which context it was deployed in (in the server output). I don't see it here, could you try redeploying and observing what is the context path. Also, what is the output you see when you try to use the url you've given?
@ChiefTwoPencils I think that's a war name, which needs to be there.
 
@ChiefTwoPencils yes it is the same result
@eis I think I found a reason here. In my server directory, my project has not been deployed into that. There is a deployment issue I think
 
eis
so you never even deployed it?
 
How I made the project run was, right click-> run on server. Isn't that all I have to do?
 
eis
9:38 AM
yes, if everything is configured correctly in eclipse. Did you see any change in server output when you deployed to server?
 
@ArshadAli in Eclipse Juno. There is no project in server directory. Is that how it is?
 
eis
there should be a war file in webapps folder of tomcat. But I asked about change in server output logs during deployment. Please check that.
 
@eis there is no war file in webapps folder. The server output log is attached to the question.
 
eis
yes, but I asked was there a change in server output logs during deployment. Please try redoing the deployment and check if there are any changes during it.
 
@eis No any change in the server tab. It sows nothing. And the console output is shown in my question. I don't know whether I understood u correctly.
 
eis
9:38 AM
if there is no change, then deployment is not happening and you haven't configured eclipse deployment correctly.
 
Could you please tell me how to do that? @eis
 

last day (14 days later) »