Re: Learning Struts

2003-10-21 Thread Juan José Velázquez Garcia
Hello,

Other good book:
Struts kick start from SAMS (www.samspublishing.com)
ISBN: 0672324725


++
  Juan Jose Velazquez Garcia 
Information System Developer 
www.htmlspider.com.br
++


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Cannot find ActionMappings or ActionFormBeans collection

2003-10-15 Thread Juan José Velázquez Garcia
Hello,

I'm trying to run a sample from the book Struts in Action without success. I getting 
"Cannot find ActionMappings or ActionFormBeans collection" error. 

If anyone can help me ...

Thanks in advance.

The source code is:

ActionForm.java
===
package app;

import org.apache.struts.action.*;

public class RegisterForm extends ActionForm {
  protected String username;
  protected String password1;
  protected String password2;
 
  public String getPassword1() { return password1; }
  public String getPassword2() { return password2; }
  public String getUsername() { return username; }
  public void setPassword1(String string) { password1 = string; }
  public void setPassword2(String string) { password2 = string; }
  public void setUsername(String string) { username = string; }

}
 
Action.java
==

package app;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public class RegisterAction extends Action {

  public ActionForward perform(
ActionMapping mapping,
ActionForm form,
HttpServletRequest req,
HttpServletResponse res)
throws IOException, ServletException {

// Cast the form to RegisterForm
RegisterForm rf = (RegisterForm) form;
String username = rf.getUsername();
String password1 = rf.getPassword1();
String password2 = rf.getPassword2();

if (password1.equals(password2)) {
  try {
UserDirectory.getInstance().setUser(username,password1);
return mapping.findForward("success");
  } catch (UserDirectoryException e) {
return mapping.findForward("failure");
  }
}
return mapping.findForward("failure");

  }

}

struts-config.xml
===

http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";>



   

  


  




register.jsp
=

<%@ taglib uri="/WEB-INF/lib/struts-html.tld" prefix="form" %>


 UserName:
 enter password:
 re-enter password:
 





++
  Juan Jose Velazquez Garcia 
Information System Developer 
www.htmlspider.com.br
++


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



HTML Table navigation

2003-01-01 Thread Juan José Velázquez Garcia
Hello,

Is there a sample showing a set of objects navigation (previous page/next page) using 
html tables and struts?


Thanks in advance,

++
  Juan Jose Velazquez Garcia 
Information System Developer 
www.htmlspider.com.br
++


--
To unsubscribe, e-mail:   
For additional commands, e-mail: