• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSTL-SQL Tag  RSS feed

 
ashirvad jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Frens,
This is my application in which i am getting Error.

<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
<h1><cut value="This the simple application of the SQL in JSP "/></h1>

<sql:setDataSource driver="com.mysql.jdbc.Driver"
uri="jdbc:mysql://localhost:3306/customer" user="root" password="root"/>

<cut value="Establishment of the connection"/><br/>

<sql:update sql="INSERT INTO cust(customername,customerid,customeraddress,amount) VALUES('ashirvad',007,'hajiali',50000)">
</sql:update>
<cut value="Query Executed Perfectly"/>

you can see frens i use some core tag to check the flow but no use..

This is the Error:

------------------------------------------------------------------------
org.apache.jasper.JasperException: /TagSql.jsp(4,0) Attribute uri invalid according to the specified TLD
---------------------------------------------------------------------------

even i change the uri="<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>"
and in the worst case to :
<%@ taglib uri="http://java.sun.com/jstl/sql_rt" prefix="sql" %> w/o knowing nothing..

Along with this i am giving you the server Info & Jsp version:

Servlet Engine: 2.3
JSP Engine: 1.2
Application Server: Apache Tomcat/4.1.31
 
ashirvad jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Frens ,
I figure out the prob,
Now its running ..
Thanks for Nothing..
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by ashirvad jain:
Hello Frens,
I figure out the prob,
Now its running ..
Thanks for Nothing..


ashirvad,
I'm glad you go it working.

Two things:
1.) I'm not sure you're aware of this but the phrase "thanks for nothing", in English is a bitter utterance, usually said in anger.
Are you bitter and angry that you didn't receive an answer in less than an hour?
If so, you probably have unrealistic expectations for web forums.

2.) Before you spend too much time with JSTL-SQL tags, you might want to consider that they're not really intended for serious production applications.
Some of us feel they are a mistake that never should have made it into the the servlet spec in the first place, as they violate all the best practice principals of MVC (SQL queries do not belong in the view tier).

From the JSTL Spec:

Many web applications need to access relational databases as the source of dynamic
data for their presentation layer. While it is generally preferred to have database
operations handled within the business logic of a web application designed with an
MVC architecture, there are situations where page authors require this capability
within their JSP pages (e.g. prototyping/testing, small scale/simple applications,
lack of developer resources)
.
The JSTL SQL actions provide the basic capabilities to easily interact with relational
databases.


Since many of don't use them, there is a good chance the questions about JSTL-SQL tags will go unanswered for a long time in forums such as this.
[ January 12, 2007: Message edited by: Ben Souther ]
 
ashirvad jain
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am really sorry about that..
it wont happen next.
And i am very glad to be a part of such a nice forum.
really sorry to all my friend.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!