Hi, All
I read the struts document, I config my data source in struts-config.xml,
In my action I can use the following code to get Data source and use it.
Right now I want to use it in my JSP scriplet, when I use it, it can not be
compiled as servlet is a undefined variable or class.
I want to know, in my Action, servlet is in which package ? how to use same
code in *.jsp file
Thanks!
DataSource dataSource = (DataSource)
servlet.getServletContext().getAttribute(Action.DATA_SOURCE_KEY);
conn = dataSource.getConnection();
... perform required functions as in the previous example ...
conn.close();