Using the data source in Struts Problem: How to use the data source defined in the struts_config.xml file in trying layers and model layers? Preliminary ideas are:
1. Write a class dbbind with a parameter-free constructor, where the package container is responsible for initialization data sources (completed JNDI and container communication in DBBIND, the data source of the capacitary protection is dbbind attribute) 2, in the view Writing
The upper side is taught me, and it is estimated that it can be done. But what makes me confused, since Struts is a real thing of MVC, the most eligible is hierarchical, why have such a bad design. Since it can be implemented like the method of the upper side, why not directly use the DS belt directly, maybe I just exposed to Struts, I haven't understood the essence of it, I would like to understand it in a few days. .