I am doing my application in structs but i am having a error please excuse if it is a very silly question .
When i start my web logic server i get the error failed to preload on startup in web application jaxax.sevlet.ServletException: org/apache/struts/legacy/GenericDataSource
apart from this while gettin connection i am using code ServletContext context = servlet.getServletContext(); DataSource dataSource = (DataSource)context.getAttribute(Action.DATA_SOURCE_KEY);
In the second line i am getting warning the field Action.DATA_SOURCE_KEY is deprecated.
posted 9 years ago
My recommendation would be that you not use the Struts DataSource at all. The best practice for DataSources is to define them in your Application Server, and then use a JNDI (Java Naming and Directory Interface) lookup in your application classes to get reference to one of them.