Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5943245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:22:03+00:00 2026-05-22T16:22:03+00:00

When I add this tld and custom tag to my jsp Spring throws an

  • 0

When I add this tld and custom tag to my jsp Spring throws an error on startup. The page ‘index.jsp’ that is loading is configured as the default first page for the application. Please explain why this is happening? Everything works as expected before the tag is added to the page.

head.tag

<%@ attribute name="title" required="true" description="Page's title" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib uri="../mytags.tld" prefix="pbl" %>
<head>
<title>
<spring:message code="${title}" text="${title}"></spring:message>
</title>
<script type="text/javascript" src="resources/scripts/global.js"></script>
<script type="text/javascript" src="resources/scripts/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="resources/scripts/jquery-ui-1.8.13.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="resources/styles/global.css" media="screen" />
<link rel="stylesheet" type="text/css" href="resources/styles/dark-hive/jquery-ui-1.8.13.custom.css" media="screen" />
<jsp:doBody />
</head>

index.jsp

<%@ taglib uri="/WEB-INF/mytags.tld" prefix="pbl" %>
<html>
    <pbl:head title="hello">
    <link rel="stylesheet" type="text/css" href="resources/styles/global.css" media="screen" />
    </pbl:head>
<body>
    <a href="home">Say Hello</a>
</body>
</html>

error

org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 3

1: <%@ taglib uri="/WEB-INF/mytags.tld" prefix="pbl" %>
2: <html>
3: <pbl:head title="hello">
4:  <link rel="stylesheet" type="text/css" href="resources/styles/global.css" media="screen" />
5: </pbl:head>
6: <body>

root cause 

java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
org.springframework.web.context.support.WebApplicationContextUtils.getRequiredWebApplicationContext(WebApplicationContextUtils.java:84)
org.springframework.web.servlet.support.RequestContextUtils.getWebApplicationContext(RequestContextUtils.java:81)
org.springframework.web.servlet.support.RequestContext.initContext(RequestContext.java:219)
org.springframework.web.servlet.support.JspAwareRequestContext.initContext(JspAwareRequestContext.java:74)
org.springframework.web.servlet.support.JspAwareRequestContext.<init>(JspAwareRequestContext.java:48)
org.springframework.web.servlet.tags.RequestContextAwareTag.doStartTag(RequestContextAwareTag.java:76)
org.apache.jsp.tag.web.head_tag._jspx_meth_spring_005fmessage_005f0(head_tag.java:132)
org.apache.jsp.tag.web.head_tag.doTag(head_tag.java:85)
org.apache.jsp.index_jsp._jspx_meth_pbl_005fhead_005f0(index_jsp.java:93)
org.apache.jsp.index_jsp._jspService(index_jsp.java:63)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:419)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:333)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:22:04+00:00Added an answer on May 22, 2026 at 4:22 pm

    Because spring tags expect a spring application. To have such, you need to define a ContextLoaderListener as <listener>..</listener> in web.xml (I suspect thta mapping a DispatcherServlet should also be fine, although not indicated by the message)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I add this tag to my asp.net page (aspx): <obout:Calendar runat=server ShowTimeSelector=true DateFormat=MM/dd/yyyy hh:mm:ss
I want to add share this on Facebook to a page. I've got this
I am using only slug to identify a page on the website, like: example.tld/view/this-fancy-slug
If I add this piece of html to my page: <script type=text/javascript> var s
I add this script in jsp file. This function always returns true even for
I'm trying to add this p4sql query as a Custom Tool in P4V (Windows)
I'm trying to add this iframe to my Aspx page and I'm trying to
On this page: http://texting2web.co.cc/ (ignore the domain name, still waiting for my TLD to
I want to add this attribute: data-show-url=<%= video_path(@video) %> to the HTML that this
I want to add this awk command on my script but keep getting error.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.