i need to connect to the database using struts. where shud i write the code? i mean in the jsp or the java file the code itself will be very much useful
posted 10 years ago
Struts has support for a data source setup in struts-config.xml, however, it is not recommended for use (because you have to pass the datasource from the action to your data layer ). You should use jndi with tomcat. There are plenty of resources to see how to do this but just briefly.