tags:

views:

27

answers:

3

Hi,

I'm receiving this error on my jsp file - 'Can not find the tag library descriptor for "/struts-tags"'

Strange thing is my app still seems to work.

I'm following the tutorials at - http://struts.apache.org/2.x/docs/using-struts-2-tags.html

Here is the code.

<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> 
<%@ taglib prefix="s" uri="/struts-tags" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt; 
<html> 
  <head> 
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> 
      <title>Hello World!</title> 
  </head> 
  <body>  
      <h2><s:property value="messageStore.message" /></h2>  
      <p>I've said hello <s:property value="helloCount" /> times!</p>  
      <p><s:property value="messageStore" /></p> 
  </body>
</html>  

Thanks

A: 

This is probably Eclipse getting a bit 'confused' rather than a genuine error.

I had the same thing yesterday when working through a Struts 2 tutorial, but it disappeared after opening/closing the JSPs.

William
A: 

Have you added the struts2-core-.jar to the libraries of the project? If you have try to clean the project.

Javi
That worked, thanks a mill
A: 

As William mentioned, this sounds like your IDE may not know where the TLD for the tag library is in your project, but once packaged and running, it is working fine.

Steven Benitez