You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Loren Hall <lo...@attbi.com> on 2001/12/29 00:07:18 UTC

logon servlet through html forms "resource not available"

New to this and can't access /logon action through a standard html form

I'm integrating some struts functionality with a pre-existing, html based
site.  At index.html I'd like a login form, but don't want to force a change
to index.jsp.  However, i've tried action="logon",
action="/summershow/logon" and it says The requested resource (/logon) is
not available. I figure it's a path issue vs. an access issue, but for all I
know an html form just won't work.


First, any thoughts why the following html form tag won't work, and second,
what is the standard solution for this situation, .jsp or .html?


<form action="/summershow/logon" method="post" name="logon">
<input name="username" type="text">
<input name="password" type="password">
<input name="submit" type="submit">
</form>

responds with

type: Status report
message: /logon
description: The requested resource (/logon) is not available.


The servlet is under catalina/webapps/summershow/WEB-INF/ . . .  The working
code looks like this.


<html:form action="/logon" focus="username">
      User Name:       <html:text property="username" size="16"
maxlength="16"/>
	Password:        <html:password property="password" size="16"
maxlength="16" redisplay="false"/>
      <html:submit property="submit" value="Submit"/>
      <html:reset/>
</html:form>





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: logon servlet through html forms "resource not available"

Posted by Melissa L Kelley <st...@stuology.net>.
On Fri, 28 Dec 2001, Loren Hall wrote:

There isn't a lot of detail on how you have things configured, but as far
as your html form, you need to set the value of action according to the
way you mapped the action servlet. So, if you used extention mapping the
way the standard examples give:

<servlet-mapping>
     <servlet-name>action</servlet-name>
     <url-pattern>*.do</url-pattern>
</servlet-mapping>

Then your html form would need to be like so:

<form action="/summershow/logon.do" method="post" name="logon">

If you used a prefix mapping like so:

<servlet-mapping>
     <servlet-name>action</servlet-name>
     <url-pattern>/do/*</url-pattern>
</servlet-mapping>


Then your html form would need to be

<form action="/summershow/do/logon" method="post" name="logon">



> New to this and can't access /logon action through a standard html form
>
> I'm integrating some struts functionality with a pre-existing, html based
> site.  At index.html I'd like a login form, but don't want to force a change
> to index.jsp.  However, i've tried action="logon",
> action="/summershow/logon" and it says The requested resource (/logon) is
> not available. I figure it's a path issue vs. an access issue, but for all I
> know an html form just won't work.
>
>
> First, any thoughts why the following html form tag won't work, and second,
> what is the standard solution for this situation, .jsp or .html?
>
>
> <form action="/summershow/logon" method="post" name="logon">
> <input name="username" type="text">
> <input name="password" type="password">
> <input name="submit" type="submit">
> </form>
>
> responds with
>
> type: Status report
> message: /logon
> description: The requested resource (/logon) is not available.
>
>
> The servlet is under catalina/webapps/summershow/WEB-INF/ . . .  The working
> code looks like this.
>
>
> <html:form action="/logon" focus="username">
>       User Name:       <html:text property="username" size="16"
> maxlength="16"/>
> 	Password:        <html:password property="password" size="16"
> maxlength="16" redisplay="false"/>
>       <html:submit property="submit" value="Submit"/>
>       <html:reset/>
> </html:form>
>
>
>
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>
>




--> stu: www.stuology.net
It just no longer is plain simple safe fun
when it's the psycho chimp that has the ray gun
------------------------------------------------
Stuology -- A million monkeys can't be wrong


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>