Using a variable declared outside the Query string inside a SPARQL Query- Using JSP and Java Servlet

前端 未结 2 1210
天命终不由人
天命终不由人 2021-01-23 20:11

I have 2 jsp pages. In the index page I am selecting a dropdown value and passing the selected value as a url parameter to the SearchResults page.

http://localh         


        
2条回答
  •  死守一世寂寞
    2021-01-23 20:45

    I assume jobCategory is a Literal/Label? Simple ask directly for the label.

    String queryString =
    "Select ?a ?b"+
    " Where {  \""  + jobCategory +"\"}";
    

    I case it is a URI the query would look like.

    String queryString =
    "Select ?a ?b"+
    " Where {   <" + jobCategory+ ">}";
    

提交回复
热议问题