Deploying the web application in Eclipse

In project properteis
  1. Right click on project root at Eclipse project explorer. 
    • At [Deployment Assembly]
    • [Add ..] [Java Build Path Entries]

  2. Choose [Maven Dependencies]

Otherwise, the first maven dependency class to be used will encounter ClassNotFoundException, most probably ContextLoaderListener specified in web.xml.

During startup, tomcat log will show the list of URI-handler mapping
INFO  DefaultAnnotationHandlerMapping - Mapped URL path [/durianview/v1] onto handler 'durianControllerAsView'
INFO  DefaultAnnotationHandlerMapping - Mapped URL path [/durianview/v1.*] onto handler 'durianControllerAsView'
INFO  DefaultAnnotationHandlerMapping - Mapped URL path [/durianview/v1/] onto handler 'durianControllerAsView'
INFO  DefaultAnnotationHandlerMapping - Mapped URL path [/duriangrove/h2g2j] onto handler 'durianGroveMVController'
INFO  DefaultAnnotationHandlerMapping - Mapped URL path [/duriangrove/h2g2j.*] onto handler 'durianGroveMVController'
INFO  DefaultAnnotationHandlerMapping - Mapped URL path [/duriangrove/h2g2j/] onto handler 'durianGroveMVController'
INFO  DefaultAnnotationHandlerMapping - Mapped URL path [/h1] onto handler 'durianMVController'
INFO  DefaultAnnotationHandlerMapping - Mapped URL path [/h1.*] onto handler 'durianMVController'
INFO  DefaultAnnotationHandlerMapping - Mapped URL path [/h1/] onto handler 'durianMVController'
INFO  DispatcherServlet - FrameworkServlet 'mvc-dispatcher': initialization completed in 160 ms

Example of accessing a URI of the web application:
http://localhost:8080/durian/v/h1

No comments:

Post a Comment