• Post Reply Bookmark Topic Watch Topic
  • New Topic

Write global fuction in JSP

 
Raj Puri
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a common module(jsp) and I want fuctions declared there to be accessible to all JSP pages. Most seem to work fine except one that reference application or request object. They not even compile(says application can not be referenced etc). I include this page as include file in every JSP where these functions need to be called. When I declare this fuctions the compile started failing? How can I reference these implicit variables every where not in the main jsp only.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't; they are available only within the service method of the JSP.

Would not a custom tag serve this purpose better?
[ March 30, 2005: Message edited by: Bear Bibeault ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!