Good day.

I am new to Spring and I don't know if its possible to get HttpSession
from "plainService" object ?

Firstly I create plainService bean - class which implements interface
with rpc methods.
Secondly create invoker bean using plainService bean and interface
with rpc methods
And finally create urlMapping bean using invoker

It works correctly but I don't know how to get HttpSession object in
PlainServiceImpl class.
Have any idea?

There are my classes:
=========================
common.PlainService  (interface)
=========================
public interface PlainService {

    String getDummyText();
}

=========================
common.PlainServiceImpl  (interface implementation)
=========================
public class PlainServiceImpl implements PlainService {
    public String getDummyText() {
        // how to get HttpSession?
        return "DummyText";
    }
}


config files:
=========================
springContext.xml
=========================

<bean id="plainService" class="service.impl.PlainServiceImpl"></bean>

<bean id="invoker"
class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
    <property name="service" ref="plainService" />
    <property name="serviceInterface" value="common.plainService"/>
</bean>

<bean id="urlMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="mappings">
        <props>
            <prop key="/plain.service">invoker</prop>
        </props>
    </property>
</bean>

=========================
WEB-INF/web.xml
=========================
<servlet>
    <servlet-name>servlet-service</servlet-name>

    <servlet-class>org.springframework.web.servlet.DispatcherServlet</
servlet-class>
    <load-on-startup>1</load-on-startup>
    <init-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:springContext.xml</param-value>
    </init-param>
</servlet>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to