servlet-mapping for Wordpress on Tomcat using Quercus
Posted
by
Jeremy
on Stack Overflow
See other posts from Stack Overflow
or by Jeremy
Published on 2011-01-13T02:48:00Z
Indexed on
2011/01/13
2:54 UTC
Read the original article
Hit count: 444
I have a web app running in Tomcat and I'm trying to add a Wordpress blog to it using Quercus. It works if I hit a .php file in my blog, but links to my articles are structured like http://myapp.com/blog/2011/01/my-first-post/ which don't work. Below is my web.xml:
<welcome-file-list>
<welcome-file>index.do</welcome-file>
<welcome-file>index.php</welcome-file>
</welcome-file-list>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/myapp-service.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<servlet>
<servlet-name>myapp</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>myapp</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>Quercus Servlet</servlet-name>
<servlet-class>com.caucho.quercus.servlet.QuercusServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Quercus Servlet</servlet-name>
<url-pattern>*.php</url-pattern>
</servlet-mapping>
I've tried many combos of url-pattern such as /blog, /blog/*, etc. I can't get anything to work. Any help is appreciated. Thanks!
© Stack Overflow or respective owner