reset password
Author Message
Sanaz_6101
Posts: 40
Posted 11:22 Oct 30, 2009 |

Hi

what can be a reason of not showing the page  and redirect it to index.html??

for example in oreder to view all users we have a link under resources which called users and once I click on it ,it just redirect me to index.html .its really hard to debug and find it .I have my controller and jsp and my bean inside my spring-servlet.xml and also the link in header.jspf .

would you plase tell me what can be a reason of it?

Thank you

cysun
Posts: 2935
Posted 11:29 Oct 30, 2009 |

It's some kind of 404 error. Check the URL mapping in spring-servlet.xml and the view name in the controller.

Sanaz_6101
Posts: 40
Posted 11:35 Oct 30, 2009 |
cysun wrote:

It's some kind of 404 error. Check the URL mapping in spring-servlet.xml and the view name in the controller.

 

I guess it used the urlmapping1 (default)  and here is my bean :

<bean name="/viewUsers.html"
        class="csns.spring.controller.ViewUsersController">
        <property name="userDao" ref="userDao" />
    </bean>

and here is my controller :

return new ModelAndView("viewUsers").addObject("users",users);

the same as you have done in class I guess

what else I have to check or import?

Thanks

 

cysun
Posts: 2935
Posted 11:37 Oct 30, 2009 |

Check the log file.

Sanaz_6101
Posts: 40
Posted 11:51 Oct 30, 2009 |
cysun wrote:

Check the log file.

 

here is my log file and said :Caused by: java.lang.ClassNotFoundException: csns.spring.controller.ViewUsersControllerj

since I dont have class with j at the end!!!

this is what I have csns.spring.controller.ViewUsersController

what is wrong!!

 

Attachments:
cysun
Posts: 2935
Posted 20:40 Oct 30, 2009 |
Sanaz_6101 wrote:
here is my log file and said :Caused by: java.lang.ClassNotFoundException: csns.spring.controller.ViewUsersControllerj

since I dont have class with j at the end!!!

...

Check more carefully. Compiler doesn't lie.