reset password
Author Message
Anna
Posts: 7
Posted 21:00 May 11, 2011 |

What I only added/modified in csns is the followings:

1.TaskDao.java, TaskDaoImpl.java

2.ListOfTasksController.java where I do "return new ModelAndView("listTasks").addObject("tasks",tasks);"

3.listTasks.jsp

<display:table name="tasks" uid="task" requestURI="listTasks.html"
    class="viewtable" pagesize="30">
    <display:column property ="title" />
</display:table>

4.

In spring-servlet.xml

<bean name = "/listTasks.html"
    class = "csns.spring.controller.ListOfTasksController">    
    <property name = "taskDao" ref="taskDao" />
    </bean>

In csns-data.xml

 
    <bean id="taskDao" parent="abstractTxnDefinition">
        <property name="target">
            <bean class="csns.model.dao.hibernate.TaskDaoImpl">
                <property name="sessionFactory" ref="sessionFactory" />
            </bean>
        </property>
    </bean>

......................

Please help so I can move forward:(

a. Why I am getting 404 - /csns/ ?

b. Is there any mapping that I did incorrect?

Last edited by Anna at 21:20 May 11, 2011.
agalstyan
Posts: 6
Posted 13:42 May 12, 2011 |

Hi Anna.  I was having a similar problem.  Try shutting down the server, refresh your project folder and run the project again.  That fixed the 404 problem for me.

Armen.

Anna
Posts: 7
Posted 13:48 May 12, 2011 |

Thanks Armen jan, for the reply.

Yesterday I tryied to stop the server and refresh my project and run again. That didn't help. I am not sure what you mean by saying shut down the server...

agalstyan
Posts: 6
Posted 14:04 May 12, 2011 |

Sorry, i left out some important details in my earlier post.  The reason I was getting a 404 was because of my hibernate.cfg.xml file.  It had something to do with the last two entries I put in, more specificly, <mapping resource="hbm/calendar/Task.hbm.xml" /> and <mapping resource="hbm/calendar/Event.hbm.xml" />.  For some reason, these two line were causing the errors for me.  Upon commenting them out, my CSNS ran just fine.  Then the refreshing and restarting the server.  So retrace your steps and see what which part is causing the errors.  Hope that help.

Armen.

Last edited by agalstyan at 14:28 May 12, 2011.
Anna
Posts: 7
Posted 15:49 May 12, 2011 |

My problem is fixed, thank you to Dr.Sun again!

The problem was desktop.ini file which should be deleted. It was making the server to not work in the right way.