Java/Web Manual
  SoftPLC    Font size:      

Security Servlet

SoftPLC's web server supports servlet based security, which allows you to password protect any file in any directory or any servlet. The security model is based on the HTTP protocol's built-in authentication support - called HTTP authentication. Basic HTTP authentication is structured on a simple challenge/response, username/password model. Usernames, passwords, and directories are secured by editing the web server's text based configuration files. Other servlet based security models can be implemented such as custom HTML form authentication via session management or cookies.

To change or add usernames and passwords to the security, edit the SERVLET.LST file (C:\LST\USR\SERVLET.LST) on the SoftPLC (the below code segment). "duke" would be the username and "texas" would be its corresponding password. (And correspondingly, the user "joeuser" would have a password of "mypassword".)

servlet.Authorization.code=Authorization
servlet.Authorization.initArgs=duke=texas,joeuser=mypassword

To enable or define directories to secure, edit the SERVER.LST file (C:\LST\USR\SERVER.LST) on the SoftPLC in this code segment:

ServletByRequest(GET|secure|*):Authorization

Replace "secure" with whatever directory you wish to require authentication.