Search.jsp <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html"%> <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean"%> <html> <head><title>My Human resources portal - Employee search</title></head> <body> My human resources portal - employee search <hr> <%--<html:form action="/search"> --%> <table> <tr> <td align="right"><bean:message key="label.searchJsp.firstName"/>:</td> <td><input type="text" name="firstName"></td><%-- this tag is working fine but when I replace this tag with the one written below I am not able to run my code --%> <%--<td><html:text property="firstName"/></td> --%> </tr>
Thanks merrill, I have made some changes as you said and I am using struts 1.3.8 version, but what changes should I do it in my web.xml(I think I have to make some changes in <taglib> and struts-config.xml. They are as follows;
And Merrill, all *.java files are compiled and placed in their respective folders. I need your help again to get out of this bug. I am finding very hard to get over this struts. Although, I am not bad either at jsps and servlets, but I am finding very hard to get over struts. Could you guide me how should I approach over the struts so that I face least problems. Thanks again for your help. regards.
posted 12 years ago
Your web.xml file looks OK, except that you need to remove all taglib references.
Are you still getting the same error? If not, please show us the error you're now getting.
In my experience, the best way to begin a struts project is to unzip the struts-blank-1.3.8.war file that comes with the download and use that as the basis for your project. This has all the artifacts you need and templates of the config files. Then just modify the templates to suit your needs.
Another suggestion would be to do a tutorial before jumping into writing your own application. You'll find some good tutorials listed in the Struts wiki.
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs. Apache Tomcat/5.0.28
posted 12 years ago
This error is explained in greater detail in question 11 of this forum's FAQ. The real error will be discovered by looking at your System Out log for the period of time when the server is first starting up. The most common problem is an error in parsing the struts-config.xml file due to malformed XML.
I can see one problem immediately: You've declared the wrong DTD in your struts-config.xml file. (version 1.0 instead of 1.3) My suggestion is to unzip the struts-blank-1.3.8.war file that came with the download and use the struts-config.xml file it contains rather than yours. Then just cut and paste your form bean and action mappings into the file.