Jahia Dev Forum > Jahia module with...

0 (0 Good)
0 (0 Bad)

Jahia module with SpringMVC controller

by  wondermach »  2011/07/07 17:36

Hi,

I'm trying to build a module with a custom SpringMCV controller.

I've defined a new class which implements Controller and I've mapped in the module's spring configuration this way:

 

 

<bean name="dummyController" class="it.test.DummyController" init-method="startup">
<property name="success" value="dummy.jsp" />
</bean>
 
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<value>
/dummy=dummyController
</value>
</property>
</bean>
 
When I deploy the module, the controller is correctly loaded and mapped: "AbstractUrlHandlerMapping, org.springframework.web.servlet.handler.SimpleUrlHandlerMapping: Mapped URL path [/dummy] onto handler 'dummyController'".
Anyway, when i try to access the controller at http://localhost:8080/dummy it doesn't respond.
The log file reports "org.jahia.bin.errors.ErrorLoggingFilter: [Error code: 404]: Requested resource is not available: /dummy".
 
How is the controller mapped ? Is it really possibile to declare a custom controller inside a module ?
 
Thanks a lot,
 
Davide

  (wondermach)

Number of messages  1
Registration date
Contact
Share
Feedback

Get in touch

Whether you are a current user or if you are just evaluating Jahia, we are here to help.

Contact us

Share this page