directory « Struts « JSP-Servlet Q&A

1. Problem with moving JSPs under WEB-INF directory

I am facing a problem when I move my JSP files along with CSS and JS files under WEB-INF/web/ directory. The problem is that, when a JSP page loads, it does ...

2. Invalid JS/CSS resource paths when opening a JSP page through a Struts action class

This is the Struts Action class:

public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
    ActionForward forward = null;

    try {

3. How can I upload photos in struts 2 into my public_html directory instead of my tomcat's directory?

When uploading 1-6969875-2644-t.jpg, the image is uploaded to /home/xrcwrn/jvm/apache-tomcat-6.0.14/domains/ properly. But I actually want to upload this image into the /home/xrcwrn/public_html/img folder. I am using this code in Struts 2:

public String execute() {


4. Show jsps from different directories based on "theme"

> So, I want to ship 2 versions (or more) of my views. > > The will be in > /pages/jsps/theme1/x.jsp > and > /pages/jsps/theme2/x.jsp > > I want the user to be allowed to set the theme, and my result tag in the xml > be something like: > > /pages/jsps/{selected_theme}/x.jsp > > Can I do that?

5. subfolder in JSP directory

Hi everybody, I have a web application using Struts and Struts-Layout. I have a lot of JSP in the root JSP directory : public_html/jsp , so I want to order them by fonctionnality each in his own folder. So actually I have : public_html / jsp / jsp_file.jsp and I want : public_html / jsp / a_folder / jsp_file.jsp But I'm ...