This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes jsp.exists() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "jsp.exists()" Watch "jsp.exists()" New topic
Author

jsp.exists()

Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Is there a reliable way to tell if a named JSP exists? I'd like to provide a default page for a missing JSP in one particular spot in an application. This is in a legacy jsp now:

I could see Class.forName() working if I could build up the compiled jsp name, but that sounds pretty yucky.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

Perhaps something like:


[ February 27, 2006: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Wow! I have no idea what that is. But it's something I can Google and learn!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

Those are examples of the JSTL (JSP Standard Tag Library).
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Gotcha. I had never seen the import into a var syntax. Slick. Thanks again!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60822
    
  65

Very powerful mechanism, that.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp.exists()
 
Similar Threads
Cannot use jsp scriplet in jsp taglibs
a recursive include?
jsp:include???
EL not displaying
How to create dynamic query string