Re: Fwd: Re: Fwd: how to use Request and other 'special objects'?
Marc Palmer <[email protected]>
| Newsgroups | gmane.comp.java.webmacro.user |
|---|---|
| Organization | AnyWare Ltd. |
| Message-ID | <[email protected]> |
Peter Smith wrote: > I think I've failed to effectively communicate my > situation. Here's another try: > > Is it possible to implicitly access the > HttpServletRequest object in a WebMacro > template (in a servlet environment), just > as in a JSP page? Yes, it works out of the box, in $Request. I'm in JSP-land at the moment at work... but am a seasoned WM user. The RequestTool is enabled by default in Webmacro.defaults for as long as I can remember, so there is nothing to do to make this work. What does the following template do for you? <html> <body> <b>Request is: $Request</b> </body> </html> ? For as long as I can remember this just works out of the box, as long as you are using a WebContext (WM.getWebContext()) to use when evaluating the page. Cheers -- Marc Palmer [email protected] Wangjammers - Java, J2ME and Web Consultants ~ http://www.wangjammers.org/ ------------------------------------------------------- This SF.Net email is sponsored by Oracle Space Sweepstakes Want to be the first software developer in space? Enter now for the Oracle Space Sweepstakes! http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click