[opencms-dev] Request object
M Butcher
mbutcher at grcomputing.net
Thu Jul 17 23:25:02 CEST 2003
Seems like there may be a few ways to do that.
First of all, if you can get the request (HttpServletRequest) from the
class (e.g. cms.getRequest()), then you can use setAttribute(String,
Object) to add a new param and getAttribute(String) to get it. I don't
know what the scope of attributes are, so you may have to do some
testing to make sure that the values aren't persisting too long.
Second, I think there is a similar facility in
com.opencms.file.RequestContext -- and you can get the request context
from cms.getRequestContext()
Third, you could use the CmsSession object, I think, though it persists,
so you'd have to remove stuff once you were done.
In any case, I don't know of a way to add stuff to the parameters in a
HttpServletResponse once it is initialized. If anyone knows how, I'd
like to learn.
Hope at least one of those will work.
Matt
On Thu, 2003-07-17 at 13:22, Urich, Chase wrote:
> Sorry about that.
>
> Yes, cms is a CmsJspActionElement. What I am trying to do is read the
> contents of a JSP page that includes a Page based on a value I pass to
> it. So I have this:
>
> Java Class --read_contents--> JSP --include--> Page type.
>
> I need to pass a parameter to the JSP page so that it knows what file to
> include.
>
> Chase Urich
> LeTourneau University
> Web Programmer
> ---------------------
> Linux: Because rebooting is for adding hardware
>
> -----Original Message-----
> From: M Butcher [mailto:mbutcher at grcomputing.net]
> Sent: Thursday, July 17, 2003 2:45 PM
> To: opencms-dev at opencms.org
> Subject: Re: [opencms-dev] Request object
>
>
> Would you mind elaborating a bit -- it's not exactly clear what you are
> trying to do. I assume cms is a CmsJspActionElement -- are you trying to
> pass parameters into the resource that that call will render?
>
> On Thu, 2003-07-17 at 13:04, Urich, Chase wrote:
> > I need to pass a parameter to a file that I am reading in with
> > cms.getContent(...). Can anyone tell me an easy way of doing this? I
> > have been told to add it to the request, but I don't know how to do
> > that from inside a java class.
> >
> > Chase Urich
> > LeTourneau University
> > Web Programmer
> > ---------------------
> > Linux: Because rebooting is for adding hardware
> > _______________________________________________
> > This mail is send to you from the opencms-dev mailing list
> > To change your list options, or to unsubscribe from the list, please
> > visit http://mail.opencms.org/mailman/listinfo/opencms-dev
--
M Butcher <mbutcher at grcomputing.net>
More information about the opencms-dev
mailing list