Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

static variables ?

 
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
one more question
sorry if it is silly one, i am new in jsps
if the <%! tag has some variable is it instance variable or static variable ?
what if i want to create many instance variables and plan to use them for different invocations of jsp ?
Can I actually see the servlet that is generated?
I use weblogic
:roll:
 
Author
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Kalpesh Soni:
one more question
sorry if it is silly one, i am new in jsps
if the <%! tag has some variable is it instance variable or static variable ?
what if i want to create many instance variables and plan to use them for different invocations of jsp ?
Can I actually see the servlet that is generated?
I use weblogic
:roll:


Code in <%! ... %> goes into the generated servlet code, outside of any particular method. So if you write
<%! String foo; %>
it's an instance variable. If you instead write
<%! static String foo; %>
it's a static variable.
 
Kalpesh Soni
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
vow
this one was like a gotcha !
 
reply
    Bookmark Topic Watch Topic
  • New Topic