チェンジセット 175 : SPARQLBuilderWWW/src/java

差分発生行の前後
無視リスト:
更新日時:
2014/09/26 11:41:55 (10 年 前)
更新者:
atsuko
ログメッセージ:

HttpSession? でデータ共有

パス:
SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www
ファイル:
3 変更

凡例:

変更なし
追加
削除
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/CLServlet.java

    r162 r175  
    7070        PrintWriter out = response.getWriter(); 
    7171        String ep = request.getParameter("ep"); 
    72         //HttpSession session = request.getSession(); 
    73         //QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg"); 
    74         //if ( qpg == null ){ 
    75            QueryPathGenerator qpg = new QueryPathGenerator(); 
    76         //} 
     72        HttpSession session = request.getSession(); 
     73        QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg"); 
     74        if ( qpg == null ){ 
     75        //QueryPathGenerator  
     76                   qpg = new QueryPathGenerator(); 
     77        } 
    7778        qpg.setSPARQLendpoint(ep); 
    7879        SClass[] classes = qpg.getClasses(null); 
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/EPServlet.java

    r162 r175  
    8484        JsonArray ja = jab.build(); 
    8585        out.print(ja); 
    86         //HttpSession session = request.getSession(); 
    87         //session.setAttribute("qpg", qpg); 
     86        HttpSession session = request.getSession(); 
     87        session.setAttribute("qpg", qpg); 
    8888    } 
    8989 
  • SPARQLBuilderWWW/src/java/org/biohackathon/SPARQLBuilder/www/PLServlet.java

    r171 r175  
    7171        String en = request.getParameter("endclass"); 
    7272         
    73         //HttpSession session = request.getSession(); 
    74         //QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg"); 
    75         //if ( qpg == null ){ 
    76            QueryPathGenerator qpg = new QueryPathGenerator(ep); 
    77         //} 
     73        HttpSession session = request.getSession(); 
     74        QueryPathGenerator qpg = (QueryPathGenerator)session.getAttribute("qpg"); 
     75        if ( qpg == null ){ 
     76        //QueryPathGenerator  
     77                qpg = new QueryPathGenerator(ep); 
     78        } 
    7879        SClass[] classes = qpg.getClasses(null); 
    7980        Path[] paths = qpg.getPaths(st, en, true);