Spring MVC on weblogic

Hii Frnds
I have earlier developed struts application in weblogic 8.
Now i intend to develop a application on Spring MVC framework, and i want to use Weblogic as my application server.
But i am not getting any good examples to get started with.
Can any one provide me with a link to get started.
Can i use Weblogic 8 with springs ?

vaneet sharma wrote:
Hii Frnds
I have earlier developed struts application in weblogic 8.Are you using BEA Workshop?
Now i intend to develop a application on Spring MVC framework, and i want to use Weblogic as my application server.
But i am not getting any good examples to get started with.
Can any one provide me with a link to get started.Try the examples listed in the Spring download for WebLogic.
http://commerce.bea.com/showproduct.jsp?family=SPRING&major=1.2.5&minor=0
>
Can i use Weblogic 8 with springs ?Generically, yes. Our download only works with 9.x.
br

Similar Messages

  • Spring MVC Portlet in Weblogic Portal

    Is there any sample application for Spring MVC Portlet(JSR 168) in Weblogic Portal ? If so, where can I download it from ?

    you can get spring source code,then open spring samples folder,and spring portlet can transplant to weblogic portal

  • Spring MVC Portlet minimize not working on Weblogic 10.3.0

    We have written JSR 168 Portlets using spring MVC portlet framework. Everything works fine except for the minimize portlet functionality.
    The title bar changes that is minimize becomes restore but the portlet body (content) is always visible.
    Please let me know if any of you faced this issue and how to resolve it.

    Hello,
    From what I can see from the Spring DispatcherPortlet source (I used http://www.docjar.com/html/api/org/springframework/web/portlet/DispatcherPortlet.java.html ), it looks like this is a bug in the DispatcherPortlet. The JSR168 / JSR286 specification requires that portlets not render themselves during the render lifecycle if they are minimized, and I don't see any code in the DispatcherPortlet that checks for the portlet state. From the source in the URL above, it looks like if you added this code at line 701 inside of the doRenderService() method of DispatcherPortlet and re-compiled that code, it might work for you:
            if(request.getWindowState().equals(javax.portlet.WindowState.MINIMIZED)) {
                return;
            }Alternately, you can change your portlet.xml so instead of using the Java class org.springframework.web.portlet.DispatcherPortlet you point it at your own class:
    package sample.package;
    public class MinimizedAwareDispatcherPortlet extends org.springframework.web.portlet.DispatcherPortlet
        @Override
        protected void doRenderService(javax.portlet.RenderRequest request, javax.portlet.RenderResponse response) throws Exception {
            if(request.getWindowState().equals(javax.portlet.WindowState.MINIMIZED)) {
                return;
            super.doRenderService(request, response);
    }Kevin

  • Spring MVC Portlet Question in JDeveloper 11.1.1.4

    Hello All,
    I am trying to develop a spring mvc portlet and test it in Jdeveloper 11.1.1.4 (integrated weblogic server). Below is my portlet.xml ... I don't think portlet-class is getting loaded. Even if i put xxxxx in the classname i don't see any errors. Has anyone done this before, what to see if there is any suggestions.
    I have a controller configured in helloWorld-portlet.xml and it is not getting invoked.
    thanks in advance,
    Prasad.
    <portlet id="1341320919131">
    <portlet-name>helloWorld</portlet-name>
    <display-name xml:lang="en-US">HelloWorld</display-name>
    <display-name xml:lang="en">English Display Name</display-name>
    <portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class>
    <init-param>
    <name>contextConfigLocation</name>
    <value>/WEB-INF/helloWorld-portlet.xml</value>
    </init-param>
    <expiration-cache>0</expiration-cache>
    <supports>
    <mime-type>text/html</mime-type>
    <portlet-mode>view</portlet-mode>
    </supports>
    <supported-locale>en-US</supported-locale>
    <resource-bundle>content.Language-ext</resource-bundle>
    <portlet-info>
    <title>HelloWorld</title>
    <short-title>HelloWorld</short-title>
    <keywords></keywords>
    </portlet-info>
    <portlet-preferences>
    <preference>
    <name>portletTitle</name>
    <value>value1</value>
    </preference>
    </portlet-preferences>
    </portlet>
    <custom-portlet-mode>
    <portlet-mode>about</portlet-mode>
    </custom-portlet-mode>
    <custom-portlet-mode>
    <portlet-mode>config</portlet-mode>
    </custom-portlet-mode>
    <custom-portlet-mode>
    <portlet-mode>edit_defaults</portlet-mode>
    </custom-portlet-mode>
    <custom-portlet-mode>
    <portlet-mode>preview</portlet-mode>
    </custom-portlet-mode>
    <custom-portlet-mode>
    <portlet-mode>print</portlet-mode>
    </custom-portlet-mode>
    </portlet-app>

    Also, I want to find if portlet.xml will be invoked only if deployed into webcenter, right now i am trying to run the helloWorld.jsp from Jdeveloper at url - http://127.0.0.1:7101/helloWorld/helloWorld/html/helloWorld.jsp and i am getting an empty page

  • Regarding RESTful WEB SERVICES with SPRING MVC Framework

    Hi,
    Can anyone explain me about RESTful WEB SERVICES with SPRING MVC Framework .
    It is urgent for me.
    Thanks
    Venkat Jalli

    Hi Manoj,
    I am also new to Spring MVC portlet. But, I tried to see the difference between sample spring portlet and your code below. Issue that I can see is, in your code, you have not mapped your servlet container with portlet application. So, in theory, your servlet containder do not know that you have a servlet. Let me try to explain from sample portlet,
    In portlet.xml, they have something like below:-
    <portlet-name>swf-booking-mvc</portlet-name>
    <display-name>Spring Webflow Booking MVC</display-name>
    <portlet-class>org.springframework.web.portlet.DispatcherPortlet</portlet-class>
    And in web.xml, they have below:-
    <servlet-name>swf-booking-mvc</servlet-name>
    <servlet-class>org.apache.pluto.core.PortletServlet</servlet-class>
    <init-param>
    <param-name>portlet-name</param-name>
    <param-value>swf-booking-mvc</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    This web.xml is for Pluto portlet container and there will something similar for Weblogic portal as well that I am trying to figure out :(
    Thanks,
    Sanjeev

  • How to use Spring MVC instead of assembler.jsp in endeca 3.1.0

    Hi ,
    I am new to Endeca . I want to use spring MVC instead of assembler.jsp .Some body please help
    me how can i do it. Wht all i have to do to achieve it.
    Thanks
    Mark

    Hi Mark,
    When using the 3.1 Assembler in your application, you can use either the jar file directly or set up the Assembler as an HTTP service and process the XML or JSON responses. Neither of these approaches conflicts with using Spring in your application.
    Sean

  • Help on getting started with Spring MVC, WebFlow; Where can it be applied ?

    I'm an individual programmer, developer and I see a huge demand (at the corporate level) for the frameworks: Spring, Spring MVC, webflow, and Hibernate. Popular today: Spring MVC, webflow, GWT.
    I've been going through the tutorials, and the technology looks awesome ! What I would like to know, is.. It's used in corporate sites, why not for smaller sites. How can I apply these frameworks in building websites ?
    I can't imaging doing any kind of serious website building without a modern CMS or Portal framework (whether in Java/php-opensource), And yes, MVC gives you the validation and authentication hooks to be used.
    The spring framework, with it's extensive scope, is a bit overwhelming, and implies that there could be a significant amount of architecture, design and planning time needed before starting implementation on a project
    All the demo's on Spring, cover some elementary, contrived example.
    If I learn these technologies (and I'm well on my way), how do I put them into practice, and in what context (no pun intented) do I use them ? I don't want to rebuild a CMS system, but I'd like to employ these frameworks effectively.

    user1944443 wrote:
    The spring framework, with it's extensive scope, is a bit overwhelming, and implies that there could be a significant amount of architecture, design and planning time needed before starting implementation on a projectYes, usually there is. Unless you're using the frameworks to build a home page for your kittens. Then you usually don't need to put that much effort into it.
    All the demo's on Spring, cover some elementary, contrived example.I'm sure you realize that they have to. There's no "follow these examples and you'll become a competent programmer" method of learning invented yet and frameworks usually need to document the basic cases extensively.
    If I learn these technologies (and I'm well on my way), how do I put them into practice, and in what context (no pun intented) do I use them ? I don't want to rebuild a CMS system, but I'd like to employ these frameworks effectively.You'll just need to come up with a project you'll be interested in finishing or at least developing for a while.
    I'm not sure whether I managed to answer your question or not, but if anything was left unclear, just ask.

  • Override Spring jar in Weblogic 12c

    Hi Folks,
    We have been facing an issue while overriding the Spring jar in Weblogic 12c. Basically we need to write a bean based on some 3rd party API calling their interfaces. Now they use Spring 2.5 jar for their own implementation. Since Weblogic inherently supports Spring 3.0 jar. As a result when we write our bean wrapping their interfaces and deploy it, it doesn't work. We replicated the issue by replacing Spring 2.5 jar with Spring 3 in local environment.
    If we modify the server classpath to load the Spring 2.5 jar (preceding Spring 3.0), entire soa-infra application goes down, so what We wanted to know if it is possible to override the Spring jar only for our application itself? While loading the application it will override the Spring 3.0 jar with Spring 2.5 in the application context but server will keep using Spring 3.0?
    Any ideas/suggestions highly appreciated!
    Thanks,
    Bhaskar

    Hi Bhaskar,
    have you tried packing the Spring libraries in your application and using the Filterring Classloader? Maybe this links can help you :
    Understanding WebLogic Server Application Classloading
    http://docs.oracle.com/cd/E24329_01/web.1211/e21049/weblogic_xml.htm#WBAPP601
    http://stackoverflow.com/questions/11476874/weblogic-10-3-5-overriding-spring-version
    best regards, Nicolas

  • Spring-WS with Weblogic 9.2 - HTTP 404 Error

    Have deployed our Spring-WS on Weblogic 9.2 on Windows environment. The spring-ws jars have been copied to server lib directory. The the app. is deployed at the webcontext caobshared. There were no issues while deploying. Am testing the service from a soapUI tool. The url I am using is http://localhost:7002/caobshared/services. I do not see any errors or any debug statements I have in the webservice methods in the server log. Believe I am missing something or specifying incorrectly.
    We need to make a decision on using Spring-WS soon, based on the POC I working on. Any help or suggestions highly appreciated.
    web.xml file:
    <web-app 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"
    version="2.4">
    <display-name>CAOB Shared Service</display-name>
    <!-- take especial notice of the name of this servlet -->
    <servlet>
    <servlet-name>caob-shared</servlet-name>
    <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
    <init-param>
    <param-name>transformWsdlLocations</param-name>
    <param-value>true</param-value>
    </init-param>
    </servlet>
         <servlet-mapping>
    <servlet-name>caob-shared</servlet-name>
    <url-pattern>/services</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
    <servlet-name>caob-shared</servlet-name>
    <url-pattern>*.wsdl</url-pattern>
    </servlet-mapping>
    </web-app>
    caob-shared-servlet.xml file:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
    http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.0.xsd">
    <!-- ===================== ENDPOINTS ===================================== -->
    <!--
    The marshallingEndpoint handle the messages.
    -->
         <bean id="documentationService" class="com.boea.caob.ws.documentation.DocumentationService"/>
    <bean id="documentationServiceEndpoint" class="com.boea.caob.ws.DocumentationServiceEndpoint">
    <description>
    This endpoint handles the DocumentService Web Service messages using JAXB2 marshalling.
    </description>
    <constructor-arg ref="documentationService"/>
    </bean>
    <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
    <description>
    The JAXB 2 Marshaller is used by the endpoints.
    </description>
    <property name="contextPath" value="com.boea.jaxb.caob.documentation.ws.jaxb"/>
    </bean>
    <!-- ===================== ENDPOINT MAPPINGS ============================== -->
    <!-- ===================== ENDPOINT ADAPTERS ============================== -->
    <!--
    Endpoint adapters adapt from the incoming message to a specific object or method signature. Because this
    example application uses three different endpoint programming models, we have to define three adapters. This
    is done for illustration purposes only, typically you would use one adapter, for instance the
    MarshallingMethodEndpointAdapter.
    -->
    <bean class="org.springframework.ws.server.endpoint.adapter.MarshallingMethodEndpointAdapter">
    <description>
    This adapter allows for methods that need and returns marshalled objects. The MarshallingEndpoint
    uses JAXB 2 objects.
    </description>
    <constructor-arg ref="marshaller"/>
    </bean>
    <!-- ===================== WSDL DEFINITION ============================== -->
    <!-- Exposing a static WSDL -->
    <!--
         <bean id="documentService" class="org.springframework.ws.wsdl.wsdl11.SimpleWsdl11Definition">
         <constructor-arg value="/xsd/DocumentService.wsdl"/>
         </bean>
         -->
         <!-- Dynamically creating a WSDL from an XSD -->
    <bean id="documentService" class="org.springframework.ws.wsdl.wsdl11.DynamicWsdl11Definition">
    <description>
    Dynamically builds a WSDL from the DocumentService.xsd.This bean definition represents the DocumentService.wsdl file found
    in the root of the web application. It is used
    by the WsdlDefinitionHandlerAdapter in caob-shared-servlet.xml.
    </description>
    <property name="builder">
    <bean class="org.springframework.ws.wsdl.wsdl11.builder.XsdBasedSoap11Wsdl4jDefinitionBuilder">
    <property name="schema" value="/xsd/DocumentService.xsd"/>
    <property name="portTypeName" value="DocumentationPort"/>
    <property name="locationUri" value="http://localhost:8080/documentation/services"/>
    <property name="targetNamespace"
    value="http://www.test.com/caob/webservices/documentation/definitions"/>
    </bean>
    </property>
    </bean>
    </beans>
    Thanks
    Sunil

    Did you see this: https://www120.livemeeting.com/cc/bea/view?id=BEA092006cc&pw=ATTBEA&cn=
    not sure but this may be helpful

  • Integrate Crystal Reports with Spring MVC and Hibernate

    Hi all,
    having successfully used the JRC version 11.8.4.1094 in a Java environment with:
    1)JBoss 4.2.3,
    2)Oracle 11,
    3)EJB 2,
    4)Crystal Reports 2008,
    I would like to integrate Crystal Reports into my existing spring MVC and hibernate web app using:
    1)CRJ version 12.2.209,
    2)JBoss 5.1,
    3)Oracle 11,
    4)EJB 3,
    5)Crystal Reports 2008,
    reusing code integration. I used ReportExportControl and I produced the PDF directly.
    The error occurs when returning from EJB, into Delegate, and is the following:
    09:36:23,046 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
    09:36:23,062 WARN  [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container
    09:38:03,062 ERROR [[dispatcher]] Servlet.service() for servlet dispatcher threw exception
    java.lang.InstantiationException: com.crystaldecisions.sdk.occa.report.exportoptions.ReportExportFormat
         at java.lang.Class.newInstance0(Class.java:340)
         at java.lang.Class.newInstance(Class.java:308)
         at org.jboss.serial.classmetamodel.ClassMetaData.newInstance(ClassMetaData.java:334)
         at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:239)
         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
         at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
         at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
         at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
         at org.jboss.serial.persister.RegularObjectPersister.readSlotWithFields(RegularObjectPersister.java:353)
         at org.jboss.serial.persister.RegularObjectPersister.defaultRead(RegularObjectPersister.java:273)
         at org.jboss.serial.persister.RegularObjectPersister.readData(RegularObjectPersister.java:241)
         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.readObjectDescriptionFromStreaming(ObjectDescriptorFactory.java:412)
         at org.jboss.serial.objectmetamodel.ObjectDescriptorFactory.objectFromDescription(ObjectDescriptorFactory.java:82)
         at org.jboss.serial.objectmetamodel.DataContainer$DataContainerInput.readObject(DataContainer.java:845)
         at org.jboss.serial.io.MarshalledObjectForLocalCalls.get(MarshalledObjectForLocalCalls.java:60)
         at org.jboss.ejb3.remoting.IsLocalInterceptor.invokeLocal(IsLocalInterceptor.java:101)
         at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:72)
         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
         at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
         at $Proxy286.invoke(Unknown Source)
         at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:207)
         at org.jboss.ejb3.proxy.impl.handler.session.SessionProxyInvocationHandlerBase.invoke(SessionProxyInvocationHandlerBase.java:164)
         at $Proxy284.getXXXX(Unknown Source)
         at xx.xxx.xxxxxx.spring.manager.report.ReportManagerImpl.getXXXX(ReportManagerImpl.java:26)
         at xxx.xxxx.springprova.WelcomeController.handleRequestInternal(WelcomeController.java:70)
         at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
         at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
         at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:790)
         at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:719)
         at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
         at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
         at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
         at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:662)
    Have an idea, please?
    Thank you.

    You'll need to install the Crystal .NET that comes with VS 2005. You then install Crystal XI R2 over the top and not only will Crystal be integrated with the IDE, it should use the updated assemblies from R2.
    -Dell
    - A computer only does what you told it to, not what you thought you told it to!</p>

  • Spring MVC n JSP

    Hi
    I'm using spring MVC framework to design an application. I'm accepting the user login id and password,verifying it with thw database and then granting access to the next page. The prob is, after logging in if the user clicks on the browser back button and then again next button he is able to do so without asking for his userid and password. How do I prevent this free to and fro movement from the login page to the next page and vice-versa.
    Any help is greatly appreciated.

    Hi,
    Thanks for ur reply. Can u please elaborate little how to use them or any site or thread where I can find info about using tokens for this purpose.

  • Please Help For the Spring MVC Framework

    Someone please give me some file that represent the example of implementation of Spring MVC Framework.

    User,
    I read your post and had one word pop to mind: "huh?"
    Perhaps [url http://catb.org/~esr/faqs/smart-questions.html]this and [url http://www.oracle.com/technology/products/jdev/howtos/1013/SpringwithJDev/index.html]this will be helpful to you.
    John

  • Basic Spring Interaction with WebLogic Portal

    Can you please post the article "Basic Spring Interaction with WebLogic Portal" by Article by Mark Meyer and Don Davis. Actually it was posted in http://dev2dev.bea.com/pub/a/2006/09/weblogic-portal-spring.html but after the BEA's acquisition by ORACLE, this link was not active. Can some one please assist regarding the same ?

    The archived dev2dev articles are suppose to be available at:
    http://www.oracle.com/technology/pub/articles/dev2arch/index.html
    But in a brief review of this site, I did not see this exact title. Maybe someone else knows where that one is.
    There are many other spring related articles there you may find helpful as well.

  • Using WS-Security with Spring application in WebLogic

    From a high level, are there any issues with using WS-Security in WebLogic 8 or 9 with an application constructed with Spring? What issues might come up between WS-Security and Spring that might make this complicated?

    You won't be able to do this using the WSSE file.
    An easy way to get around this is to use an XML Bean built from the WS-Security XML Schema. You'll have to read the WS-Security spec to determine how to create the nonce, but you'll be able to convert this XML Bean into the Element[] that the setOutputHeaders() method, which is on the service control you call the .NET Web Service with.
    Regards,
    Mike Wooten

  • Tomcat, Spring MVC - 404

    Hi
    I have started developing a website. The project is very small atm - one BO, DAO, one domain object, spring beans, hibernate config and mapping files, one jsp. When I deploy it on Tomcat 7 I get 404 error. I would appreciate if anyone could have a look at the code and tell me what I am doing wrong.
    Here is some code:
    <?xml version="1.0" encoding="UTF-8"?>
    <javaee:web-app version="3.0"
                        xmlns:javaee="http://java.sun.com/xml/ns/javaee"
                        xmlns:xml="http://www.w3.org/XML/1998/namespace"
                        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
                        http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">
         <javaee:display-name>My Website</javaee:display-name>
         <javaee:servlet>
              <javaee:servlet-name>mvc-dispatcher</javaee:servlet-name>
              <javaee:servlet-class>org.springframework.web.servlet.DispatcherServlet</javaee:servlet-class>
              <javaee:load-on-startup>1</javaee:load-on-startup>
         </javaee:servlet>
         <javaee:servlet-mapping>
              <javaee:servlet-name>mvc-dispatcher</javaee:servlet-name>
              <javaee:url-pattern>*.htm</javaee:url-pattern>
         </javaee:servlet-mapping>
         <javaee:welcome-file-list>
              <javaee:welcome-file>welcome.jsp</javaee:welcome-file>
         </javaee:welcome-file-list>
    </javaee:web-app>
    <?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-3.0.xsd">
         <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
              <property name="prefix">
                   <value>/WEB-INF/pages/</value>
              </property>
              <property name="suffix">
                   <value>.jsp</value>
              </property>
         </bean>
         <bean name="/welcome.htm" class="com.michalmyszka.mywebsite.controller.WelcomeController"/>
    </beans>
    <project xmlns="http://maven.apache.org/POM/4.0.0"
                   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                                            http://maven.apache.org/maven-v4_0_0.xsd">
         <modelVersion>4.0.0</modelVersion>
         <groupId>com.michalmyszka</groupId>
         <artifactId>my-website</artifactId>
         <packaging>war</packaging>
         <version>1.0</version>
         <name>My Website</name>
         <url>www.michalmyszka.com</url>
         <repositories>
              <repository>
                   <id>Java.Net</id>
                   <url>http://download.java.net/maven/2/</url>
              </repository>
         </repositories>
         <dependencies>
              <dependency>
                   <groupId>junit</groupId>
                   <artifactId>junit</artifactId>
                   <version>3.8.1</version>
                   <scope>test</scope>
              </dependency>
              <dependency>
                   <groupId>javax</groupId>
                   <artifactId>javaee-api</artifactId>
                   <version>6.0</version>
                   <scope>provided</scope>
              </dependency>
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring</artifactId>
                   <version>2.5.6</version>
                   <scope>compile</scope>
              </dependency>
              <dependency>
                   <groupId>org.springframework</groupId>
                   <artifactId>spring-webmvc</artifactId>
                   <version>2.5.6</version>
                   <scope>compile</scope>
              </dependency>
              <dependency>
                   <groupId>org.hibernate</groupId>
                   <artifactId>hibernate</artifactId>
                   <version>3.2.7.ga</version>
                   <scope>compile</scope>
              </dependency>
              <dependency>
                   <groupId>javax.transaction</groupId>
                   <artifactId>jta</artifactId>
                   <version>1.1</version>
                   <scope>compile</scope>
              </dependency>
         </dependencies>
         <build>
              <finalName>my-website</finalName>
              <plugins>
                   <plugin>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>2.3.2</version>
                        <configuration>
                             <source>1.6</source>
                             <target>1.6</target>
                        </configuration>
                   </plugin>
              </plugins>
         </build>
    </project>Anything else that could help identifying the problem?
    Edited by: user7420330 on Dec 23, 2010 11:48 AM

    Indeed, it's the "The default HandlerMapping that the DispatcherServlet uses is the BeanNameUrlHandlerMapping; this class will use the bean name to map to the URL in the request so that the DispatcherServlet knows which controller must be invoked for handling different URLs." that takes those form of bean names. Also not a very good handler, except for testing.
    So let's go through this systematically:
    You say you call the index.jsp and it would then redirect to /hello.htm, where your controller is waiting.
    Can you invoke the /hello.htm directly?
    What happens if you try to access it like: http://localhost:8080/foobar/hello.htm ?
    Any error messages / other output at the server?

Maybe you are looking for