• 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

What is 'lookup for a class'

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have recently started learning struts. I have a very basic question. What does the term 'lookup a class' mean. How it happens in struts.

Thanks,
Mehta
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Me Mehta:
What does the term 'lookup a class' mean. How it happens in struts.



I suspect that what you're referring to is the fact that you idenitfy a class when you create a Struts action mapping, and then Struts "looks up" the class and executes the execute method on it. The term "lookup" refers to the way Struts finds the class in the class path, instantiates it, and then calls a method on it. Example:

<action name="myForm" path="/myAction.do" type="com.mycompany.MyAction" />

Given this action mapping, when a user enters the URL http://myserver.com/myApp/myAction.do, Struts "looks up" the class com.mycompany.MyAction, instantiates it, and calls its execute method.
 
Clowns were never meant to be THAT big! We must destroy it with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic