hi,
> I want to access the client browser's IP in my action class.
> I want to retrieve country name based on the IP
> and return it as output parameter and finally pass this parameter to my
> xsl where the country specific information will be displayed.
you should do something like this in your action:
public Map act(Redirector redirector, SourceResolver resolver, Map
objectModel, String source, Parameters parameters) throws Exception {
Map result = new HashMap();
String remoteIp =
ObjectModelHelper.getRequest(objectModel).getRemoteAddr();
// your code
result.put("country", remoteIp); // add your value to the map
return result;
}
the sitemap should look like this:
<map:match pattern="bar">
<map:act type="yourAction">
<map:generate src="foo.xml"/>
<map:transform src="foo.xsl">
<map:parameter name="c" value="{country}"/>
</map:transform>
</map:act>
<map:serialize type="xml"/>
</map:match>
hth
kind regards
jens
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]