File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Run correctly a Spring App on JBoss

 
Antonio Foglia
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to Spring and i'm developing my first application. I want to run it on JBoss AS 7.1. First of all i've configured jboss to deploy spring application and it works fine.

18:10:50,940 INFO [org.jboss.snowdrop] (ServerService Thread Pool -- 28) Activating Spring Deployer subsystem

So i've created my first simple Spring Maven Project and i've write a simple bean



So i've tried to include the Spring Project into an ear and then deploy it. I got no error but in the console i can't see "HELLO WORLD". I'm sure that i'm missing something to work fine with Spring
Thanks
 
Jayesh A Lalwani
Rancher
Pie
Posts: 2756
32
Eclipse IDE Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
WHat's your end goal? DO you want to learn how to build a web application with Spring? You might want to go through the SPring tutorial if you haven't already

The reason why you don't see Hello world is this:- For SPring to load your bean and call it, something has to ask Spring to load the application context. Spring won;t do it just because you have it in class path. Someone has to call the correct API that tells Spring to load the XML file. Normally, in an SPring MVC application, you declare a DispatcherServlet in your web.xml. This is a servlet provided by Spring. WHen the DispatcherServlet initializes, it loads the Spring XML file.

Your problem will be fixed by including DIspatcherservlet in web.xml. However, you will be better off going through the SPring tutorial
 
Antonio Foglia
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jayesh A Lalwani wrote:WHat's your end goal? DO you want to learn how to build a web application with Spring? You might want to go through the SPring tutorial if you haven't already

The reason why you don't see Hello world is this:- For SPring to load your bean and call it, something has to ask Spring to load the application context. Spring won;t do it just because you have it in class path. Someone has to call the correct API that tells Spring to load the XML file. Normally, in an SPring MVC application, you declare a DispatcherServlet in your web.xml. This is a servlet provided by Spring. WHen the DispatcherServlet initializes, it loads the Spring XML file.

Your problem will be fixed by including DIspatcherservlet in web.xml. However, you will be better off going through the SPring tutorial

thank you for your quick response
I had an EJB application that communicate with an android through MQTT protocol.
I've read about Spring, about IoC and about Spring Integration with MQTT. I foud it real interesting for several reasons(ioc, runnable as beans, integrations etc..)
So my real goal is to develop an application that receives, elaborate and store data received through Mqtt.
I also need a web interface too, like the one I had in the EJB application. I know i have to read a lot but i want to be sure if it is the correct way.
I will try with a web application in a first moment

Thanks
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic