struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claire Suttle" <cla...@geoviz.com>
Subject Re: Submitting form does nothing
Date Mon, 26 Jul 2004 21:32:36 GMT
I just downloaded the source code, and stepped through it. I set breakpoints
in the init() method, the doGet(), the doPost(), and the process() methods.
On the pages that aren't working, none of those breakpoints get called.
Obviously I'm not familiar with the ActionServlet code...is there anywhere
else I should be setting breakpoints to try and trap this?

Thanks so much for your help,
Claire

> http://newprojectid.do
>
> instead of
>
> http://localhost:8080/NewProjectID.do
>
> but I have no idea what could be causing this - I just can't see any
> difference between the files that work and the ones that don't.

Hmmmmm... the only think I can think of next is to step through the
ActionServlet code itself.  You may have done this, but I understood you to
have set the break point in either the action or the jsp page...
Wish I could help more....

>
> Claire
>
>
> -------------------------------------------
>
> Thanks for your help, Hubert
>
>
> > Maybe you can provide a more detailed picture of what's happening.
>
> I'll certainly try!
>
> > -> What's your context path?
>
> I'm not sure...is this my listing in the Tomcat server.xml
> file? If so, it
> is:
> <Context path="/" reloadable="true" docBase="C:\Program
> Files\eclipse\workspace\GeoViz_Server" workDir="C:\Program
> Files\eclipse\workspace\GeoViz_Server\work" />
>
> > -> What URL does your browser show when you're on the form
> that doesn't
> > submit, just before you submit it?
>
> http://localhost:8080/NewProjectStart.do
>
> > -> What URL is shown right after you submit?
>
> http://newprojectid.do
>     - after trying it again here, that's actually the first
> time I've been
> able to catch that! Interesting...why is it missing out my
> server...and why
> is it all in lowercase? I haven't changed any of the defaults in my
> server.xml file.
>
> > -> How is your ActionServlet declared and mapped in your web.xml?
>
> My Action Servlet is mapped as:
> <servlet>
>
> <servlet-name>action</servlet-name>
>
> <servlet-class>com.GeoViz.util.ExtendedActionServlet</servlet-class>
>
> <init-param>
>
> <param-name>config</param-name>
>
> <param-value>/WEB-INF/struts-config.xml</param-value>
>
> </init-param>
>
> <load-on-startup>1</load-on-startup>
>
> </servlet>
>
> Where all the ExtendedActionServlet class does is check that
> the user is
> logged in. When the html:form tag has been expanded with "//" at the
> beginning, my breakpoint in this class is never hit - it
> doesn't even get to
> this point.
>
> > -> What version of Struts are you using?
>
> I'm using Struts 1.1
>
> > -> Are the fields showing up properly?  [Actual question here is: Is
> Struts
> > really finding your Action/ActionForm mapping correctly?]
>
> Yes, on the pages that work, it is. For example - on the page
> before the one
> that fails, I do have some form fields that a pre-populated,
> and that data
> is shown correctly.
>
> thanks,
> Claire
>
> >
> > --- Claire Suttle <claire@geoviz.com> wrote:
> > > Yeah, I've actually already tried adding the slash into
> the html:form
> tag.
> > > It doesn't actually make any difference. I've tried it on both the
> > > tomcat3/Java1.3 version and the Java1.4/Tomcat5 system.
> > >
> > > Either way, on tomcat3/java1.3:
> > > <html:form action="NewProjectID"> and
> > > <html:form action="/NewProjectID">
> > >
> > > expands to
> > > <form name="newProjectForm" method="post"
> action="/NewProjectID.do">
> > >
> > > and on tomcat5/java1.4
> > > <html:form action="NewProjectID"> and
> > > <html:form action="/NewProjectID">
> > >
> > > expands to
> > > <form name="newProjectForm" method="post"
> action="//NewProjectID.do">
> > >
> > > Claire
> > >
> > > ----- Original Message ----- 
> > > From: "Hubert Rabago" <jakartauser@yahoo.com>
> > > To: "Struts Users Mailing List" <user@struts.apache.org>
> > > Sent: Friday, July 23, 2004 3:50 PM
> > > Subject: Re: Submitting form does nothing
> > >
> > >
> > > > I'm surprised it's working for some of them.  Probably just
> coincidence.
> > > > AFAIK, when you specify an action, you should include
> the "/" that
> comes
> > > > before the action name.
> > > >
> > > > > <html:form action="AddNewUser">
> > > > > <html:form action="NewProjectID">
> > > >
> > > > should be
> > > >
> > > > > <html:form action="/AddNewUser">
> > > > > <html:form action="/NewProjectID">
> > > >
> > > > Hubert
> > > >
> > > > --- Claire Suttle <claire@geoviz.com> wrote:
> > > > > I've been looking into my problem some more, and I
> seem to have
> found a
> > > > > more specific error now.
> > > > >
> > > > > I am fairly certain that all my paths are in place
> correctly - I
> > > haven't
> > > > > changed any of my directory structures, all I've done
> is change the
> > > > > compiler from Java1.3 to Java 1.4 and change Tomcat 3
> to Tomcat 5.
> > > > >
> > > > > What seems to be happening is that when the JSP is
> taken from the
> page
> > > I
> > > > > write into its altered form, the Struts html:form tag
> does not seem
> to
> > > be
> > > > > expanding properly in all cases. I have about 3 cases
> where the
> > > expansion
> > > > > is correct, and about 10 where it is not.
> > > > >
> > > > > For example:
> > > > >
> > > > > Here's a the struts command when submitting the form
> does work -
> > > > > <html:form action="AddNewUser">
> > > > >
> > > > > and this is what it expands to when I click view
> source on the page:
> > > > >
> > > > > <form name="newUserForm" method="post"
> action="/AddNewUser.do">
> > > > >
> > > > > and here is the corresponding info from struts-config
> > > > >
> > > > > <action path="/AddNewUser"
> type="com.GeoViz.admin.NewUserAction"
> > > > > name="newUserForm"
> > > > >
> > > > > scope="session">
> > > > >
> > > > > <forward name="success"
> path="/administration/users/ViewAllUsers.jsp"/>
> > > > >
> > > > > <forward name="failure"
> path="/administration/users/AddNewUser.jsp"/>
> > > > >
> > > > > </action>
> > > > >
> > > > >
> > > > >
> > > > > Now, here's an example that doesn't work:
> > > > >
> > > > > <html:form action="NewProjectID">
> > > > >
> > > > > which then, for some reason is expanding to:
> > > > >
> > > > > <form name="newProjectForm" method="post"
> action="//NewProjectID.do">
> > > > >
> > > > > and here's my info from struts-config:
> > > > >
> > > > > <action path="/NewProjectID"
> type="com.GeoViz.projects.NewProjectID"
> > > > >
> > > > > name="newProjectForm" scope="session">
> > > > >
> > > > > <forward name="filter" path="/NewProjectFilter.do" />
> > > > >
> > > > > <forward name="create1"
> path="/projects/NewProjectStart.jsp" />
> > > > >
> > > > > <forward name="continue"
> path="/projects/NewProjectArea.jsp" />
> > > > >
> > > > > </action>
> > > > >
> > > > > So, for some reason, when the struts tags are
> expanded, some of the
> > > pages
> > > > > are getting an extra "/" in the form action property
> - and then
> > > obviously
> > > > > it can't find the right action in my struts-config file.
> > > > >
> > > > > However, I have no idea what could be causing
> this...does anyone
> have
> > > any
> > > > > ideas?
> > > > >
> > > > > Thanks, Claire
> > > > >
> > > > > ----- Original Message ----- 
> > > > > From: Claire Suttle
> > > > > To: user@struts.apache.org
> > > > > Sent: Thursday, July 22, 2004 1:17 PM
> > > > > Subject: Submitting form does nothing
> > > > >
> > > > >
> > > > > Hi,
> > > > >
> > > > > I am working on moving our current struts based
> server from Java 1.3
> /
> > > > > tomcat 3 to Java 1.4 / tomcat 5. The forms that were
> working before
> do
> > > not
> > > > > seem to be working now - when I hit the submit
> button, I just get
> > > forwarded
> > > > > to a blank page. My action classes are not hit. I extended the
> > > > > ActionServlet class, and my extended class does not
> get hit either.
> > > > >
> > > > > I know that my paths are set up correctly, and that
> my struts-config
> > > file
> > > > > is being read because in some places I have links
> directly to action
> > > > > classes, and those links are all fine, it just seems to be the
> submit
> > > > > mechanism that is failing.
> > > > >
> > > > > Has anyone come across anything like this, or has any ideas?
> > > > >
> > > > > Thanks,
> > > > > Claire
> > > >
> > > >
> > > >
> > > >
> > > > __________________________________
> > > > Do you Yahoo!?
> > > > Take Yahoo! Mail with you! Get it on your mobile phone.
> > > > http://mobile.yahoo.com/maildemo
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > >
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail Address AutoComplete - You start. We finish.
> > http://promotions.yahoo.com/new_mail
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message