[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... =)
>>
>> You could try using:
>>
>> <jsp:include file="tablecode.jsp" flush="true" />
>>
>> This will include ("run") the tablecode.jsp file, which can be HTML, JSP,
>> whatever.
>
> That's a very poor solution, I'd like to have a Java method, with
>parameters, type checking... I don't want to go back to the old BASIC days
>when one had to rely on well known names of variables to pass arguments with
>the GOSUB.. =)
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.. =)).
>
Ciao,
Carsten Heyl
Carsten Heyl Heyl@NADS.De
NADS - Solutions on Nets http://www.nads.de/
NADS GmbH http://www.pixelboxx.de/
Hildebrandtstr. 4E Tel.: +49 211 933 02-90
D-40215 Duesseldorf Fax.: +49 211 933 02-93