Show TOC

ServletsLocate this document in the navigation structure

Context

The Portal Runtime enables you to run servlets and package them as portal components.

Procedure


  1. Create a servlet, that is, a java class that extends HttpServlet .

  2. In the deployment descriptor of your portal application, define a configuration property named ComponentType and assign it a value of servlet , as shown below:

    <components>
     <component name="ServletTest">
      <component-config>
       <property name="ClassName" 
           value="com.sapportals.portal.prt.component.ServletTest"/>
       <property name="ComponentType" value="servlet"/>
      </component-config>
    </component>
                         
  3. Put the compiled servlet class in the private lib or classes folder.