JDBC realm and form authentication

J

josh

Hi,

I have a web application with this sample structure:

articles -->
(css) ------------------> css.css
(images) -------------> im.jpg
(javascript) ----------> log.js
(jsp) ------------------> index.jsp
login.jsp
log_error.jsp

now in my web.xml I write:

<security-constraint>
<web-resource-collection>
<web-resource-name>Article</web-resource-name>
<description>...</description>
<url-pattern>/jsp/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
<auth-constraint>
<description>...</description>
<role-name>tomcat</role-name>
</auth-constraint>
</security-constraint>

<login-config>
<auth-method>FORM</auth-method>
<realm-name>Protected Area</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/log_error.jsp</form-error-page> -->
</form-login-config>
</login-config>

<security-role>
<description>....</description>
<role-name>tomcat</role-name>
</security-role>

so when I type http://localhost:8080/articles/jsp

I have a redirect on login.jsp and than when I put correct username
and password
the system redirect me to jsp/index.jsp that should load css.css and
log.js

write as:
<link rel="stylesheet" type="text/css" href="../css/css.css" />
<script type="text/javascript" src="../javascript/log.js"></script>

but they are not loaded and the server tell me:

type Status report

message /articles/jsp/css/css.css

description The requested resource (/articles/jsp/css/css.css) is not
available.

why from index.jsp I can't load that files?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,836
Messages
2,569,748
Members
45,545
Latest member
rapter____0

Latest Threads

Top