Let us see how to configure the struts-config.xml file to map the request to some destination servlet or jsp file.
The class org.apache.struts.action.ActionServlet is at the heart of the Struts Framework. It is the Controller part of the Struts Framework. ActionServlet is configured as Servlet in the web.xml file as shown in the following code.
<!-- Standard Action Servlet Configuration (with debugging) --> Java Code: <servlet>
In this post, I will present an example which will show how to move the selected file (drop down menu) form a servlet to another servlet which performs operations on the file.
I have created 3 Javafiles namely:
- GetImg (Servlet)
- ImgCompare (simpleJava class)
HelloServlet contains a HTML form that has a dropdown menu. Menu contains 2 JPG files. You should have following images at the given path: