• 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

JSP standard Action element

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to All

JSP define any JSP standard Action element and actions for
database access
Tushar
 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,
u have to use JDBC in ur JSP, v don't have any std. actions in JSP to establish a database connection
 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi tusar,
As such JSP doesnt have action tag for database access.
But we can create our own custom tag for the database access using Tag libs.
Regards,
Vishwanat
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The JSTL provides standardized tags for performing SQL actions directly from JSP pages. However, this is considered a poor practice and violates the best-practice MVC pattern. Proceed at your own risk.
bear
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found the best sites to be the db companies that provide the jdbc driver. Ie., Oracle.com. Goto documentation and look for the jdbc link. It gives java code to access database. Here's what i did to test it:
DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
Connection con = DriverManager.getConnection
("jdbc racle:thin:@'link'", "username", "password");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("select * from MY_TBL");
out.println(rs.toString());
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic