• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can a Servlet be both a loaded Servlet and a Javabean in useBean?

 
Ranch Hand
Posts: 585
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I want my Servlet to both be a servlet and also be able to be used as a bean in the tag:
<jsp:useBean id="formHandler" class="FormHandler scope="request" />
I have two questions:
1. Can this be done?
2. If a form is posted and it's sent to my servlet, if the servlet is also used on the page in the "useBean" tag, and it sets non-static variables in itself, will the useBean version of it be able to get those? Can I make them the same object?
reply
    Bookmark Topic Watch Topic
  • New Topic