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
encodings ...
(4 comments)
Slamdance
(7 comments)
Help upgrading jars on starter war
(6 comments)
Help, Velocity Generator not initializing
(4 comments)
Multiple Main Sites
(10 comments)
Search filtering by theme
(3 comments)
xml version "s1.0" error
(4 comments)
How can i localization the openedit?
(3 comments)
Problem with the interface
(4 comments)
latest openedit-editor build
(2 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>
For just a year, the Five Finger Shoes has become one of the most popular models for men. Featuring a thin, abrasion-resistant stretch nylon and breathable mesh upper that wraps your entire forefoot to "Keep Stuff Out." A single hook-and-loop closure helps secure the fit. A non-marking 3.5mm Vibram TC1 performance rubber sole is razor-siped for a sure grip, and a 2mm EVA midsole enhances plating protection and comfort.Best Five Finger Shoes sale here!