  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Subject: Why HTTP validate can 't work | Subject: Why HTTP validate can 't work 2005-10-23 - By Edward King
Back I use JDK1.5 and Tomcat5.5.12, I have three files like follows: -- ----index.jsp-- -- <html> <body> <% out.println("<H2>Authentication Mechanism "+ request.getAuthType() +" </H2>" ); %> </body> </html>
-- ---- --web.xml-- ---- -- <?xml version="1.0" encoding="ISO-8859 (See http://ISO-8859.ora-code.com)-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd"> <web-app> <security-constraint> <web-resource-collection> <web-resource-name>Entire Application</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> </security-constraint> <login-config> <auth-method>BASIC</auth-method> <realm-name>ProJSP Authentication Example</realm-name> </login-config> </web-app>
-- --tomcat-users.xml-- ---- -- <?xml version='1.0' encoding='utf-8 (See http://utf-8.ora-code.com)'?> <tomcat-users> <role rolename="tomcat"/> <role rolename="role1"/> <role rolename="superuser"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> <user username="projst" password="projsp" roles="superuser"/> </tomcat-users>
When run index.jsp,it should pop a validate window,but when I run it,it don't pop a validate window and only shows a message: Authentication Mechanism null
Why? How to do it?
Thanks in advance!
=========================================================================== To unsubscribe: mailto listserv@(protected) with body: "signoff JSP-INTEREST". For digest: mailto listserv@(protected) with body: "set JSP-INTEREST DIGEST".
Some relevant archives, FAQs and Forums on JSPs can be found at:
http://java.sun.com/products/jsp http://archives.java.sun.com/jsp-interest.html http://forums.java.sun.com http://www.jspinsider.com
|
|
 |