• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static imports for scriptlets?

 
Joshua Smith
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to do a static import in a page directive?

For instance, let's say I have a public, static final String that I want to use in my scriptlet.



The import is as follows:


Now I can use it in my scriptlet as LoginServlet.FAILED_LOGIN.

Is there a way to import FAILED_LOGIN statically so that it could be used without the type name?

Thanks,
Josh
 
Ankit Garg
Sheriff
Posts: 9577
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A simple google search results in this page...
 
Joshua Smith
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. I searched on Google, but my search might have been too specific. Thanks for pointing me to that.

Josh
 
Joshua Smith
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For future searchers in case the referenced page goes away...

Here is the syntax:

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic