I'm not exactly sure what you mean by "incorporate user authorization into
selected a 'forward' view mapping." If you want container-managed security,
just add it to your web.xml like so:

  <security-constraint>
    <web-resource-collection>
      <web-resource-name>Admin</web-resource-name>
      <description>Admin functions</description>
      <url-pattern>/admin/*</url-pattern>
      <http-method>GET</http-method>
      <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
      <role-name>admin</role-name>
    </auth-constraint>
    <user-data-constraint>
      <transport-guarantee>NONE</transport-guarantee>
    </user-data-constraint>
  </security-constraint>

  <login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
      <form-login-page>/security/login.do</form-login-page>
      <form-error-page>/security/loginError.do</form-error-page>
    </form-login-config>
  </login-config>

My login.do maps using tiles to login.jsp, which looks like this:

<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<p>Please login.</p>
<form action="<html:rewrite page="/j_security_check"/>" method="POST">
  <p>Username: <input type="text" name="j_username" size="20"></p>
  <p>Password: <input type="password" name="j_password" size="20"></p>
  <p><input type="submit" value="Login"/> <html:link
forward="security.forgotPassword">Forgot your password?</html:link></p>
  <p>Don't have a login? <html:link
forward="security.register">Register</html:link> to get access to great jobs
or to post your jobs and get great candidates!</p>
</form>

Whenever the user tries to access a protected directory (specified in
web.xml), they are directed to the login page. Once they successfully log in
with a valid username and password, they go to the page they were trying to
access.

Hope this helps.

-----Original Message-----
Posted: Apr 10, 2002 8:01 AM

Hi,

I'm using JBoss241+tomcat323 (and have started looking at struts). From a
JBoss deployment standpoint, the hot deploy should work which will negate
the need to restart the server after a code change during the development
cycle. I'm not yet using JBoss3 so I don't know whether the bug(which it
sounds like it is) has been fixed yet.

By the way, if you are using struts+jboss, could you tell me how to
incorporate user authorization into selecting a 'forward' view
mapping(within an action mapping in struts-config)?

if this is off-topic, can you email me at [EMAIL PROTECTED], or post to
[EMAIL PROTECTED] - thanks!

Joe


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to