where error is my code?

On 2/28/06, Laurie Harper <[EMAIL PROTECTED]> wrote:
>
> First things first: did you go through all the migration steps listed on
> the wiki for 1.0 -> 1.2, 1.1 -> 1.2.4, 1.2.4 -> 1.2.7 and 1.2.7 -> 1.2.8?
>
> L.
>
> red phoenix wrote:
> > I have a simple Struts program,it can run well in Struts1.0.2,then I
> migrate
> > it to Struts1.2.8,this time I find index.jsp page shows well,but when I
> > submit this page,it should redirect to show.jsp page and show something
> in
> > it,but in fact it redirect an empty page,it show nothing,even no error
> in
> > Tomcat,I don't know what wrong in my struts program,my code is follows:
> > /* index.jsp */
> > <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
> > <html:form method="post" action="log">
> >       abc: <html:text property="logstime"/>
> >  <html:submit value="search" />
> > </html:form>
> >
> >  /* show.jsp */
> > <%@ taglib uri="http://struts.apache.org/tags-html"; prefix="html" %>
> > <html:form method="post" action="log">
> >       result abc: <html:text property="logstime"/>
> > </html:form>
> >
> > /* struts-config.xml */
> > <?xml version="1.0" encoding="ISO-8859-1" ?>
> > <!DOCTYPE struts-config PUBLIC
> >           "-//Apache Software Foundation//DTD Struts Configuration 1.2
> //EN"
> >           "http://struts.apache.org/dtds/struts-config_1_2.dtd";>
> > <struts-config>
> >   <form-beans>
> >     <form-bean name="logmanageForm" type="com.LogmanageForm"/>
> >   </form-beans>
> >   <action-mappings>
> >     <action    path="/log"
> >                type="com.LogmanageAction"
> >                name="logmanageForm"
> >                validate="true"
> >                input="/index.jsp">
> >       <forward name="show" path="/show.jsp"/>
> >     </action>
> >   </action-mappings>
> > </struts-config>
> >
> > /* web.xml */
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> > <!DOCTYPE web-app
> >   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
> >   "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd";>
> > <web-app>
> >   <!-- Action Servlet Configuration -->
> >   <servlet>
> >    <servlet-name>action</servlet-name>
> >     <servlet-class>org.apache.struts.action.ActionServlet
> </servlet-class>
> >      <init-param>
> >       <param-name>config</param-name>
> >       <param-value>/WEB-INF/struts-config.xml</param-value>
> >     </init-param>
> >     <init-param>
> >       <param-name>debug</param-name>
> >       <param-value>2</param-value>
> >     </init-param>
> >     <init-param>
> >       <param-name>detail</param-name>
> >       <param-value>2</param-value>
> >     </init-param>
> >     <init-param>
> >       <param-name>validate</param-name>
> >       <param-value>true</param-value>
> >     </init-param>
> >     <load-on-startup>2</load-on-startup>
> >   </servlet>
> >  <!-- Action Servlet Mapping -->
> > <servlet-mapping>
> >     <servlet-name>action</servlet-name>
> >     <url-pattern>*.do</url-pattern>
> >   </servlet-mapping>
> > <!-- Struts Tag Library Descriptors -->
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
> >   </taglib>
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
> >   </taglib>
> >   <taglib>
> >     <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
> >     <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
> >   </taglib>
> > </web-app>
> >
> > /* LogmanageForm.java */
> > package com;
> > import org.apache.struts.action.*;
> > import javax.servlet.http.HttpServletRequest;
> > import java.io.*;
> > public class LogmanageForm extends ActionForm{
> >  protected String logstime;
> >  public String getLogstime(){
> >   return loglevel;
> >  }
> >  public void setLogstime(String logstime){
> >   this.logstime=logstime;
> >  }
> > }
> >
> > /* LogmanageAction.java*/
> > package com;
> > import org.apache.struts.action.*;
> > import javax.servlet.http.*;
> > import java.io.*;
> > import java.util.*;
> > import java.sql.*;
> > public class LogmanageAction extends Action{
> >  public ActionForward perform(ActionMapping mapping,ActionForm
> > form,HttpServletRequest req,HttpServletResponse res){
> >      return mapping.findForward("show");
> >  }
> > }
> >
> >
> > Where wrong in my code?
> > Thanks in advance.
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to