我正尝试使用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