how to import json to jsp

Posted in :

在 jsp 裡要存取 json, 需要 import, 但格式要怎麼寫?

java 範例:

import org.json.JSONObject;
JSONObject json = new JSONObject();

jsp 範例:

<%@ page language="java" contentType="text/html; charset=UTF-8" 
import="org.json.JSONObject"
import="org.json.JSONArray"
pageEncoding="UTF-8"
%>

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *