sql auto complete inside jsp code

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.

6 comments

Hello.

Can you provide a sample of JSP where you try to use SQL completion?

Thanks,
Alexander.

0

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>

0

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.

0

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.

0

You can use expression like "query|update|etc" for the local tag name setting.

Regards,
Alexander.

0

Great, thanks, that worked perfect.

0

Please sign in to leave a comment.