struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Crossley <jcross...@ifleet.com>
Subject Re: 1001st time this question gets asked
Date Fri, 19 Apr 2002 21:54:33 GMT
Jim Crossley <jcrossley@ifleet.com> writes:

> > <form action="/login.action" method="get" name="loginForm">
> 
> That won't work.  For the above action, your jsp should contain this:
> <html:form action="/login">
> 
> If you insist on not using struts tags, the equivalent is this:
> <form action="/YourWebAppName/login.do" method="post" name="loginForm">

Actually, you never want to embed the web app's name in a jsp.  A
more robust equivalent is this:

<form action="<%=request.getContextPath()%>/login.do" method="post" name="loginForm">

But that's even more gross to read, so you should just use the struts
tag instead.  :-)

-- 
Jim Crossley
http://www.lads.com/~jim

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


Mime
View raw message