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

Jsp question

 
Samira Mastali
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi folks,
Can anybody answer these questions:
1. Can we implement an interface insdie a jsp?
2. a jsp page is a multi threaded or single-threaded?
Thanks,
Samira
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Yes, as long as you remember that the resulting servlet generated by the engine is what's actually implementing the class.
2. Yes, by default they are. If multible requests are made to your page, a thread will be spawn for each of the requests. And they will share variables declared at the class level(non-local variables)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic