[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
[Home]
Re: Cannot make functions in JSP?????
>> >> > What I want (NEED DESPERATELY!!!) to do is:
>> >> >
>> >> > <%!
>> >> > void sendTable(JspWriter out)
>> >> > {
>> >> > <#
>> >> > <table width="80%">....
>> >> > #>
>> >> > }
>> >> > %>
>> >> >
>> >> > ...where "<#" is my invention... =)
...
>>
>> Maybe I totally missed the point but as I see it you only want to
>> call a java function doing some stuff, correct?
>>
>> So you can
>> 1. Write that function in a class and import that class.
>> 2. Better put your function in a bean and use it then.
>>
>> Did I miss something?
>> >
>> > It's amazing for me to see such a huge flaw in the standard. I will hack
>> >gnujsp to implement something (as I've already hacked it to support a
>> >preprocessor.. =)).
>
> I want a method with HTML code.
>
O.K., I understand now.
Why not:
Hack the parser for taglib-support and include
the HTML-Code in your new tags and maybe put
it in a string or make a function based on it.
The parsing of the tag content can then
be done similiar to current HTML-Comment parsing
(allows for <%= %> constructs.)
This would
- solve your problem
- help the gnujsp community
- would follow the spec
Ciao,
Carsten