sql auto complete inside jsp code Follow
Is there a way to have sql auto complete while editing jsp code?
I have already setup the connection under database, I can see the tables there, I've set my database/schema as the default one and my dialect correctly. Anything else I need?
Thanks.
Please sign in to leave a comment.
Hello.
Can you provide a sample of JSP where you try to use SQL completion?
Thanks,
Alexander.
Sure:
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<sql:setDataSource dataSource="jdbc/oracle"/>
<sql:update>
INSERT INTO sometable (
Id,
value,
) VALUES (
?,
?,
)
<sql:param value="${param.id}"/>
<sql:param value="${param.somevalue}"/>
</sql:update>
Have you tried language injections? If not, then:
1. Settings / Language Injections.
2. Add "XML Tag Injection".
3. Specify Language ID = (your dialect), XML Tag Local Name = update, XML Tag Namespace = http://java.sun.com/jsp/jstl/sql
Probably we could have it injected by default, will search for a request in our bugtracker.
Regards,
Alexander.
That worked pretty good. I guess I'll have to add it for the rest of the http://java.sun.com/jsp/jstl/sql tags unless there is a way to tell it to work for all of them?
Thank you.
You can use expression like "query|update|etc" for the local tag name setting.
Regards,
Alexander.
Great, thanks, that worked perfect.