jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bjørn Bouet Smith <...@bsw.dk>
Subject possible bug in DBTags
Date Mon, 14 Jan 2002 18:47:20 GMT
Hi there,

Today I was trying to insert the following into my mySQL database via JSP
and the DBTags.

<P class='articletitle'> \

This made my JSP trash with an SQL exception:

javax.servlet.ServletException: java.sql.SQLException: Syntax error or
access violation: You have an error in your SQL syntax near '/P>'
	where urlid=23' at line 7
	at org.apache.jasper.runtime.PageContextImpl.handlePageException(Unknown
Source)
	at savechangedstarturl_2._jspService(savechangedstarturl_2.java:1064)
	at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
	at org.apache.tomcat.core.Handler.invoke(Unknown Source)
	at org.apache.tomcat.core.Handler.service(Unknown Source)
	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
	at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
	at org.apache.tomcat.core.ContextManager.service(Unknown Source)
	at
org.apache.tomcat.modules.server.Ajp12Interceptor.processConnection(Unknown
Source)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:484)
Root cause:
javax.servlet.jsp.JspTagException: java.sql.SQLException: Syntax error or
access violation: You have an error in your SQL syntax near '/P>'
	where urlid=23' at line 7
	at
org.apache.taglibs.jdbc.statement.ExecuteTag.doEndTag(ExecuteTag.java:111)
	at savechangedstarturl_2._jspService(savechangedstarturl_2.java:973)
	at org.apache.jasper.runtime.HttpJspBase.service(Unknown Source)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java)
	at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
	at org.apache.tomcat.core.Handler.invoke(Unknown Source)
	at org.apache.tomcat.core.Handler.service(Unknown Source)
	at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
	at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
	at org.apache.tomcat.core.ContextManager.service(Unknown Source)
	at
org.apache.tomcat.modules.server.Ajp12Interceptor.processConnection(Unknown
Source)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
	at java.lang.Thread.run(Thread.java:484)

It seems like the DBTags dont escape \, as it escapes single quotes.
Is this a bug, or is it supposed to be like that?

Best  regards.
Bjorn Smith



--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message