At the risk of being pedantic, one *could* serialize the object to a
string, url-encode the string, and pass it as a parameter value.
However, that would be insane for a variety of reasons.  The one that
would normally make it a complete no go is that some browsers have very
small maximum lengths for query strings (e.g., IE6 has a max of 2048 for
the whole path including host name, path, and query string).  I would
expect any but the most trivial objects to exceed that when serialized.
However, if I understood the original requirement correctly, the request
would be occurring from the servlet rendering the VTL rather than the
browser, so that wouldn't factor in.

It still would be really awful from a performance standpoint.

-----Original Message-----
From: Nathan Bubna [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 08, 2008 1:35 PM
To: Velocity Users List
Subject: Re: jsp embeded inside velocity

You can't put objects in a URL.  If the URL you import is using the
same HttpSession or ServletContext, then you can set those objects as
attributes and retrieve them in the JSP on the other side.

On Sat, Nov 8, 2008 at 8:56 AM, andyandy <[EMAIL PROTECTED]> wrote:
>
> That's great, thank you. I forgot to say that I need to pass objects
as
> parameters, not strings. Is that completely impossible? Thanks! :)
>
>
>
>
> Nathan Bubna wrote:
>>
>> If you use VelocityTools, you can use the ImportTool:
>>
http://velocity.apache.org/tools/devel/javadoc/org/apache/velocity/tools
/view/ImportTool.html
>>
>> $import.read("jsp/add_valorations.jsp?param=this")
>>
>> On Tue, Nov 4, 2008 at 12:56 PM, andyandy <[EMAIL PROTECTED]>
wrote:
>>>
>>> Hello. I have a problem. My application runs in Velocity, but I was
given
>>> some modules in jsp which must be called from the templates. I had
>>>
>>> #include( "jsp/add_valorations.jsp" )
>>>
>>> But I need to pass some parameters too. I was wondering if this is
>>> possible,
>>> or there was no other choice but rewriting the jsps in vm. Thanks
very
>>> much!
>>> :)
>>> --
>>> View this message in context:
>>>
http://www.nabble.com/jsp-embeded-inside-velocity-tp20330927p20330927.ht
ml
>>> Sent from the Velocity - User mailing list archive at Nabble.com.
>>>
>>>
>>>
---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context:
http://www.nabble.com/jsp-embeded-inside-velocity-tp20330927p20397936.ht
ml
> Sent from the Velocity - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to