What do we think the long-term prospect for JSP-tags are? I find it hard to
believe that the current version of JSP tags will last much longer and will
still require rewrites. Regular JavaBeans do not have this issue and can be
more maintainable.
Now I still use Java tags and consider them a goo
Thanks for the info. I didn't know that.
Kenny
- Original Message -
From: "Borislav Iordanov" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 22, 2002 3:06 PM
Subject: Re: Functions in JSP
> You can create a function in JSP
al Message -
From: "Kenny G. Dubuisson, Jr." <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, October 22, 2002 3:59 PM
Subject: Functions in JSP
> I need to create a function that formats a data a certain way and I need
to
> be able to call it from wi
> [mailto:JSP-INTEREST@;JAVA.SUN.COM] On Behalf Of Kenny G. Dubuisson,
Jr.
> Sent: Tuesday, October 22, 2002 3:59 PM
> To: [EMAIL PROTECTED]
> Subject: Functions in JSP
>
> I need to create a function that formats a data a certain way and I
need
> to
> be able to call it from wi
I need to create a function that formats a data a certain way and I need to
be able to call it from within a JSP page. Would I create a JavaBean to do
this? It is my understanding that you can't create a function in a JSP
page...am I incorrect in that? Any pointers on how to handle this would be
How to use functions in jsp
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.
I believe I read that the regular JSP tag ( <% %>) contents are inserted into the
service method of the httpservlet class you are indirectly building, whereas the
other tag type (<%! %>) is inserted in the httpservlet class itself, and so can be
used to define class members (methods and variables
for the answers.
liza
--- squeijo <[EMAIL PROTECTED]> wrote:
> You can do this:
>
> 1º define de function into tht tags <%! ... %> at the begining of
> your jsp
> page, like this:
>
><%!
> String func() {
> return "Hello";
> }
>%>
>
> 2º And use the function in your s
You can do this:
1º define de function into tht tags <%! ... %> at the begining of your jsp
page, like this:
<%!
String func() {
return "Hello";
}
%>
2º And use the function in your scriptled code:
<%
out.println (func());
%>
Note:
if you want to do a
Well in my book the ! character is called a 'bang' or more commonly an
'exclaimation mark'.
any offers?
.b
> -Original Message-
> From: Rikard Elofsson [mailto:[EMAIL PROTECTED]]
> Sent: 31 December 1998 22:23
> To: [EMAIL PROTECTED]
> Subject
Liza J Alenchery wrote:
>
> Hi
>
> Can I write a function in a JSP file directly?
yup with a !-sign in the jsp tag (whatever that´s called in english;-), like
<%!
protected String urlEncode(String aString) {
if (aString != null) {
return java.net.URLEncoder.encode(aString.trim());
}
el
Hi
Can I write a function in a JSP file directly?
eg:
<%
void func()
{
out.println("Hello") ;
}
func() ;
%>
If not, what is the reason?
I see that I can do the following:
<%
class myclass
{
void func()
{
out.println("Hello") ;
}
}
myclass x = new myclass() ;
x.func() ;
%>
thank
about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Wen B. Sun
> Sent: Tuesday, November 23, 1999 12:23 AM
> To: [EMAIL PROTECTED]
> Subject: Functions in JSP
>
>
> Hi,
>
> In my JSP, I have a combination of scriptlet and html code t
Hi,
Also, if you remember that all JSP's are turned into servlets then you can make
use of the Declaration tags to create a method (other than the do() methods) in
the servlet.
eg
<%! String shout() { return("HELP!!"); } %>
then anywhere in your page you can use shout() eg
<% out.pri
-Original Message-
From: Daniel Tillin [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 23, 1999 9:32 AM
To: 'Wen B. Sun'
Subject: RE: Functions in JSP
I would have thought you really want the scriplet code in a bean which you
can then
call from anywhere in a JSP, and make
I think this answer might help you. Please try it out.
You call your function or anything either a .jsp page or a .txt etc. by including
it in the jsp page or calling page.
<%@ include file = "date.jsp"%> date.jsp is an example.
Regards,
Suresh Kumar
"Wen B. Sun" wrote:
> Hi,
>
> In my JSP, I
Hi,
In my JSP, I have a combination of scriptlet and html code that I want
to call in different places. I don't want to copy and paste the same
code all over the place to clutter my code. Is there a way to define a
function in JSP to contain this combination of scriptlet and html code?
That way
e a valid FORM
//Added this to make a valid HTML page
Hope this helps,
Abraham
-Original Message-
From: Susan Holden [SMTP:[EMAIL PROTECTED]]
Sent: Friday, October 08, 1999 8:09 AM
To: [EMAIL PROTECTED]
Subject:Re: Use ServerSide Functions In JSP
ZhangDong,
You need a s
n Holden
> Sent: Friday, October 08, 1999 8:38 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Use ServerSide Functions In JSP
>
> ZhangDong,
>
> You need a semi colon after
> <%function MyFunc2( )
> It's in your first line after
>
> sue
>
> Zha
ZhangDong,
You need a semi colon after
<%function MyFunc2( )
It's in your first line after
sue
ZhangDong wrote:
> Hi all:
> I'm trying to use server side functions in JSP files.
> I have written a JSP page as following:
>
>
> <%
> function MyFunc2()
Try to write the function between the <%! and %> tags,
like this:
<%!function MyFunc2(){return ("The
value is returned from server side Function!");}
%>
--Saludos/regards:
Sergio Queijo Diaz[EMAIL PROTECTED] Unión Fenosa
International SW Factory Pedro Teixeira n8. 28020 Madrid. SPAIN Tlf.
Hi all:
I'm trying to use server side functions in JSP files.
I have written a JSP page as following:
<%
function MyFunc2()
{
return ("The value is returned from server side Function!");
}
String myStr;
myStr = MyFunc2();
%>
This Is the Second Page
But When I publis
22 matches
Mail list logo