This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Struts and the fly likes Struct beginner Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struct beginner Question" Watch "Struct beginner Question" New topic
Author

Struct beginner Question

rahan jain
Greenhorn

Joined: Aug 28, 2006
Posts: 5
Hi ,

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.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
 
Consider Paul's rocket mass heater.
 
subject: Struct beginner Question