Problemas de mapeamento com Tomcat + Roller

4 respostas
Leonardo

Estou encontrando um problema de mapeamento com qualquer servlet que tento acessar em meu servidor Tomcat.

Sempre recebo o erro HTTP 404. Por exemplo:
The requested URL /auth was not found on this server.

No entanto tenho no web.xml o mapeamento correto (neste caso o arquivo é do RollerWeblogger).

Alguém tem idéia do que pode estar causando este erro ?

4 Respostas

caiofilipini

Dê uma conferida nos logs do Tomcat, pode estar faltando alguma coisa no classpath, ou algum erro ocorreu na hora de inicializar algum filter/listener…

[]'s

pcalcado

Ia ser tãããão mais fácil se você colocasse seu web.xml, a URl que digita e a mensagem de erro… :wink:

[]s

Leonardo

Tá certo... desculpe a falha...

O web.xml é o padrào do Roller:
<?xml version="1.0" encoding="UTF-8"?>
<!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>
	<display-name>Roller Weblogger</display-name>
	
	<!-- RESIN_LOGGER -->
	
	<!--  
	Secure Login (off by default)
	Roller's secure login feature turns on SSL for only the login
	page and no other parts of the application. If you wish to enable
	secure login, do the following:
	1) You must also configure your web or application server to 
	support SSL. See your server's documentation for more information.
	2) Set the secure_login context parameter to true and set the 
	http_port and https_port to match those used by your app server.
	3) Uncomment the security constraint named SecureLogin below.
	-->
	<context-param>
	    <param-name>secure_login</param-name>
	    <param-value>false</param-value>
	</context-param>
	<!--  Used only if secure_login is enabled -->
	<context-param>
	    <param-name>http_port</param-name>
	    <param-value>8080</param-value>
	</context-param>
	<!--  Used only if secure_login is enabled -->
	<context-param>
	    <param-name>https_port</param-name>
	    <param-value>8443</param-value>
	</context-param>
	<!-- 
	Comment authenticator to be used.
	-->
	<context-param>
	    <param-name>org.roller.commentAuthenticatorClass</param-name>
	    <!-- 
	    <param-value>org.roller.presentation.velocity.DefaultCommentAuthenticator</param-value>
	    -->
	    <param-value>org.roller.presentation.velocity.MathCommentAuthenticator</param-value>
	</context-param>
	
	<!-- 
	Experimental setting. Don't touch it.
	-->
	<context-param>
	    <param-name>org.roller.persistence</param-name>
	    <param-value>org.roller.business.hibernate.RollerImpl</param-value>
	</context-param>
	
	<!-- 
	Experimental setting. Don't touch it.
	-->
	<context-param>
	    <param-name>org.roller.authenticatorClass</param-name>
	    <param-value>org.roller.presentation.DefaultAuthenticator</param-value>
	</context-param>
	
	<!-- 
	Needed for Velocity. Don't touch it.
	-->
	<context-param>
	    <param-name>org.roller.presentation.velocity.toolbox</param-name>
	    <param-value>/WEB-INF/toolbox.xml</param-value>
	</context-param>
	
	<!--
	Weblog Entry Plugins
	Don't change the order of the plugins, but feel free to
	add and remove them.  ReadMore should always be the last
	Plugin. Changing the order could result in unpredictable results.
	-->
	<context-param>
	    <param-name>org.roller.pagePlugins</param-name>
	    <param-value>
	<!--
	        org.roller.presentation.velocity.plugins.jspwiki.WikiPlugin,
	        org.roller.presentation.velocity.plugins.radeox.WikiPlugin,
	-->
	        org.roller.presentation.velocity.plugins.textile.TextilePlugin,
	        org.roller.presentation.velocity.plugins.acronyms.AcronymsPlugin,
	        org.roller.presentation.velocity.plugins.bookmarks.BookmarkPlugin,
	        org.roller.presentation.velocity.plugins.email.ObfuscateEmailPlugin,
	        org.roller.presentation.velocity.plugins.smileys.SmileysPlugin,
	        org.roller.presentation.velocity.plugins.readmore.ReadMorePlugin
	    </param-value>
	</context-param>
	
	    <filter>
	        <filter-name>RssGzipFilter</filter-name>
	        <filter-class>org.roller.presentation.filters.CompressionFilter</filter-class>
	    </filter>
	
	   <filter>
	      <filter-name>RssCacheFilter</filter-name>
	      <filter-class>org.roller.presentation.pagecache.PageCacheFilter</filter-class>
	      <init-param>
	         <param-name>size</param-name>
	         <param-value>50</param-value>
	         <description><![CDATA[Number of pages to keep in cache]]></description>
	      </init-param>
	      <init-param>
	         <param-name>timeoutInterval</param-name>
	         <param-value>1800</param-value>
	         <description><![CDATA[Page Cache timeout interval in seconds (-1 to disable timeout)]]></description>
	      </init-param>
	      <init-param>
	         <param-name>timeoutRatio</param-name>
	         <param-value>1.0</param-value>
	         <description><![CDATA[Ratio of pages to be timed out on interval (1.0 means 100%)]]></description>
	      </init-param>
	   </filter>
	
	    <!-- begin xdoclet generated Filter declarations -->
	
	   <filter>
	      <filter-name>IfModifiedFilter</filter-name>
	      <filter-class>org.roller.presentation.filters.IfModifiedFilter</filter-class>
	   </filter>
	   <filter>
	      <filter-name>PageCacheFilter</filter-name>
	      <filter-class>org.roller.presentation.pagecache.PageCacheFilter</filter-class>
	      <init-param>
	         <param-name>size</param-name>
	         <param-value>100</param-value>
	         <description><![CDATA[Number of pages to keep in cache]]></description>
	      </init-param>
	      <init-param>
	         <param-name>timeout</param-name>
	         <param-value>1800</param-value>
	         <description><![CDATA[Page Cache timeout interval in seconds]]></description>
	      </init-param>
	   </filter>
	   <filter>
	      <filter-name>CloseSessionFilter</filter-name>
	      <filter-class>org.roller.presentation.filters.CloseSessionFilter</filter-class>
	   </filter>
	   <filter>
	      <filter-name>loginFilter</filter-name>
	      <display-name>Login Filter</display-name>
	      <filter-class>org.roller.presentation.filters.LoginFilter</filter-class>
	      <init-param>
	         <param-name>enabled</param-name>
	         <param-value>true</param-value>
	      </init-param>
	   </filter>
	   <filter>
	      <filter-name>RequestFilter</filter-name>
	      <filter-class>org.roller.presentation.filters.RequestFilter</filter-class>
	   </filter>
	   <filter>
	      <filter-name>PageGzipFilter</filter-name>
	      <filter-class>org.roller.presentation.filters.CompressionFilter</filter-class>
	   </filter>
	   <filter>
	      <filter-name>BreadCrumbFilter</filter-name>
	      <filter-class>org.roller.presentation.filters.BreadCrumbFilter</filter-class>
	      <init-param>
	         <param-name>maxStackSize</param-name>
	         <param-value>3</param-value>
	      </init-param>
	   </filter>
	   <filter>
	      <filter-name>RefererFilter</filter-name>
	      <filter-class>org.roller.presentation.filters.RefererFilter</filter-class>
	   </filter>
	
	<!-- *********************************************************
	    Filter mappings - order IS important here.  Since there is
	    no way to declare order in xdoclet, we must do it by hand.
	    ******************************************************* -->
	
	<!-- Map everything to the CloseSessionFilter -->
	<filter-mapping>
	    <filter-name>CloseSessionFilter</filter-name>
	    <url-pattern>/*</url-pattern>
	</filter-mapping>
	
	<!-- Use RequestFilter on all requests except for Newsfeed requests -->
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>/page/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>/comments/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>/preview/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>/flavor/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>/foaf/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>*.do</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>/xmlrpc/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RefererFilter</filter-name>
	    <url-pattern>/page/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RefererFilter</filter-name>
	    <url-pattern>/comments/*</url-pattern>
	</filter-mapping>
	
	<!-- RememberMe Filter -->
	<filter-mapping>
	    <filter-name>loginFilter</filter-name>
	    <url-pattern>/login.jsp</url-pattern>
	    <!-- These are needed by Tomcat 5 since it does a forward to login.jsp -->
	    <!--dispatcher>REQUEST</dispatcher>
	    <dispatcher>FORWARD</dispatcher-->
	</filter-mapping>
	<filter-mapping>
	    <filter-name>loginFilter</filter-name>
	    <url-pattern>/logout-redirect.jsp</url-pattern>
	</filter-mapping>
	
	<!--
	Currently we only support If-Modified-Since using weblog last pub
	time, so the only place we should us it is on the RSS feed.
	-->
	<filter-mapping>
	    <filter-name>IfModifiedFilter</filter-name>
	    <url-pattern>/rss/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>BreadCrumbFilter</filter-name>
	    <url-pattern>*.do</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>PageGzipFilter</filter-name>
	    <url-pattern>/page/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RssGzipFilter</filter-name>
	    <url-pattern>/rss/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
	    <filter-name>RssGzipFilter</filter-name>
	    <url-pattern>/flavor/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
	    <filter-name>RssGzipFilter</filter-name>
	    <url-pattern>/foaf/*</url-pattern>
	</filter-mapping>
	
	<!-- Cache filters should be last in line -->
	<filter-mapping>
	    <filter-name>RssCacheFilter</filter-name>
	    <url-pattern>/rss/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
	    <filter-name>RssCacheFilter</filter-name>
	    <url-pattern>/flavor/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
	    <filter-name>RssCacheFilter</filter-name>
	    <url-pattern>/foaf/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>PageCacheFilter</filter-name>
	    <url-pattern>/page/*</url-pattern>
	</filter-mapping>
	
	   <listener>
	      <listener-class>org.roller.presentation.RollerSession</listener-class>
	   </listener>
	   <listener>
	      <listener-class>org.roller.presentation.RollerContext</listener-class>
	   </listener>
	
	    <!--
	    To use non XDoclet listeners, create a listeners.xml file that
	    contains the additional listeners and place it in your
	    project's merge dir.
	    -->
	
	<!-- The Struts Servlet -->
	<servlet>
	
		<servlet-name>action</servlet-name>
		<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
	
		<init-param>
			<param-name>config</param-name>
			<param-value>/WEB-INF/struts-config.xml</param-value>
		</init-param>
	
		<init-param>
			<param-name>validate</param-name>
			<param-value>true</param-value>
		</init-param>
	
		<load-on-startup>2</load-on-startup>
	
	</servlet>
	
	   <servlet>
	      <servlet-name>RssServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.FlavorServlet</servlet-class>
	
	   </servlet>
	   <servlet>
	      <servlet-name>LanguageServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.LanguageServlet</servlet-class>
	
	      <init-param>
	         <param-name>org.roller.presentation.supported.languages</param-name>
	         <param-value>en,nl,zh_cn,zh_tw,vi</param-value>
	      </init-param>
	
	      <load-on-startup>10</load-on-startup>
	
	   </servlet>
	   <servlet>
	      <servlet-name>RollerXMLRPCServlet</servlet-name>
	     <servlet-class>org.roller.presentation.xmlrpc.RollerXMLRPCServlet</servlet-class>
	
	   </servlet>
	   <servlet>
	      <servlet-name>AtomServlet</servlet-name>
	     <servlet-class>org.roller.presentation.atom.RollerAtomServlet</servlet-class>
	
	   </servlet>
	   <servlet>
	      <servlet-name>TrackbackServlet</servlet-name>
	     <servlet-class>org.roller.presentation.weblog.TrackbackServlet</servlet-class>
	
	   </servlet>
	   <servlet>
	      <servlet-name>CommentServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.CommentServlet</servlet-class>
	
	      <init-param>
	         <param-name>org.apache.velocity.properties</param-name>
	         <param-value>/WEB-INF/velocity.properties</param-value>
	      </init-param>
	      <init-param>
	         <param-name>org.apache.velocity.properties</param-name>
	         <param-value>/WEB-INF/velocity.properties</param-value>
	      </init-param>
	
	      <load-on-startup>0</load-on-startup>
	
	   </servlet>
	   <servlet>
	      <servlet-name>SearchServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.SearchServlet</servlet-class>
	
	      <init-param>
	         <param-name>properties</param-name>
	         <param-value>/WEB-INF/velocity.properties</param-value>
	      </init-param>
	
	      <load-on-startup>5</load-on-startup>
	
	   </servlet>
	   <servlet>
	      <servlet-name>PageServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.PageServlet</servlet-class>
	
	      <init-param>
	         <param-name>org.apache.velocity.properties</param-name>
	         <param-value>/WEB-INF/velocity.properties</param-value>
	      </init-param>
	
	      <load-on-startup>0</load-on-startup>
	
	   </servlet>
	   <servlet>
	      <servlet-name>FoafServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.FoafServlet</servlet-class>
	
	   </servlet>
	   <servlet>
	      <servlet-name>PreviewServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.PreviewServlet</servlet-class>
	
	      <init-param>
	         <param-name>properties</param-name>
	         <param-value>/WEB-INF/velocity.properties</param-value>
	      </init-param>
	
	      <load-on-startup>1</load-on-startup>
	
	   </servlet>
	   <servlet>
	      <servlet-name>login</servlet-name>
	      <display-name>Login Servlet</display-name>
	     <servlet-class>org.roller.presentation.LoginServlet</servlet-class>
	
	      <init-param>
	         <param-name>authURL</param-name>
	         <param-value>/j_security_check</param-value>
	      </init-param>
	
	      <load-on-startup>3</load-on-startup>
	
	   </servlet>
	
	    <servlet-mapping>
	        <servlet-name>action</servlet-name>
	        <url-pattern>*.do</url-pattern>
	    </servlet-mapping>
	
	   <servlet-mapping>
	      <servlet-name>RssServlet</servlet-name>
	      <url-pattern>/rss/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>RssServlet</servlet-name>
	      <url-pattern>/flavor/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>LanguageServlet</servlet-name>
	      <url-pattern>/language/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>RollerXMLRPCServlet</servlet-name>
	      <url-pattern>/xmlrpc</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>AtomServlet</servlet-name>
	      <url-pattern>/atom/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>TrackbackServlet</servlet-name>
	      <url-pattern>/trackback/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>CommentServlet</servlet-name>
	      <url-pattern>/comments/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>CommentServlet</servlet-name>
	      <url-pattern>/page/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>SearchServlet</servlet-name>
	      <url-pattern>/search/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>PageServlet</servlet-name>
	      <url-pattern>/page/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>FoafServlet</servlet-name>
	      <url-pattern>/foaf/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>PreviewServlet</servlet-name>
	      <url-pattern>/preview/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>login</servlet-name>
	      <url-pattern>/auth/*</url-pattern>
	   </servlet-mapping>
	
	   <session-config>
	      <session-timeout>30</session-timeout>
	   </session-config>
	
	   <!--
	   To specify mime mappings, create a file named mime-mappings.xml, put it in your project's mergedir.
	   Organize mime-mappings.xml following this DTD slice:
	
	   <!ELEMENT mime-mapping (extension, mime-type)>
	   -->
	
	       <welcome-file-list>
	        <welcome-file>home.jsp</welcome-file>
	        <welcome-file>index.jsp</welcome-file>
	        <welcome-file>index.html</welcome-file>
	    </welcome-file-list>
	
	<!-- 
	<error-page>
	    <exception-type>java.lang.Exception</exception-type>
	    <location>/error.jsp</location>
	</error-page>
	This results in an access denied error 
	<error-page>
	    <error-code>400</error-code>
	    <location>/login-redirect.jsp</location>
	</error-page>
	-->
	
	  <!--
	  To add taglibs by xml, create a file called taglibs.xml and place it
	  in your merge dir.
	  -->
	
	<!-- TOMCAT RESOURCE REF -->
	    <resource-ref>
	            <res-ref-name>jdbc/rollerdb</res-ref-name>
	            <res-type>javax.sql.DataSource</res-type>
	            <res-auth>Container</res-auth>
	    </resource-ref>
	
	<!-- Uncomment this for email notification of comments
	    <resource-ref>
	        <res-ref-name>mail/Session</res-ref-name>
	        <res-type>javax.mail.Session</res-type>
	        <res-auth>Container</res-auth>
	    </resource-ref>
	-->
	
	<!-- Uncomment this security constrain if secure_login is enabled -->
	<security-constraint>
	    <web-resource-collection>
	        <web-resource-name>SecureLogin</web-resource-name>
	        <description>Protects login pages with SSL</description> 
	        <url-pattern>/j_security_check</url-pattern>        
	        <url-pattern>/loginerror.jsp</url-pattern>
	        <url-pattern>/login-redirect.jsp</url-pattern>
	        <url-pattern>/login.jsp</url-pattern>         
	        <http-method>POST</http-method>
	        <http-method>GET</http-method>
	    </web-resource-collection>  
	    <user-data-constraint>
	        <description></description>
	        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
	    </user-data-constraint> 
	</security-constraint>
	
	<security-constraint>
	    <web-resource-collection>
	        <web-resource-name>EditorPages</web-resource-name>
	        <description>Editor pages</description>        
	        <url-pattern>/editor/*</url-pattern>
	        <url-pattern>/login-redirect.jsp</url-pattern>
	        <http-method>POST</http-method>
	        <http-method>GET</http-method>
	    </web-resource-collection>   
	    <auth-constraint>
	        <description>Editors and Adminstrators only</description>
	        <role-name>admin</role-name>
	        <role-name>editor</role-name>
	    </auth-constraint>
	</security-constraint>
	
	<security-constraint>
	    <web-resource-collection>
	        <web-resource-name>AdminPages</web-resource-name>
	        <description>Administration pages</description>        
	        <url-pattern>/admin/*</url-pattern>
	        <http-method>POST</http-method>
	        <http-method>GET</http-method>
	    </web-resource-collection>   
	    <auth-constraint>
	        <description>Administrators only</description>
	        <role-name>admin</role-name>
	    </auth-constraint>
	</security-constraint>
	
	<!-- Login and login error pages -->
	<login-config>
	    <!-- RESIN_AUTHENTICATOR -->
	    <auth-method>FORM</auth-method>
	    <form-login-config>
	        <form-login-page>/login.jsp</form-login-page>
	        <form-error-page>/loginerror.jsp</form-error-page>
	    </form-login-config>
	</login-config>
	
	<security-role>
	    <description>The Administrator Role</description>
	    <role-name>admin</role-name>
	</security-role>
	
	<security-role>
	    <description>The Editor Role</description>
	    <role-name>editor</role-name>
	</security-role>
</web-app>

O erro é o HTTP 404: The Requested URL /auth was not found
O erro é quando clico no botão de Login que redireciona para o servlet /auth.

Estou usando Apache 2.0 com Tomcat 4.1.

Tks !

:D

Leonardo

Tá certo... desculpe a falha...

O web.xml é o padrào do Roller:
<?xml version="1.0" encoding="UTF-8"?>
<!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>
	<display-name>Roller Weblogger</display-name>
	
	<!-- RESIN_LOGGER -->
	
	<!--  
	Secure Login (off by default)
	Roller's secure login feature turns on SSL for only the login
	page and no other parts of the application. If you wish to enable
	secure login, do the following:
	1) You must also configure your web or application server to 
	support SSL. See your server's documentation for more information.
	2) Set the secure_login context parameter to true and set the 
	http_port and https_port to match those used by your app server.
	3) Uncomment the security constraint named SecureLogin below.
	-->
	<context-param>
	    <param-name>secure_login</param-name>
	    <param-value>false</param-value>
	</context-param>
	<!--  Used only if secure_login is enabled -->
	<context-param>
	    <param-name>http_port</param-name>
	    <param-value>8080</param-value>
	</context-param>
	<!--  Used only if secure_login is enabled -->
	<context-param>
	    <param-name>https_port</param-name>
	    <param-value>8443</param-value>
	</context-param>
	<!-- 
	Comment authenticator to be used.
	-->
	<context-param>
	    <param-name>org.roller.commentAuthenticatorClass</param-name>
	    <!-- 
	    <param-value>org.roller.presentation.velocity.DefaultCommentAuthenticator</param-value>
	    -->
	    <param-value>org.roller.presentation.velocity.MathCommentAuthenticator</param-value>
	</context-param>
	
	<!-- 
	Experimental setting. Don't touch it.
	-->
	<context-param>
	    <param-name>org.roller.persistence</param-name>
	    <param-value>org.roller.business.hibernate.RollerImpl</param-value>
	</context-param>
	
	<!-- 
	Experimental setting. Don't touch it.
	-->
	<context-param>
	    <param-name>org.roller.authenticatorClass</param-name>
	    <param-value>org.roller.presentation.DefaultAuthenticator</param-value>
	</context-param>
	
	<!-- 
	Needed for Velocity. Don't touch it.
	-->
	<context-param>
	    <param-name>org.roller.presentation.velocity.toolbox</param-name>
	    <param-value>/WEB-INF/toolbox.xml</param-value>
	</context-param>
	
	<!--
	Weblog Entry Plugins
	Don't change the order of the plugins, but feel free to
	add and remove them.  ReadMore should always be the last
	Plugin. Changing the order could result in unpredictable results.
	-->
	<context-param>
	    <param-name>org.roller.pagePlugins</param-name>
	    <param-value>
	<!--
	        org.roller.presentation.velocity.plugins.jspwiki.WikiPlugin,
	        org.roller.presentation.velocity.plugins.radeox.WikiPlugin,
	-->
	        org.roller.presentation.velocity.plugins.textile.TextilePlugin,
	        org.roller.presentation.velocity.plugins.acronyms.AcronymsPlugin,
	        org.roller.presentation.velocity.plugins.bookmarks.BookmarkPlugin,
	        org.roller.presentation.velocity.plugins.email.ObfuscateEmailPlugin,
	        org.roller.presentation.velocity.plugins.smileys.SmileysPlugin,
	        org.roller.presentation.velocity.plugins.readmore.ReadMorePlugin
	    </param-value>
	</context-param>
	
	    <filter>
	        <filter-name>RssGzipFilter</filter-name>
	        <filter-class>org.roller.presentation.filters.CompressionFilter</filter-class>
	    </filter>
	
	   <filter>
	      <filter-name>RssCacheFilter</filter-name>
	      <filter-class>org.roller.presentation.pagecache.PageCacheFilter</filter-class>
	      <init-param>
	         <param-name>size</param-name>
	         <param-value>50</param-value>
	         <description><![CDATA[Number of pages to keep in cache]]></description>
	      </init-param>
	      <init-param>
	         <param-name>timeoutInterval</param-name>
	         <param-value>1800</param-value>
	         <description><![CDATA[Page Cache timeout interval in seconds (-1 to disable timeout)]]></description>
	      </init-param>
	      <init-param>
	         <param-name>timeoutRatio</param-name>
	         <param-value>1.0</param-value>
	         <description><![CDATA[Ratio of pages to be timed out on interval (1.0 means 100%)]]></description>
	      </init-param>
	   </filter>
	
	    <!-- begin xdoclet generated Filter declarations -->
	
	   <filter>
	      <filter-name>IfModifiedFilter</filter-name>
	      <filter-class>org.roller.presentation.filters.IfModifiedFilter</filter-class>
	   </filter>
	   <filter>
	      <filter-name>PageCacheFilter</filter-name>
	      <filter-class>org.roller.presentation.pagecache.PageCacheFilter</filter-class>
	      <init-param>
	         <param-name>size</param-name>
	         <param-value>100</param-value>
	         <description><![CDATA[Number of pages to keep in cache]]></description>
	      </init-param>
	      <init-param>
	         <param-name>timeout</param-name>
	         <param-value>1800</param-value>
	         <description><![CDATA[Page Cache timeout interval in seconds]]></description>
	      </init-param>
	   </filter>
	   <filter>
	      <filter-name>CloseSessionFilter</filter-name>
	      <filter-class>org.roller.presentation.filters.CloseSessionFilter</filter-class>
	   </filter>
	   <filter>
	      <filter-name>loginFilter</filter-name>
	      <display-name>Login Filter</display-name>
	      <filter-class>org.roller.presentation.filters.LoginFilter</filter-class>
	      <init-param>
	         <param-name>enabled</param-name>
	         <param-value>true</param-value>
	      </init-param>
	   </filter>
	   <filter>
	      <filter-name>RequestFilter</filter-name>
	      <filter-class>org.roller.presentation.filters.RequestFilter</filter-class>
	   </filter>
	   <filter>
	      <filter-name>PageGzipFilter</filter-name>
	      <filter-class>org.roller.presentation.filters.CompressionFilter</filter-class>
	   </filter>
	   <filter>
	      <filter-name>BreadCrumbFilter</filter-name>
	      <filter-class>org.roller.presentation.filters.BreadCrumbFilter</filter-class>
	      <init-param>
	         <param-name>maxStackSize</param-name>
	         <param-value>3</param-value>
	      </init-param>
	   </filter>
	   <filter>
	      <filter-name>RefererFilter</filter-name>
	      <filter-class>org.roller.presentation.filters.RefererFilter</filter-class>
	   </filter>
	
	<!-- *********************************************************
	    Filter mappings - order IS important here.  Since there is
	    no way to declare order in xdoclet, we must do it by hand.
	    ******************************************************* -->
	
	<!-- Map everything to the CloseSessionFilter -->
	<filter-mapping>
	    <filter-name>CloseSessionFilter</filter-name>
	    <url-pattern>/*</url-pattern>
	</filter-mapping>
	
	<!-- Use RequestFilter on all requests except for Newsfeed requests -->
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>/page/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>/comments/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>/preview/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>/flavor/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>/foaf/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>*.do</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RequestFilter</filter-name>
	    <url-pattern>/xmlrpc/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RefererFilter</filter-name>
	    <url-pattern>/page/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RefererFilter</filter-name>
	    <url-pattern>/comments/*</url-pattern>
	</filter-mapping>
	
	<!-- RememberMe Filter -->
	<filter-mapping>
	    <filter-name>loginFilter</filter-name>
	    <url-pattern>/login.jsp</url-pattern>
	    <!-- These are needed by Tomcat 5 since it does a forward to login.jsp -->
	    <!--dispatcher>REQUEST</dispatcher>
	    <dispatcher>FORWARD</dispatcher-->
	</filter-mapping>
	<filter-mapping>
	    <filter-name>loginFilter</filter-name>
	    <url-pattern>/logout-redirect.jsp</url-pattern>
	</filter-mapping>
	
	<!--
	Currently we only support If-Modified-Since using weblog last pub
	time, so the only place we should us it is on the RSS feed.
	-->
	<filter-mapping>
	    <filter-name>IfModifiedFilter</filter-name>
	    <url-pattern>/rss/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>BreadCrumbFilter</filter-name>
	    <url-pattern>*.do</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>PageGzipFilter</filter-name>
	    <url-pattern>/page/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>RssGzipFilter</filter-name>
	    <url-pattern>/rss/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
	    <filter-name>RssGzipFilter</filter-name>
	    <url-pattern>/flavor/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
	    <filter-name>RssGzipFilter</filter-name>
	    <url-pattern>/foaf/*</url-pattern>
	</filter-mapping>
	
	<!-- Cache filters should be last in line -->
	<filter-mapping>
	    <filter-name>RssCacheFilter</filter-name>
	    <url-pattern>/rss/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
	    <filter-name>RssCacheFilter</filter-name>
	    <url-pattern>/flavor/*</url-pattern>
	</filter-mapping>
	<filter-mapping>
	    <filter-name>RssCacheFilter</filter-name>
	    <url-pattern>/foaf/*</url-pattern>
	</filter-mapping>
	
	<filter-mapping>
	    <filter-name>PageCacheFilter</filter-name>
	    <url-pattern>/page/*</url-pattern>
	</filter-mapping>
	
	   <listener>
	      <listener-class>org.roller.presentation.RollerSession</listener-class>
	   </listener>
	   <listener>
	      <listener-class>org.roller.presentation.RollerContext</listener-class>
	   </listener>
	
	    <!--
	    To use non XDoclet listeners, create a listeners.xml file that
	    contains the additional listeners and place it in your
	    project's merge dir.
	    -->
	
	<!-- The Struts Servlet -->
	<servlet>
	
		<servlet-name>action</servlet-name>
		<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
	
		<init-param>
			<param-name>config</param-name>
			<param-value>/WEB-INF/struts-config.xml</param-value>
		</init-param>
	
		<init-param>
			<param-name>validate</param-name>
			<param-value>true</param-value>
		</init-param>
	
		<load-on-startup>2</load-on-startup>
	
	</servlet>
	
	   <servlet>
	      <servlet-name>RssServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.FlavorServlet</servlet-class>
	
	   </servlet>
	   <servlet>
	      <servlet-name>LanguageServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.LanguageServlet</servlet-class>
	
	      <init-param>
	         <param-name>org.roller.presentation.supported.languages</param-name>
	         <param-value>en,nl,zh_cn,zh_tw,vi</param-value>
	      </init-param>
	
	      <load-on-startup>10</load-on-startup>
	
	   </servlet>
	   <servlet>
	      <servlet-name>RollerXMLRPCServlet</servlet-name>
	     <servlet-class>org.roller.presentation.xmlrpc.RollerXMLRPCServlet</servlet-class>
	
	   </servlet>
	   <servlet>
	      <servlet-name>AtomServlet</servlet-name>
	     <servlet-class>org.roller.presentation.atom.RollerAtomServlet</servlet-class>
	
	   </servlet>
	   <servlet>
	      <servlet-name>TrackbackServlet</servlet-name>
	     <servlet-class>org.roller.presentation.weblog.TrackbackServlet</servlet-class>
	
	   </servlet>
	   <servlet>
	      <servlet-name>CommentServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.CommentServlet</servlet-class>
	
	      <init-param>
	         <param-name>org.apache.velocity.properties</param-name>
	         <param-value>/WEB-INF/velocity.properties</param-value>
	      </init-param>
	      <init-param>
	         <param-name>org.apache.velocity.properties</param-name>
	         <param-value>/WEB-INF/velocity.properties</param-value>
	      </init-param>
	
	      <load-on-startup>0</load-on-startup>
	
	   </servlet>
	   <servlet>
	      <servlet-name>SearchServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.SearchServlet</servlet-class>
	
	      <init-param>
	         <param-name>properties</param-name>
	         <param-value>/WEB-INF/velocity.properties</param-value>
	      </init-param>
	
	      <load-on-startup>5</load-on-startup>
	
	   </servlet>
	   <servlet>
	      <servlet-name>PageServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.PageServlet</servlet-class>
	
	      <init-param>
	         <param-name>org.apache.velocity.properties</param-name>
	         <param-value>/WEB-INF/velocity.properties</param-value>
	      </init-param>
	
	      <load-on-startup>0</load-on-startup>
	
	   </servlet>
	   <servlet>
	      <servlet-name>FoafServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.FoafServlet</servlet-class>
	
	   </servlet>
	   <servlet>
	      <servlet-name>PreviewServlet</servlet-name>
	     <servlet-class>org.roller.presentation.velocity.PreviewServlet</servlet-class>
	
	      <init-param>
	         <param-name>properties</param-name>
	         <param-value>/WEB-INF/velocity.properties</param-value>
	      </init-param>
	
	      <load-on-startup>1</load-on-startup>
	
	   </servlet>
	   <servlet>
	      <servlet-name>login</servlet-name>
	      <display-name>Login Servlet</display-name>
	     <servlet-class>org.roller.presentation.LoginServlet</servlet-class>
	
	      <init-param>
	         <param-name>authURL</param-name>
	         <param-value>/j_security_check</param-value>
	      </init-param>
	
	      <load-on-startup>3</load-on-startup>
	
	   </servlet>
	
	    <servlet-mapping>
	        <servlet-name>action</servlet-name>
	        <url-pattern>*.do</url-pattern>
	    </servlet-mapping>
	
	   <servlet-mapping>
	      <servlet-name>RssServlet</servlet-name>
	      <url-pattern>/rss/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>RssServlet</servlet-name>
	      <url-pattern>/flavor/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>LanguageServlet</servlet-name>
	      <url-pattern>/language/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>RollerXMLRPCServlet</servlet-name>
	      <url-pattern>/xmlrpc</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>AtomServlet</servlet-name>
	      <url-pattern>/atom/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>TrackbackServlet</servlet-name>
	      <url-pattern>/trackback/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>CommentServlet</servlet-name>
	      <url-pattern>/comments/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>CommentServlet</servlet-name>
	      <url-pattern>/page/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>SearchServlet</servlet-name>
	      <url-pattern>/search/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>PageServlet</servlet-name>
	      <url-pattern>/page/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>FoafServlet</servlet-name>
	      <url-pattern>/foaf/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>PreviewServlet</servlet-name>
	      <url-pattern>/preview/*</url-pattern>
	   </servlet-mapping>
	   <servlet-mapping>
	      <servlet-name>login</servlet-name>
	      <url-pattern>/auth/*</url-pattern>
	   </servlet-mapping>
	
	   <session-config>
	      <session-timeout>30</session-timeout>
	   </session-config>
	
	   <!--
	   To specify mime mappings, create a file named mime-mappings.xml, put it in your project's mergedir.
	   Organize mime-mappings.xml following this DTD slice:
	
	   <!ELEMENT mime-mapping (extension, mime-type)>
	   -->
	
	       <welcome-file-list>
	        <welcome-file>home.jsp</welcome-file>
	        <welcome-file>index.jsp</welcome-file>
	        <welcome-file>index.html</welcome-file>
	    </welcome-file-list>
	
	<!-- 
	<error-page>
	    <exception-type>java.lang.Exception</exception-type>
	    <location>/error.jsp</location>
	</error-page>
	This results in an access denied error 
	<error-page>
	    <error-code>400</error-code>
	    <location>/login-redirect.jsp</location>
	</error-page>
	-->
	
	  <!--
	  To add taglibs by xml, create a file called taglibs.xml and place it
	  in your merge dir.
	  -->
	
	<!-- TOMCAT RESOURCE REF -->
	    <resource-ref>
	            <res-ref-name>jdbc/rollerdb</res-ref-name>
	            <res-type>javax.sql.DataSource</res-type>
	            <res-auth>Container</res-auth>
	    </resource-ref>
	
	<!-- Uncomment this for email notification of comments
	    <resource-ref>
	        <res-ref-name>mail/Session</res-ref-name>
	        <res-type>javax.mail.Session</res-type>
	        <res-auth>Container</res-auth>
	    </resource-ref>
	-->
	
	<!-- Uncomment this security constrain if secure_login is enabled -->
	<security-constraint>
	    <web-resource-collection>
	        <web-resource-name>SecureLogin</web-resource-name>
	        <description>Protects login pages with SSL</description> 
	        <url-pattern>/j_security_check</url-pattern>        
	        <url-pattern>/loginerror.jsp</url-pattern>
	        <url-pattern>/login-redirect.jsp</url-pattern>
	        <url-pattern>/login.jsp</url-pattern>         
	        <http-method>POST</http-method>
	        <http-method>GET</http-method>
	    </web-resource-collection>  
	    <user-data-constraint>
	        <description></description>
	        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
	    </user-data-constraint> 
	</security-constraint>
	
	<security-constraint>
	    <web-resource-collection>
	        <web-resource-name>EditorPages</web-resource-name>
	        <description>Editor pages</description>        
	        <url-pattern>/editor/*</url-pattern>
	        <url-pattern>/login-redirect.jsp</url-pattern>
	        <http-method>POST</http-method>
	        <http-method>GET</http-method>
	    </web-resource-collection>   
	    <auth-constraint>
	        <description>Editors and Adminstrators only</description>
	        <role-name>admin</role-name>
	        <role-name>editor</role-name>
	    </auth-constraint>
	</security-constraint>
	
	<security-constraint>
	    <web-resource-collection>
	        <web-resource-name>AdminPages</web-resource-name>
	        <description>Administration pages</description>        
	        <url-pattern>/admin/*</url-pattern>
	        <http-method>POST</http-method>
	        <http-method>GET</http-method>
	    </web-resource-collection>   
	    <auth-constraint>
	        <description>Administrators only</description>
	        <role-name>admin</role-name>
	    </auth-constraint>
	</security-constraint>
	
	<!-- Login and login error pages -->
	<login-config>
	    <!-- RESIN_AUTHENTICATOR -->
	    <auth-method>FORM</auth-method>
	    <form-login-config>
	        <form-login-page>/login.jsp</form-login-page>
	        <form-error-page>/loginerror.jsp</form-error-page>
	    </form-login-config>
	</login-config>
	
	<security-role>
	    <description>The Administrator Role</description>
	    <role-name>admin</role-name>
	</security-role>
	
	<security-role>
	    <description>The Editor Role</description>
	    <role-name>editor</role-name>
	</security-role>
</web-app>

O erro é o HTTP 404: The Requested URL /auth was not found
O erro é quando clico no botão de Login que redireciona para o servlet /auth.

Estou usando Apache 2.0 com Tomcat 4.1.

Tks !

:D

Criado 14 de novembro de 2004
Ultima resposta 16 de nov. de 2004
Respostas 4
Participantes 3