Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Mapping for a normal servlet? Mandatory in struts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Mapping for a normal servlet? Mandatory in struts?" Watch "Mapping for a normal servlet? Mandatory in struts?" New topic
Author

Mapping for a normal servlet? Mandatory in struts?

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
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?


SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mapping for a normal servlet? Mandatory in struts?