Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat not seeing my spring mvc app's Servlet?

 
Mike London
Ranch Hand
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to Spring.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi David,

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

Thanks for your reply.

-- Mike
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic