Problem in Servlet Mapping with Spring Framework


N

Nettar

Hi,

I am new to SpringFramework.

I am facing a problem with Handler Mapping using DispatcherServlet.

Here is my web.xml snippet:

<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>*.service</url-pattern>
</servlet-mapping>

and myservlet-servlet.xml:

<bean id="urlMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="Login.service">loginService</prop>
</props>
</property>
</bean>

<bean id="loginService"
class="com.mycompany.service.LoginServiceImpl">
</bean>

Now, I am accessing the url:
http://localhost:8080/App/com.mycompany.App/Login.service

The web application "App" is deployed in JBoss 4

But I get an error which says:
No mapping for [/App/com.mycompany.App/Login.service] in
DispatcherServlet with name 'myservlet'

Can someone help me to find out what is wrong here?

Regards,
Jayarama Nettar.
 
Ad

Advertisements

Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top