You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "STEPHEN BHADRAN (JIRA)" <ji...@apache.org> on 2006/04/25 01:06:09 UTC

[jira] Commented: (STR-2546) action field is blank in using html:form

    [ http://issues.apache.org/struts/browse/STR-2546?page=comments#action_37178 ] 

STEPHEN BHADRAN commented on STR-2546:
--------------------------------------

Thanks Don. I was checking my emails often and didn't check the bug itself - 
else I would've responsed much earlier. I was able to reproduce the problem 
with the 1.2.9 version as well. The issue is still there. 

Since I am not able to attach the entire WAR project, I am attaching the two 
classes I added to the strurs-example project to demonstrate this problem. 

1. FindCaseServlet.java
2. FindCaseServletTest.java

Add these two classes to the struts-example project and execute the 
FindCaseServletTest testcase (the URL is already in the document attached 
previously). The testcase should run for about 30 seconds, this is done 
intentionally with a dummy loop logic. When this is running - request any JSP 
form in the struts-example application. Once the page is loaded, view the HTML 
source, you should see the action path partially or completely missing. 

The trick is to keep two browser instances open, and in one instance execute 
the testcase URL and as soon as you see "FindCaseServlet.doPost.Before dummy 
loop" line in the server console - request a JSP form immediately from the 
application through the second browser instance. When the timing works right - 
you will see the HTML response with incorrect action path. 

The two class attachment follows... 

> action field is blank in  using html:form
> -----------------------------------------
>
>          Key: STR-2546
>          URL: http://issues.apache.org/struts/browse/STR-2546
>      Project: Struts Action 1
>         Type: Bug

>   Components: Unknown
>     Versions: 1.1 Final
>  Environment: Operating System: AIX
> Platform: PC
>     Reporter: Matt Sargent
>     Assignee: Struts Developer Mailing List
>     Priority: Critical
>  Attachments: Problem Demonstration with Struts-Example Application.doc
>
> I'm using tomcat 5.0.28 and sun's 1.4.2_07 jdk.
> When using an html:form my generated html occasionally leaves the action field 
> blank.
> jsp source:
> <html:form action="foo.do"> ...
> Sometimes my html source ends up like this:
> <form name="fooform" method="post" action=""> ...
> Whereas it should look like this: 
> <form name="fooform" method="post" action="/webapp/foo.do"> ...
> from my struts config:
> form bean:
>   <form-bean name="fooform" type="com.foo.FooForm"/>
> action mapping:
>     <action path="/foo"
>       type="com.foo.FooAction"
>       scope="request"
>       name="fooform"
>       input="foo.jsp">
>       <forward name="success" path="/foodone.jsp" redirect="true"/>
>       <forward name="failure" path="/foo.jsp" redirect="false"/>
>     </action>
> This code works fine for a few days, and then I start getting the blank 
> action.  After that, I need to restart Tomcat.  It is possible that this bug 
> exists in Tomcat.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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