• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Error message when running "Professional SCWCD" example

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I downloaded the "Professional SCWCD" casestudy sample code and try to install it on Forte for Java Community Edition. When I tried to start the application, I got the following error:
2003-02-08 17:17:10 WebappLoader[]: Deploying class repositories to work directory C:\ide-awong\tomcat401_base\work\localhost\_
2003-02-08 17:17:10 StandardManager[]: Seeding random number generator class java.security.SecureRandom
2003-02-08 17:17:10 StandardManager[]: Seeding of random number generator has been completed
2003-02-08 17:17:11 ContextConfig[]: Added certificates -> request attribute Valve
2003-02-08 17:17:11 ContextConfig[]: No Realm has been configured to authenticate against
2003-02-08 17:17:11 ContextConfig[]: Marking this application unavailable due to previous error(s)
2003-02-08 17:17:11 StandardContext[]: Error initializing naming context for context
2003-02-08 17:17:11 StandardContext[]: Context startup failed due to previous errors
2003-02-08 17:17:11 StandardContext[]: Error initializing naming context for context
Why it is complaining there is "No Realm has been configured to authenticate against"? Here is the content of the web.xml file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">;
<web-app>
<servlet>
<servlet-name>controller</servlet-name>
<servlet-class>com.wrox.scwcd.chapter14.ControllerServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>controller</servlet-name>
<url-pattern>/controller</url-pattern>
</servlet-mapping>
<taglib>
<taglib-uri>/forumTaglib</taglib-uri>
<taglib-location>/WEB-INF/scwcd.tld</taglib-location>
</taglib>
<security-constraint>
<web-resource-collection>
<web-resource-name>SecureResource</web-resource-name>
<url-pattern>/controller/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>owner</role-name>
<role-name>user</role-name>
<role-name>moderator</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Secure Realm</realm-name>
<form-login-config>
<form-login-page>/login.html</form-login-page>
<form-error-page>/error.html</form-error-page>
</form-login-config>
</login-config>
</web-app>
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
check your config file: CATALINA_HOME/conf/tomcat-users.xml
You must define the users and roles in this file before accessing this servlet!
/Enrico
    Bookmark Topic Watch Topic
  • New Topic