aspose file tools*
The moose likes Spring and the fly likes Tomcat not seeing my spring mvc app's Servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Tomcat not seeing my spring mvc app Watch "Tomcat not seeing my spring mvc app New topic
Author

Tomcat not seeing my spring mvc app's Servlet?

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1083
I'm typing in code doing a "simple" Spring MVC application.

However, when I run it, I keep getting "Resource unavailable" regardless of the URL I use (same result in Tomcat Manager application).

It seems that somehow, the Spring Servlet - which I'm not creating, only referencing, somehow isn't being connected.

<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

I've updated both web.xml and the associated "dispatcher" servlet.xml file, but even the simplest example doesn't work.

Creating a standard (local) servlet works fine and I can create one in about a minute.

I'm not sure what I'm missing (obviously...).

I'm cutting and pasting code from an example trying to get the simplest of examples to work. (http://maestric.com/doc/java/spring/hello_world)

Any help or suggestions would be appreciated.

Thanks.

Mike

David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Moving to Spring.
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Have you increased the logging levels and examined the Tomcat startup output? What libraries are you deploying? What version of Spring?
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1083
Hi David,

I fixed this problem. Turned out to be an improper implemented class.

Thanks for your reply.

-- Mike
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat not seeing my spring mvc app's Servlet?