wood burning stoves 2.0*
The moose likes Spring and the fly likes Deploying Simple Spring MVC webapp to Weblogic 9.2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Deploying Simple Spring MVC webapp to Weblogic 9.2" Watch "Deploying Simple Spring MVC webapp to Weblogic 9.2" New topic
Author

Deploying Simple Spring MVC webapp to Weblogic 9.2

Richard Ellison
Ranch Hand

Joined: Jun 04, 2008
Posts: 51
Hello,
I am trying to deploy a Simple Spring MVC based app to Weblogic 9.2.I am trying to deploy this application in an exploded format.I get an 404 error when I access the url.Following is the structure of this web app:
a)The name of the app is springapp.
b)Under springapp I have a folder-WEB-INF.
c)Under WEB-INF,I have 2 xml files-web.xml and springapp-servlet.xml.These are the contents of springapp-servlet.xml:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">

<!-- the application context definition for the springapp DispatcherServlet -->

<bean name="/hello.htm" class="springapp.web.HelloController"/>

</beans>
d)I have a classes and a lib folder under WEB-INF.In the classes folder,I have a controller class called HelloController which implements the Controller interface.
I think I do have the required jar files in the lib folder.

e)I have a jsp called hello.jsp under the WEB-INF folder.

When I access the url "http://localhost:7001/springapp/hello.htm" I get a Error 404-not found.This implies that the server is not able to locate the resource.
This is a simple enough application.Not sure if the error is in the XML namespace defined in the springapp-servlet .xml.Not sure if it is compatible with Weblogic 9.2.

I look forward to hearing from you.

Thanks
Richard
Richard Ellison
Ranch Hand

Joined: Jun 04, 2008
Posts: 51
These are the contents of the web.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID"
version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

<welcome-file-list>

<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

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

<servlet-mapping>
<servlet-name>springapp</servlet-name>
<url-pattern>*.htm</url-pattern>
</servlet-mapping>



</web-app>



Thanks

Richard
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deploying Simple Spring MVC webapp to Weblogic 9.2
 
Similar Threads
Problem finding index page under WEB-INF / Spring MVC
Error: spring-servlet.xml
Failed to read schema document 'http://www.springframework.org/schema/beans/spring-beans-2.5.xsd',
Integrating Spring 2.5 and a legacy Servlet Application
Problem in spring sample application