You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Konstantin Priblouda <kp...@yahoo.com> on 2001/05/07 15:27:32 UTC

FYI: asocial behaviour of j2eesdk1.3 ( deploytool )

I solved my problem with <form> tag. 

I discovered that action mappings in form

  <!-- Standard Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>

are unsuitable for use with j2sdkee1.3. Deploytool
( or whatever else ) botches web.xml and changes
"*.do" 
to "/*.do". Unfortunately, struts form tag does
following:
--- snip ---
    if (servletMapping != null) {
            String actionMapping =
getActionMappingName();
            if (servletMapping.startsWith("*.")) {
                value.append(actionMapping);
               
value.append(servletMapping.substring(1));
            } else if (servletMapping.endsWith("/*"))
{
                value.append(servletMapping.substring
                             (0,
servletMapping.length() - 2));
                value.append(actionMapping);
            }
        }
-- snap---

This way action mapping wil be never found, 
and you will go on the walls. 

Workable solution would be either to patch <form>
tag, or use mappings in form:

  <!-- Standard Action Servlet Mapping -->
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>/do/*</url-pattern>
  </servlet-mapping>

This worked for me fine...

thanks for your attention...

regards,

=====
Konstantin Priblouda ( ko5tik )    Freelance Software developer
< http://www.pribluda.de > < play java games -> http://www.yook.de >
< render charts online -> http://www.pribluda.de/povray/ >

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Re: FYI: asocial behaviour of j2eesdk1.3 ( deploytool )

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Mon, 7 May 2001, Konstantin Priblouda wrote:

> I solved my problem with <form> tag. 
> 
> I discovered that action mappings in form
> 
>   <!-- Standard Action Servlet Mapping -->
>   <servlet-mapping>
>     <servlet-name>action</servlet-name>
>     <url-pattern>*.do</url-pattern>
>   </servlet-mapping>
> 
> are unsuitable for use with j2sdkee1.3. Deploytool
> ( or whatever else ) botches web.xml and changes
> "*.do" 
> to "/*.do".

This bug got fixed in the upcoming beta-2 release of j2sdkee1.3.

Craig McClanahan