• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struct beginner Question

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic