I'm unable to compile JSP in Struts. I am getting JasperException
at line 20. I have included all jars required to tackle taglib files.
17:<form action="/login.do?method=authUser" >
18: <div align="center">
19: <table>
20: <tr><td><label>UserName</label></td><html:text property="username"/></tr>
21: <tr><td><label>Password</label> </td><html:password property="passwd"/></tr>
22: </table>
23: <html:submit value="LogIn"/><html:submit value="SignUp" onclick="gotoSignuUp();"/>
24:</form>
If you are seeing this error org.apache.jasper.JasperException: The Struts dispatcher cannot be found then you may be missing struts filter in your web.xml:
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Also check struts html library in your jsp
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
Note: If you can post complete error code then we can pinpoint exact problem and give according solution.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.