Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to access ActionClass

 
Supraja Yasoda
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This is my JSP.

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

<HTML>
<HEAD>
<TITLE> Struts Application </TITLE>
</HEAD>
<BODY>
<html:form action="Lookup" >
<table width="81%" border="0" cellspacing="2" cellpadding="1">
<tr>
<td width="33%" align="left"><a href="CS-PartB.html" >Prev </a></td>
<td align="center" width="33%">
<a href="CS-PartC.html"><b>Save</b></a>
</td>
<td align="right" width="33%">

<a> </a>
</td>
</tr>
</table>
<br>
<%
System.out.println("Hi at Login.jsp");
%>
<table width="68%" border="1" cellspacing="2" cellpadding="1">
<tr>
<td>
<div align="left"><font face="Arial, Helvetica, sans-serif" size="3"><b>Part
C Focus Summary</b></font></div>
</td>
</tr>
<tr>
<td><font face="Arial, Helvetica, sans-serif" size="2">1. List the things
you would like us to improve on to make our products/Services betterfor
you. Rank them by priorities.</font></td>
</tr>
<table width="45%" border="0">
<tr>
<td><html:text property="comments" /></td><br>
<td align="center"><html:submit /></td>
</tr>
</html:form>
</BODY>
</HTML>

STRUTS-Config.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 2004 The Apache Software Foundation

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd" >
<struts-config>
<!-- Form Bean Definitions -->
<form-beans>
<form-bean name="customersurveyform" type="com.st.csm.it.custsurvey.dao.CustomerSurveyForm"/>
</form-beans>
<form-beans>
<form-bean name="lookupactionbean" type="com.st.csm.it.custsurvey.dao.LookupActionBean"/>
</form-beans>
<!-- Action Mapping Definitions -->
<action-mappings>
<action path="/Lookup"
type="com.st.csm.it.custsurvey.dao.LookupActionBean"
name="customersurveyform"
input="/login.jsp">
<forward name="success" path="/mytest.jsp"/>
<forward name="failure" path="/index.jsp"/>
</action>
</action-mappings>
<!-- message resources -->
<message-resources parameter="com.st.csm.it.custsurvey.ApplicationResources" />
</struts-config>


Still I am unable to access ActionClass. Can any one suggest me.?
Thanks in advance
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<action path="/Lookup"
type="com.st.csm.it.custsurvey.dao.LookupActionBean"
name="customersurveyform"
input="/login.jsp">

You should put an Action class here as the type. LookupActionBean cannot be an Action because an Action cannot be a bean.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic