Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP standard Action element

 
tushar jayawant
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi to All

JSP define any JSP standard Action element and actions for
database access
Tushar
 
P. Udaya Shankar
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • 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
 
Vishwanath Sinha
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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
 
Jeff Horan
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • 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());
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic