我正嘗試使用Googlemaps taglib將Google地圖添加到我的JSP中。JSP Googlemaps taglib找不到,我哪裏出錯了?
我已經添加到這個我Maven的POM
<dependency>
<groupId>com.lamatek</groupId>
<artifactId>googlemaps</artifactId>
<version>0.98c</version>
<scope>provided<>/scope
</dependency>
這則列入了NetBeans我的項目庫googlemaps-0.98c
庫,我右點擊和選定Manually install artifact
和位於我已經下載了googlemaps.jar文件。
然後我把這個添加到我的標籤庫文件
<%@taglib prefix="googlemaps" uri="/WEB-INF/googlemaps" %>
在哪裏其實我是想在地圖上顯示我的JSP
<googlemaps:map id="map" width="250" height="300" version="2" type="STREET"
zoom="12">
<googlemaps:key domain="localhost" key="xxxx"/>
<googlemaps:point id="point1" address="74 Connors Lane" city="Elkton"
state="MD" zipcode="21921" country="US"/>
<googlemaps:marker id="marker1" point="point1"/>
</googlemaps:map>
已遂把這個可是當我打開了我應用程序,我得到以下錯誤。
org.apache.jasper.JasperException: /jsp/dashboard.jsp(1,1) /jsp/common/taglibs.jsp(6,56) PWC6117: File "/WEB-INF/googlemaps" not found
root cause
org.apache.jasper.JasperException: /jsp/common/taglibs.jsp(6,56) PWC6117: File "/WEB-INF/googlemaps" not found
我錯過了一些簡單的東西嗎?我無法發現我到目前爲止做了什麼錯誤..
你是否在jsp中包含標籤lib指令? – 2010-03-30 20:16:49
是的,我把所有的taglib都放在一個單獨的文件中,然後在我的jsps的頂部使用這個:'%% include file =「/ jsp/common/taglibs.jsp」%>' – Jimmy 2010-03-30 20:18:16
提供<
2010-03-30 20:21:04