aspose file tools*
The moose likes JSP and the fly likes custom methods in jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "custom methods in jsp" Watch "custom methods in jsp" New topic
Author

custom methods in jsp

Alfonso Harding
Ranch Hand

Joined: Feb 09, 2002
Posts: 35
can someone tell me whats wrong with this code??
Garann Means
Ranch Hand

Joined: Jan 28, 2002
Posts: 214
I think you need to send "out" to the callMe method, or it won't know what you want it to do. So it would be more like this:
Originally posted by Alfonso Harding:

Note that I'm not positive "out" is a PrintWriter, so I can't guarantee you this works as is.
g.
John Wetherbie
Rancher

Joined: Apr 05, 2000
Posts: 1441
Try this...

A couple notes. You don't need to import java.lang, it is imported automatically just as in a regular Java class. For testing things out having Java code in your JSP is OK but you should try to avoid code in your JSP as much as possible. If you want to avoid using a bean, and there are reasons to do this, you may want to use a custom tag to do what you want to do.
It also helps to include the error messages you are seeing along with your code to help the troubleshooting along.
Hope this helps and good luck!
[ October 24, 2002: Message edited by: John Wetherbie ]

The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: custom methods in jsp
 
Similar Threads
Cannot retrieve init parameter through JSP file
why jsp cannot use this class, which is no problem when compile singlely.
Exception while using attribute in tag file
Pop up new HTML page in JSP
Page is still executed even after response.sendRedirect()