I just did this same thing yesterday.  Your CSS and images are being
protected by the web resource containing <url-pattern>/*</url-pattern>.
Until a user has logged in, they won't be able to receive images, css, etc.
Be more specific in your URL pattern so you don't include those common
resources.


> -----Original Message-----
> From: Chaikin, Yaakov Y (US SSA)
> [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 08, 2003 12:06 PM
> To: [EMAIL PROTECTED]
> Subject: login page css not applied
>
>
> Hi,
>
> I have a problem where the login page is not showing any images and not
> having the css applied to it.
>
> Here is my web.xml:
> ---------------------------------------
> <web-app>
>
>       <servlet>
>               <servlet-name>Controller</servlet-name>
>               <servlet-class>corej2ee.web.Controller</servlet-class>
>               <init-param>
>
> <param-name>corej2ee.web.navigation.class</param-name>
>
> <param-value>corej2ee.web.EnvEntryNavigator</param-value>
>               </init-param>
>       </servlet>
>
>       <servlet-mapping>
>               <servlet-name>Controller</servlet-name>
>               <url-pattern>/*.jsp</url-pattern>
>       </servlet-mapping>
>
>       <welcome-file-list>
>               <welcome-file>welcome.jsp</welcome-file>
>               <welcome-file>index.html</welcome-file>
>       </welcome-file-list>
>
>       <resource-ref>
>                <res-ref-name>jdbc/afecWEBDB</res-ref-name>
>                <res-type>javax.sql.DataSource</res-type>
>                <res-auth>Container</res-auth>
>        </resource-ref>
>
>       <security-constraint>
>               <web-resource-collection>
>                       <web-resource-name>Regular and Power
> User</web-resource-name>
>                       <url-pattern>/*</url-pattern>
>               </web-resource-collection>
>               <auth-constraint>
>                       <role-name>RegularUser</role-name>
>                       <role-name>PowerUser</role-name>
>                       <role-name>Administrator</role-name>
>               </auth-constraint>
>               <user-data-constraint>
>                       <transport-guarantee>NONE</transport-guarantee>
>               </user-data-constraint>
>       </security-constraint>
>
>       <security-constraint>
>               <web-resource-collection>
>
> <web-resource-name>Administrator</web-resource-name>
>                       <url-pattern>/admin/*</url-pattern>
>               </web-resource-collection>
>               <auth-constraint>
>                       <role-name>Administrator</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>/login.jsp</form-login-page>
>
> <form-error-page>/loginError.html</form-error-page>
>               </form-login-config>
>       </login-config>
>
>       <env-entry>
>
> <env-entry-name>route/welcomePage/success</env-entry-name>
>               <env-entry-value>/welcome.jsp</env-entry-value>
>               <env-entry-type>java.lang.String</env-entry-type>
>       </env-entry>
> </web-app>
>
> My images are under images folder in the root of the application and my
> css in under css folder in the root of my application.
>
> The webpage is referencing css, for example, like this:
> <link href="css/background.css" rel="stylesheet" type="text/css">
>
> I am know I am messing up security paths, but I can't figure out what to
> do about it.
>
> Any help would be greatly appreciated.
>
> Thanks.
>
> Yaakov Chaikin
> Software Engineer
> BAE SYSTEMS
> 301-838-6899 (phone)
> 301-838-6802 (fax)
> [EMAIL PROTECTED]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to