Thanks I got that working. Another thing though.
<%@ include file="file.jsp"%>
<%!
public String test() {
testClass temp = new testClass();
}
Test();
%>
This results in an error about testClass being an invalid type. Any
idea how I can use the testClass that is defined in file.jsp within this
test function?
Thank you
Charles Killmer
-----Original Message-----
From: Ben Souther [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 22, 2004 1:10 PM
To: Tomcat Users List
Subject: Re: Scripts
try:
<%!
public String test(){
return "test";
}
%>
Note the exclamation point in the tag..
On Wed, 2004-12-22 at 14:05, Charles P. Killmer wrote:
> I am trying to write a function in a script file and having a lot of
> trouble.
>
> <%
> function String test() {
> return "test";
> }
> out.print(test());
> %>
>
> Is there a way to do this without using a class? Also along these
> lines would something like this be possible.
>
> <%
> function void test() {
> %>
> This should just be echoed to the screen.
> <%
> }
> test();
> %>
>
> Thanks for any help
> Charles Killmer
>
> ---------------------------------------------------------------------
> 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]