OpenEdit Developer ForumWelcome to the OpenEdit User Forum. You must be registered and logged in to post a new comment or topic. This forum is only for developers who want to discuss the technical aspects of the OpenEdit Framework. For end user technical support please visit the EnterMedia web site. Adding Servlet to WEB-INF/classesI have added my Servlet to web.xml and placed it in WEB-INF/classes. When I attempt to access the servlet at the context I configured I recieve a 404 error. The xml config is fine, I copied it from my working test context. What am I doing wrong ? Posted by Wally Tue, Jan 6 2009 4:32 AM
|
Most Recent Posts
Looking for new OpenEdit Friendly ISP
(1 comments)
Configuration Files
(1 comments)
bids
(0 comments)
Framework topics
(0 comments)
can't see image as thumbnail
(0 comments)
Display multiple catalogs on homepage
(0 comments)
I can't edit users anymore...
(1 comments)
Recurring Errors in Log File...
(7 comments)
One Layout, Many Pages, Many TITLEs
(2 comments)
Java Server Faces web application
(0 comments) Archive
Log in
Syndicate:
|
Copyright 2008 OpenEdit Inc. All rights reserved. last modified: Jan 06 2009

Here is my web.xml
<?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>
<display-name>Open Edit</display-name>
<servlet>
<servlet-name>ReferrerLink</servlet-name>
<servlet-class>ReferrerLink</servlet-class>
<init-param>
<param-name>dbuser</param-name>
<param-value>XXXXX</param-value>
</init-param>
<init-param>
<param-name>dbpass</param-name>
<param-value>XXXXXX</param-value>
</init-param>
<init-param>
<param-name>dbname</param-name>
<param-value>XXXXXX</param-value>
</init-param>
<init-param>
<param-name>refnum</param-name>
<param-value>5</param-value>
</init-param>
<init-param>
<param-name>incoming-context</param-name>
<param-value>/in</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>ReferrerLink</servlet-name>
<url-pattern>/rlink</url-pattern>
</servlet-mapping>
<filter>
<filter-name>gzip</filter-name>
<filter-class>com.openedit.servlet.gzip.GzipFilter</filter-class>
</filter>
<filter>
<filter-name>OEFilter</filter-name>
<filter-class>com.openedit.servlet.OpenEditFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>gzip</filter-name>
<url-pattern>*.html</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>gzip</filter-name>
<url-pattern>*.js</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>OEFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
If you want to combine the output of your servlet with OpenEdit layouts then see this page: http://www.openedit.org/oemanual/pages/programming/Generators.html
Thank you for your helpful response. My Servlet is working fine from within jsp tags now. However, when I try to access a Servlet directly the content type has been changed to application/octet-stream. I have already called HttpServletResponse.setContentType("text/html; charset=UTF-8"); from within my servlet. Is this also a configuration issue?
Since your servlet does not have an extension you will want to add a property the xconf in that folder.
<property name="mimetype">text/html</property>