Gilson Nascimento D Elrei wrote: > Question 1 > I'm receiving this error when I try to compile my bean source code > (LoginBean.java). > "Cannot Resolve Symbol" - Probably JSDK didn't find the struts.jar to > complete compilation. > I tried to upload struts.jar in <%JSDK_HOME%>/LIB and updated my CLASSPATH, > but i continue to getting the same error.
If you are using Ant, the best thing is to have it add the struts.jar in your webapps lib to the patch. <!-- Build working classpath --> <path id="project.class.path"> <pathelement path ="lib/struts.jar"/> <!-- ... --> <pathelement path ="${classpath}"/> </path> > Question 2 > Once that i have compiled LoginBean.java... > How to do to compile a servlet that use this the Bean Class previously > created ? > I can't simply instance in my servlet program, cos I get the error "Cannot > Resolve..." again - What I need for my servlet to find my LoginBean.class > and compile it ? I need to save my LoginBean.class in CLASSPATH too ? > > Thanks in Advance. Struts is designed to use its own ActionServlet. You instead write Action classes to do what is usually done in standalone servlets. The Actions are servlet-delegates. The servlet calls the perform method on each Action, and passes it the bean specified in the struts configuration. A re-reading of the Struts User Guide from the beginning might help bring things into focus for you. Be sure to review the list of pre-requesite materials at the top of the introduction. http://jakarta.apache.org/struts/doc-1.0.2/userGuide/introduction.html -- Ted Husted, Husted dot Com, Fairport NY US -- Developing Java Web Applications with Struts -- Tel: +1 585 737-3463 -- Web: http://husted.com/about/services -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>