You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Leon Rosenberg <ro...@googlemail.com> on 2006/02/23 09:41:40 UTC

Re: How to inject code between of a generated page ?

<head><yourtag></head>?

regards
leon

On 2/23/06, David Duke <dd...@free.fr> wrote:
> Hi everybody,
>
> This is my first post on this mailing list.
>
> I developped a personal tag librairy which need to inject code - link a
> javascript or stylesheet file - between the XHtml <head> </head> tags
> of  my generated page. The JspWriter object don't seem to suite me.
>
> Is someone know how to do that ?
>
> Thanks all,
>
> David
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How to inject code between of a generated page ?

Posted by David Delbecq <de...@oma.be>.
Na, he just asummed the tag was doing additionnal work at a later part:

....
</html>
</yourtag>

Dave Newton a écrit :

>Leon Rosenberg wrote:
>  
>
>><head><yourtag></head>?
>>  
>>    
>>
>Ah, see, that won't work.
>
>Try
>
><head><yourtag/></head> instead.
>
>;)
>
>(Hey, it was either this or I would have had to respond to the "I want
>to write a fully object-based Java program, how do I do that?" thread ;)
>
>Dave
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>For additional commands, e-mail: user-help@struts.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How to inject code between of a generated page ?

Posted by Dave Newton <ne...@pingsite.com>.
Leon Rosenberg wrote:
> <head><yourtag></head>?
>   
Ah, see, that won't work.

Try

<head><yourtag/></head> instead.

;)

(Hey, it was either this or I would have had to respond to the "I want
to write a fully object-based Java program, how do I do that?" thread ;)

Dave



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How to inject code between of a generated page ?

Posted by David Delbecq <de...@oma.be>.
The JSP writer writes http response, not html response. You can use jsp
to generate html, txt, xml, whatever you want.
jsp tags are supposed to output content where they are. If you need to
autogenerate the <head> section while you are already in the middle of
your .jsp, then you will need your taglib to act hand in hands with a
requestfilter which will cache response and inject the head at the end.



David Duke a écrit :

> Is this the unique method to do this ?
>
> I expected to use a JspWriter like to get a writer to the web page
> header !
>
> Thank you,
>
> David
>
> Leon Rosenberg a écrit :
>
>> <head><yourtag></head>?
>>
>> regards
>> leon
>>
>> On 2/23/06, David Duke <dd...@free.fr> wrote:
>>  
>>
>>> Hi everybody,
>>>
>>> This is my first post on this mailing list.
>>>
>>> I developped a personal tag librairy which need to inject code - link a
>>> javascript or stylesheet file - between the XHtml <head> </head> tags
>>> of  my generated page. The JspWriter object don't seem to suite me.
>>>
>>> Is someone know how to do that ?
>>>
>>> Thanks all,
>>>
>>> David
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>     
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>   
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How to inject code between of a generated page ?

Posted by David Duke <dd...@free.fr>.
Is this the unique method to do this ?

I expected to use a JspWriter like to get a writer to the web page header !

Thank you,

David

Leon Rosenberg a écrit :
> <head><yourtag></head>?
>
> regards
> leon
>
> On 2/23/06, David Duke <dd...@free.fr> wrote:
>   
>> Hi everybody,
>>
>> This is my first post on this mailing list.
>>
>> I developped a personal tag librairy which need to inject code - link a
>> javascript or stylesheet file - between the XHtml <head> </head> tags
>> of  my generated page. The JspWriter object don't seem to suite me.
>>
>> Is someone know how to do that ?
>>
>> Thanks all,
>>
>> David
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org