I am trying to create a webpage using Java Beans and Custom Tags. I have this bean that will create a connection to the database and keep it open so that it sends a reference to the statement object when necessary.
However, I want to create custom tags such as <tag:login username="something" password="something" /> which will compare that information to the database and base the content on that.
However, I have no idea as to how one can get to have access to the methods in the bean from the tag object. Can this be done? If not, how could I do something like this by using custom tags?
But I want to pass a reference to the SQL Connection. Hence, if I just send some text as an attribute, I don't see how that would serve my purpose. Could you possibly explain me how I could actually make it so that the connection is available for being used over there, along with all its methods.