aspose file tools*
The moose likes Struts and the fly likes Avoid Scriptlet.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Avoid Scriptlet.." Watch "Avoid Scriptlet.." New topic
Author

Avoid Scriptlet..

Henrik Krievs
Ranch Hand

Joined: Jan 05, 2004
Posts: 59
Howdy!

I've a class with a static method in it. Is it possible for me to access this static method directly from jsp - without using scriptlet?

Best regards, Henrik
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41532
    
  53
You could write a tag that wraps around the method, and put it into a tag library.


Ping & DNS - my free Android networking tools app
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If your web container supports JSP 2.0 (Tomcat 5, for example), You could also write a function that calls your static method. See Chapter 12 of Sun's J2EE Tutorial.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Avoid Scriptlet..