File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes how to declare functions in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to declare functions in jsp " Watch "how to declare functions in jsp " New topic
Author

how to declare functions in jsp

rasika gamage
Greenhorn

Joined: May 08, 2001
Posts: 7
i declared a function like this
public void createMyCookie(String name,int expires)
{}
here i got an error that " ;" missing

spalaniv
Greenhorn

Joined: May 08, 2001
Posts: 5
Hi Rasika,
<%! public void createMyCookie(String name,int expires) { // code for the method } %>
I think the above will help u.


Sakthi
Gus Torreti
Greenhorn

Joined: May 09, 2001
Posts: 2
Hello!
As already told right above, you shold try the code
<%! public void createMyCookie(String name,int expires)
{
// code for the method
}
%>
Please note the code <%! into your page. Also, for your convenience, put all your functions after the < / html > tag.
Regardz,
Gus
------------------
===============
"In the brightest day, in the blackest night,
No evil shall scape my sight.
May those who worship evil's might
beware of the power of my light"


===============<BR>"In the brightest day, in the blackest night,<BR> No evil shall scape my sight.<BR> May those who worship evil's might<BR> beware of the power of my light"
rasika gamage
Greenhorn

Joined: May 08, 2001
Posts: 7
thanka for ur reply.
nice to meet u in saloon
I would like to know sth about u.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to declare functions in jsp
 
Similar Threads
The x900 effect ?
WA #1.....word association
Cant use object from another class
Posting to bump up my count...
Text box value is not being completely filled with request attribute