Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mapping for a normal servlet? Mandatory in struts?

 
Timothy Sam
Ranch Hand
Posts: 751
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it mandatory that I place another servlet mapping in web.xml if I wanted to make a Servlet(a normal servlet) that doesn't extend Struts Action class? Or does the mapping



<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>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>


does it all?
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to run another servlet in your Struts application, you will have to provide another entry for both the servlet and it's path in your web.xml file. The path for your other servlet is going to have to be something other than *.do.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic