Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

custom methods in jsp

 
Alfonso Harding
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can someone tell me whats wrong with this code??
 
Garann Means
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1449
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic