tags:

views:

638

answers:

1

If I run my code in NetbeansIDE it shows the following error:

org.apache.jasper.JasperException: /InvestorConfirm.jsp(53,12) PWC6032: Unable to load tag handler class "org.apache.struts2.views.jsp.ui.FormTag" for tag "s:form"

I downloaded the struts2-core-2.0.11.jar file, and searched for "struts2.views.jsp.ui.FormTag", but couldn't find that class.

How can I resolve this issue?

+2  A: 

To install Struts2, just put the Struts2 JAR file (and its dependencies) in the /WEB-INF/lib.

Do not extract the JAR file and spread all its loose contents (TLD files?) over the classpath as some poor online tutorials (with roseindia.net as topper) may suggest. This exception namely indicates that the TLD file is been found in the classpath, but that the associated tag class is missing in the classpath. This can only happen if you did so. Cleanup the classpath and redo according Apache's own Struts2 docs.

This can by the way in theory also be caused by having different Struts2 versions in the classpath, but this is unlikely as the package of FormTag has not been changed among versions.

BalusC
what does it mean clearing the classpath??
i2ijeya
Remove the extracted clutter such as loose TLD files. Just place the whole and unextracted JAR file(s) in classpath.
BalusC
now i got different error.. what may be the reason...org.apache.jasper.JasperException: The Struts dispatcher cannot be found. This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
i2ijeya
The answer is already in the exception message. Configure the Struts dispatcher filter. Start here: http://struts.apache.org/2.x/docs/guides.html and check here http://struts.apache.org/2.x/docs/zero-configuration.html
BalusC
Define Struts dispatcher filter in `web.xml` as per the docs.
BalusC