This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes JSP standard Action element Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP standard Action element" Watch "JSP standard Action element" New topic
Author

JSP standard Action element

tushar jayawant
Greenhorn

Joined: Aug 20, 2003
Posts: 19
Hi to All

JSP define any JSP standard Action element and actions for
database access
Tushar
P. Udaya Shankar
Greenhorn

Joined: Nov 18, 2003
Posts: 21
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

Joined: Dec 23, 2002
Posts: 5
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


Vishwanath<br /> <br />IBM Certified Solution Developer - WebSphere Portal V6.0<br />IBM Certified SOA Associate<br />SCJP 1.4
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60800
    
  65

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jeff Horan
Ranch Hand

Joined: Apr 03, 2003
Posts: 37
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());
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: JSP standard Action element
 
Similar Threads
value for useBean class is invalid
<jsp:getProperty> returns nothing
how to call JSP from Servlet
Standard Action Tags
jsp include directive doubt?