Search code examples
javajsphttp-redirectstrutsintellij-14

HTTP Status 500 - Unable to compile class for JSP, redirect to an action


I just tried to redirect my jsp to my action named 'visual', mapped in struts.xml but every time i start the project and go into the jsp, tomcat show me this error and i don't know why.

How i can redirect the user when goes on home.jsp?

This is my error : error for home.jsp

Home.jsp

%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%= response.sendRedirect("visual") %>

Struts.xml

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC
        "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
        "http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>
        <constant name="struts.ui.theme" value="simple" />
        <constant name="struts.enable.SlashesInActionNames" value="true"/>

        <package name="rubrica" namespace="/" extends="struts-default">



                <action name="visual" class="com.my.action.ActionGeneric" method="defaultmethod">
                        <result name="success" type="redirect">read.action</result>
                        <result name="error">/indexError.jsp</result>
                        <result name="input">/indexInput.jsp</result>
                </action>

                <action name="read" class="com.my.action.ActionGeneric" method="read">
                        <result name="success">/index.jsp</result>
                </action>

                <action name="visualInsert" class="com.my.action.ActionGeneric" method="defaultmethod">
                        <result name="success">/insert.jsp</result>
                </action>

                <action name="insert" class="it.zerob.action.ActionGeneric" method="insert">
                        <result name="success">/insert.jsp</result>
                </action>

                <action name="visualUpdate" class="com.my.action.ActionGeneric" method="defaultmethod">
                        <result name="success">/insert.jsp</result>
                </action>

                <action name="update" class="com.my.action.ActionGeneric" method="update">
                        <result name="success">/insert.jsp</result>
                </action>

                <action name="delete" class="com.my.action.ActionGeneric" method="insert">
                        <result name="success">/index.jsp</result>
                        <result name="error">indexError.jsp</result>
                        <result name="input">indexInput.jsp</result>
                </action>

        </package>
</struts>

Solution

  • Children of Mana is a 2006 action role-playing game for the Nintendo DS handheld console. It was developed by Square Enix and Nex Entertainment, and published by Square Enix and Nintendo. It is the sixth game of the Mana series and the first entry in the World of Mana subseries. Set in a high fantasy universe, Children of Mana follows one of four young heroes as they combat an invasion of monsters and learn about the cataclysmic event that killed their families. Both the main plot and side-quests require

    <%@ page contentType="text/html;charset=UTF-8" language="java" %>
    <%
        response.sendRedirect("visual");
    %>