import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;
import org.apache.struts.action.*;

public class StrutsDataSourceAction extends Action
{

    public StrutsDataSourceAction()
    {
    }

    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
        throws Exception
    {
        DataSource dataSource = getDataSource(request, "DataSource");
        java.sql.Connection connection = dataSource.getConnection();
        HelpOperate helpBean = new HelpOperate();
        UserBean user = helpBean.getUser(connection);
        request.setAttribute("user", user);
        return mapping.findForward("success");
    }
}