Spring 3 MVC - Controller is called but views are not found?

There are a few issues. The first one is that you only dispatch /app/* urls to Spring in your web.xml.

There are a few issues. The first one is that you only dispatch /app/* urls to Spring in your web. Xml: /app/* That's fine if the request mapping was /app/helloworld, but means that /helloworld doesn't even get to spring.

What you're probably wanting to do is to use a urlrewrite filter to map requests into the /app/* space. Take a dependency on tuckey and then add this to your web. Xml: UrlRewriteFilter org.tuckey.web.filters.urlrewrite.

UrlRewriteFilter UrlRewriteFilter /* Then add a file called urlrewrite. Xml in your WEB-INF directory, containing: /images/** /images/$1 /scripts/** /scripts/$1 /styles/** /styles/$1 /** /app/$1 /app/** /$1 After that, a request to /helloworld should go to the correct place. You'll probably want to change the root view controller too.

Looks like it is because you have not specified the viewClass property. Can you try with It works for welcome page due to this.

2 Specifying viewClass should not be necessary, Spring will pick a sensible default. – skaffman Oct 24 '10 at 16:32.

I think the view needs to be in views/helloworld. Jsp and not in views/helloworld/helloworld.jsp.

Matthew has copied helloworld. Jsp in two different places just to make sure, that it not the JSP location that caused the problem. – dma_k Nov 17 at 8:48.

You should set view Name as mav. SetViewName("/helloWorld/helloWorld").

I think the RequestMapping @RequestMapping(value="/helloworld") does not work class-based annotation. Try moving this annotation to your helloworld() method instead. Alternatively add @RequestMapping(value="/helloworld/*") to your class and @RequestMapping(value="/first.

Htm") to your helloworld(). This way when surfin to localhost:8080/app/helloworld/first. Htm it will direct to the view accordingly.

He's specified a GET on the method, which should map a get on /helloworld to that method already. – GaryF Nov 16 '10 at 16:29 Ouch. Why the down-vote?1) I stated 'I think' in my introductory sentence.2) I tested my statement in one of my projects - my 'solution' does indeed work.It's not like I've written complete BS... Geez.. people are trigger happy with their down-votes.. the up-votes however are a totally different story.. – chzbrgla Nov 16 '10 at 16:54 1 Your solution works, but saying that the request mapping at a class-level does not work is plainly incorrect.

I downvoted you for that. – GaryF Nov 16 '10 at 16:57 Not saying it's not working per se .. I said the provided RequestMapping by OP does not work the way he has implemented it - which is totally right, no? – chzbrgla Nov 16 '10 at 17:00.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions