[jboss-user] [Snowdrop] - hello world example not working

Ken Dougan do-not-reply at jboss.com
Thu Nov 24 18:20:25 EST 2011


Ken Dougan [http://community.jboss.org/people/kdougan] created the discussion

"hello world example not working"

To view the discussion, visit: http://community.jboss.org/message/638266#638266

--------------------------------------------------------------
I am new to Spring 3 so I thought I would try out Snowdrop 2 on Jboss 6.  So I downloaded the spring deployer from http://www.jboss.org/snowdrop/downloads and selected the JBoss AS 6 with Spring 3. Seems pretty easy to install in JBoss's server/default/deployers/spring.deployer/ directory.  I did however bundle the spring .jars within the application archive as you will see below.

I found a simple hello world example to try out: http://viralpatel.net/blogs/2010/06/spring-3-mvc-create-hello-world-application-spring-3-mvc.html.  However I could not get the example to work so I am frustrated.  I also didn't like that I have to do this all through eclipse.  I wanted to understand how to deploy a .war/.jar directly to server/default/deploy/.

So what I did was package the example with the following:

C:\MyProjects\eclipse\workspace\Spring3MVC\dist>jar tvf Spring3MVC.war
     0 Thu Nov 24 09:18:24 MST 2011 META-INF/
    71 Thu Nov 24 09:18:24 MST 2011 META-INF/MANIFEST.MF
   144 Mon Jun 21 17:38:52 MDT 2010 index.jsp
     0 Thu Nov 24 09:17:34 MST 2011 WEB-INF/
     0 Thu Nov 24 09:17:34 MST 2011 WEB-INF/classes/
     0 Thu Nov 24 09:17:34 MST 2011 WEB-INF/classes/net/
     0 Thu Nov 24 09:17:34 MST 2011 WEB-INF/classes/net/viralpatel/
     0 Thu Nov 24 09:17:34 MST 2011 WEB-INF/classes/net/viralpatel/spring3/
     0 Thu Nov 24 09:17:34 MST 2011 WEB-INF/classes/net/viralpatel/spring3/controller/
  1022 Wed Nov 23 21:50:20 MST 2011 WEB-INF/classes/net/viralpatel/spring3/controller/HelloWorldController.class
     0 Thu Nov 24 09:17:34 MST 2011 WEB-INF/jsp/
   131 Mon Jun 21 17:39:02 MDT 2010 WEB-INF/jsp/hello.jsp
     0 Thu Nov 24 09:17:34 MST 2011 WEB-INF/lib/
  4467 Fri Aug 26 21:19:32 MDT 2011 WEB-INF/lib/aopalliance.jar
 69784 Tue Oct 18 15:51:00 MDT 2011 WEB-INF/lib/snowdrop-deployers.jar
 22804 Tue Oct 18 15:50:48 MDT 2011 WEB-INF/lib/snowdrop-vfs.jar
321428 Tue Oct 18 15:50:38 MDT 2011 WEB-INF/lib/spring-aop.jar
 53082 Tue Oct 18 15:50:36 MDT 2011 WEB-INF/lib/spring-asm.jar
556590 Tue Oct 18 15:50:42 MDT 2011 WEB-INF/lib/spring-beans.jar
101450 Tue Oct 18 15:50:40 MDT 2011 WEB-INF/lib/spring-context-support.jar
670258 Tue Oct 18 15:50:38 MDT 2011 WEB-INF/lib/spring-context.jar
382184 Tue Oct 18 15:50:38 MDT 2011 WEB-INF/lib/spring-core.jar
169752 Tue Oct 18 15:50:38 MDT 2011 WEB-INF/lib/spring-expression.jar
398149 Tue Oct 18 15:50:44 MDT 2011 WEB-INF/lib/spring-web.jar
419488 Tue Oct 18 15:50:40 MDT 2011 WEB-INF/lib/spring-webmvc.jar
   922 Sat Jun 19 15:58:10 MDT 2010 WEB-INF/spring-servlet.xml
   806 Mon Jun 21 19:20:26 MDT 2010 WEB-INF/web.xml

If you need to see the source then go to http://viralpatel.net/blogs/2010/06/spring-3-mvc-create-hello-world-application-spring-3-mvc.html (http://viralpatel.net/blogs/2010/06/spring-3-mvc-create-hello-world-application-spring-3-mvc.html).   I didn't change anything.  All I did was create a deployable archive.  But it doesn't not work when I click on the 'Say Hello' link in the index.jsp I get the following message:
 
*message* /Spring3MVC/hello
 
*description* The requested resource (/Spring3MVC/hello) is not available.


If I look in the Jboss \server\default\work\ directory I only see the index.jsp servlet.  So there must be something wrong with the deployment package and the spring .xml files.

Does anyone have any advice how to fix this please?

Thanks
Ken
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/638266#638266]

Start a new discussion in Snowdrop at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2082]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111124/ee476a88/attachment-0001.html 


More information about the jboss-user mailing list