Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

Problem in Servlet Mapping with Spring Framework

Thread view: 
Nettar - 24 Nov 2006 15:56 GMT
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.
Jean-Francois Briere - 24 Nov 2006 18:46 GMT
Do instead:

<prop key="/**/Login.service">loginService</prop>

Regards
Nettar - 25 Nov 2006 10:08 GMT
Hi,

Thanks a lot. It solved my problem.

Regards,
Jayarama Nettar.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.