Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Struts & FORM authentication

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

I have a problem!
Now I need change authentication system in small project.
This project is created using STRUTS.

Is possible to do LOGIN form using FORM authentication?

Here is login page source:

"
<html:form action="/authorization" method="post" >
<DIV align="center">
<table name="detail" align="center">
<tr>
<th>User</th>
<td>
<html:text property="user" styleId="user"></html:text>
</td>
</tr>
<tr>
<th>Password</th>
<td>
<html assword property="password" />
</td>
</tr>
<tr>
<th></th>
<td>
<html:submit value="Login" styleClass="button"></html:submit>
</td>
</tr>
</table>
</DIV>


</html:form>
"

if I change form action to j_security_check, after submit form go to j_security_check action in struts-config.xml.

Thanks!
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's not going to work.

My suggestion would be to remove the Struts tags and replace them with plain HTML tags. This applies to the login JSP only. All other pages need not be changed.[LIST]
 
This one time, at bandcamp, I had relations with a tiny ad.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic