Hi Here i am with a simple but crazy problem....huh! my getAuthType() always returns null even if i'm declaring the BASIC type in my web.xml here is the simple example from wrox and i'm unable to run it
and when i access it its always returning null. i also changed the tomcat-users.xml and added <user name="projsp" password="projsp" roles="superuser" /> as the book says. This is really time consuming and i wonder where the error is.......urghhhhhhhhh.....! Ersin you mentioned easy memory q's ... i guess i better start preparing on that front!! Somebody get Memory chip for me faiza
Hi Faiza, I have not yet get to that advanced page. But the error seems to be posted on the errata page: http://www.wrox.com/Books/Book_Errata.asp?loc=1&message_id=12904&isbn=1861004958�ion=11_3&subject=&subject_id= Error in web.xml for authentication examples In Chapter 16 we deal with basic, digest, and form authentication. It appears that the web.xml file needed to run the examples associated with these has a bug in it. According to the book, we need a <security-constraint> element that looks like the following: <security-constraint> <web-resource-collection> <web-resource-name>Entire Web Application</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> </security-constraint> However, to make the examples work we need to add a <auth-constraint> element too: <security-constraint> <web-resource-collection> <web-resource-name>The Entire Web Application</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>*</role-name> </auth-constraint> </security-constraint> (many thanks to Matt Moodie for this bug fix) Axel
posted 18 years ago
Thanx for telling abt the errata Axel!! Its a Feature not a bug faiza
What's that smell? Hey, sniff this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!