DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22205>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22205

struts 1.0.2 - application deployed in root (/) gives invalid form actions 
(//<action>) in iPlanet/Sun ONE Web Server

           Summary: struts 1.0.2 - application deployed in root (/) gives
                    invalid form actions (//<action>) in iPlanet/Sun ONE Web
                    Server
           Product: Struts
           Version: 1.0.2 Final
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Blocker
          Priority: Other
         Component: Controller
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


Hi,

  In struts 1.0.2, I have deployed an application in the root (/) instead of 
virtual folder. In this case my form actions rendered as //<action>. Because of 
this the browser assumes I have given some web site name and navigates to 
http://<action> instead of http://<server>/<action>.

    <action    path="/execute_report"
type="com.orbitech.products.testtracker.reports.ExecuteReportAction"
               name="reportForm"
              scope="request"
           validate="true">

<html:form action="execute_report"
           onsubmit="return validateForm();" target="_blank">

This generates the following html code

<form name="reportForm" method="POST" action="//execute_report.do" 
onsubmit="return validateForm();" target="_blank">

When I saw the html:form tag class, the following code does it

    protected String getActionMappingURL() {
....
        StringBuffer value = new StringBuffer(request.getContextPath()); // it 
gives "/" ...
  String actionMapping = getActionMappingName();
  if (servletMapping.startsWith("*.")) {
      value.append(actionMapping); // in struts-config /execute_report, result 
is //execute_report.do
      value.append(servletMapping.substring(1));
  } else if (servletMapping.endsWith("/*")) {
             value.append(servletMapping.substring
                            (0, servletMapping.length() - 2));
             value.append(actionMapping);
         }
  if (queryString != null)
      value.append(queryString);
...
 

  Do I need to change any configuration for this to work? As of now I am 
testing in a virtual folder setup.

Best Regards,
Thiru

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

Reply via email to