X-man See my comments below
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 20, 2007 4:18 AM To: [email protected] Subject: Re: How to access session and request from Java service Skip, Your explanation cleared things up a lot. I tried your suggestion to include an attribute to my "java service", so that I will have the request in the context. <attribute name="request" type="javax.servlet.http.HttpServletRequest" mode="IN" optional="false"/> However, since the form before it does not have any value to be submiited, the service compains about missing the required parameter "request". What value should I submit to the service? >>>>>These values in the context map do not get their by magic. YOU, the developer have to make sure they get stuck there. As I mentioned, you will find no service that I know of that has a HttpServletRequest in the context Map. Once again, I suggest that you use the "java" type in your controller.xml file instead of the "service". Moreover, I found out that any context-param value from web.xml was not included in the context of a "service". They are accessible only if I use a "java event", via its servlet-type HttpServletRequest. >>>>I suggest that you use the "java" type in your controller.xml file instead of the "service". However, context-params are accessible from the map "parameters" in the screen widget and form widget. Is there a way to access them in a "service"? Or, what is the best practice to access a predefined variable (such as a context-param) from a "service"? >>>>You cannot get them in a service. That is not what a service is. I suggest that you use the "java" type in your controller.xml file instead of the "service". Many thanks for your help.
