Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

1 like 0 dislike
878 views
in Programming by Contributing Tester (46 points)
retagged by
I am trying to tag http://granule.com/tags in my JSP file as below.

<%@ taglib uri="http://granule.com/tags" prefix="g" %>

But I am getting error as given below:

org.apache.jasper.JasperException: The absolute uri: http://granule.com/tags cannot be resolved in either web.xml or the jar files deployed with this application
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:55) ~[tomcat-embed-jasper-8.0.32.jar:8.0.32]

.. ... ...

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_91]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_91]
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.32.jar:8.0.32]
    at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]

 

How do I resolve that?

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
  1. Download the binary distribution of Granule Tag Library by following this URL: http://code.google.com/p/granule/downloads/list (granuleNNN.zip) and unpack the compressed file.

  2. Copy granuleNNN.jar in the distribution’s ‘lib’ directory to your web applications WEB-NF\lib directory.

  3. To use the granule compress tag, you must include taglib directive <%@ taglib uri="http://granule.com/tags" prefix="g" %> at the top of each JSP that uses this library.

  4. Copy the and declarations from web.xml (look below) from compressed file into your /WEB-INF/web.xml

    <servlet>
        <servlet-name>CompressServlet</servlet-name>
        <servlet-class>com.granule.CompressServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>CompressServlet</servlet-name>
        <url-pattern>/combined.js</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>CompressServlet</servlet-name>
        <url-pattern>/combined.css</url-pattern>
    </servlet-mapping>
    
  5. Put tags around the lists of script decorations (JS or CSS). For example -

    <g:compress>
      <link rel="stylesheet" type="text/css" href="css/dp.css"/>
      <link rel="stylesheet" type="text/css" href="css/demo.css"/>  
    </g:compress>
    ...
    <div id="datepicker"></div>
      <g:compress>
        <script type="text/javascript" src="common.js"/>
        <script type="text/javascript" src="closure/goog/base.js"/>
        <script>
          goog.require('goog.dom');
          goog.require('goog.date');
          goog.require('goog.ui.DatePicker');
       </script>
      <script type="text/javascript">
        var dp = new goog.ui.DatePicker();
        dp.render(document.getElementById('datepicker'));
      </script>
     </g:compress>
    ...
    
  6. Done.

asked Jul 1, 2016 in Programming by Contributing Tester (46 points)
retagged Aug 7, 2018 by
Getting error: File WEB-INF/jsp/css/style.css not found, ignored. Real Path=


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...