You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael Schommer <Mi...@fernbach.com> on 2001/05/14 14:08:27 UTC

action-Mapping?

Hi,

I have a problem with action-Mapping in the J2EE-reference implementation
(j2sdk221.3).

In my index.jsp is the html:form definition:

  <html:form name="TimeFormBean" action="/time.do"
type="Time.TimeFormBean">

but the PageSource of the resulting HTML-Page is

  <form name="TimeFormBean" method="POST" action="/TimeRoot">

it should be

   <form name="TimeFormBean" method="POST" action="/TimeRoot/time.do">

Had anybody else this problem and solved it???

Gruß
Michael

--
Java - write once, run anywhere




Re: action-Mapping?

Posted by Konstantin Priblouda <kp...@yahoo.com>.
--- Michael Schommer <Mi...@fernbach.com>
wrote:
> Hi,
> 
> I have a problem with action-Mapping in the
> J2EE-reference implementation
> (j2sdk221.3).
> 
> In my index.jsp is the html:form definition:
> 
>   <html:form name="TimeFormBean" action="/time.do"
> type="Time.TimeFormBean">
> 
> but the PageSource of the resulting HTML-Page is
> 
>   <form name="TimeFormBean" method="POST"
> action="/TimeRoot">
> 
> it should be
> 
>    <form name="TimeFormBean" method="POST"
> action="/TimeRoot/time.do">
> 
> Had anybody else this problem and solved it???
> 

I know this Problem. It's because #$@ing deploytool
changes your web.xml file. Exactly servlet mapping. 
It makes "/*.do" from "*.do" -> form
tag cannot resolve this mapping anymore. 

I worked around by using servlet mapping
like "/do/*".

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/