10

JSP Googlemaps taglib was not found, where did I go wrong?

 3 years ago
source link: https://www.codesd.com/item/jsp-googlemaps-taglib-was-not-found-where-did-i-go-wrong.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

JSP Googlemaps taglib was not found, where did I go wrong?

advertisements

I'm trying to add Google Maps onto my JSPs by using the Googlemaps taglib.

I've added this into my maven pom

    <dependency>
        <groupId>com.lamatek</groupId>
        <artifactId>googlemaps</artifactId>
        <version>0.98c</version>
        <scope>provided<>/scope
    </dependency>

This then included the googlemaps-0.98c library under my project libraries in NetBeans, I right clicked and selected Manually install artifact and located the googlemaps.jar file I had downloaded.

I've then added this into my taglibs file

<%@taglib prefix="googlemaps" uri="/WEB-INF/googlemaps" %>

And have then included this where I actually want to show a map on my 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>

But when I load up my application, I get the following error.

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

Have I missed something simple? I'm unable to spot what I've done wrong so far..


Generally when you do this:

<%@taglib prefix="googlemaps" uri="/WEB-INF/googlemaps" %>

You are basically trying to say "the folder /WEB-INF/googlemaps has a bunch of .tag files for use" - which you don't.

Just browsing the documentation confirms this - it says you should be using this (note the usage of the tld extension):

<%@ taglib uri="/WEB-INF/googlemaps.tld" prefix="googlemaps" %>

Source: http://www.lamatek.com/GoogleMaps/documentation.jsp#installation


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK