I have a simple web application. I would like to protect it with a login 
page.

Below is the web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
              http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd";
         version="2.5"
         xmlns="http://java.sun.com/xml/ns/javaee";>

  <!-- Servlets -->
   <security-constraint>
<display-name>Example Login Page</display-name>
<web-resource-collection>
<web-resource-name>all</web-resource-name>
<url-pattern>/*</url-pattern>
<http-method>DELETE</http-method>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
</web-resource-collection>    
<auth-constraint>
<role-name>manager-gui</role-name>
</auth-constraint> 
<user-data-constraint><transport-guarantee>NONE</transport-guarantee></user-data-constraint>
</security-constraint>
   

  <!-- Default page to serve -->
   <welcome-file-list>
    <welcome-file>/BViewer.html</welcome-file>
  </welcome-file-list>
    
  <servlet>
  <servlet-name>BViewerRemote</servlet-name>
  
<servlet-class>com.xx.xxx.abc.bviewer.server.ui.BViewerRemoteImpl</servlet-class>
  </servlet>
  <servlet-mapping>
  <servlet-name>BViewerRemote</servlet-name>
  <url-pattern>/bviewer/BViewerRemote</url-pattern>
  </servlet-mapping>
  
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

<servlet>
<servlet-name>imageServlet</servlet-name>
<servlet-class>com.xx.xxx.abc.bviewer.server.ui.ImageServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>imageServlet</servlet-name>
<url-pattern>/irimages/*</url-pattern>
</servlet-mapping>
   
<login-config>
  <auth-method>FORM</auth-method>
  <realm-name>customRealm</realm-name>
  <form-login-config>
    <form-login-page>/LoginForm.html</form-login-page>
    <form-error-page>/LoginForm.html</form-error-page>
  </form-login-config>
</login-config>
<security-role>
<role-name>manager-gui</role-name>
</security-role>   

</web-app>


whenever I access the application using 
http://localhost:8080/BViewer-2.0.1-a1/<http://localhost:8080/BucketViewer-2.0.1-a1/>
  
is directly goes to the page. but if I access the
http://localhost:8080/BViewer-2.0.1-a1/<http://localhost:8080/BucketViewer-2.0.1-a1/>BucketViewer.html
 
 it will direct me to login page.

I want to direct it to login page always.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/ZROel3zI5C0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to