Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

help!!

Status
Not open for further replies.

ResDev

Programmer
Mar 11, 2004
3
JP
hi!

This is my first post.

I am trying to run a business logic using struts-config.xml from the jsp written below. But, I am facing the following problem(JspException).This Exception appears when I try to view the jsp file.

I checked my struts-config.xml and JSP file. To me it seems ok. But I don't know why this exception appears.

<**>If I dont use html tag in JSP file, it works and I can view jsp.

Any kind of suggestion will be appreciated.

Thanks in advance.
ResDev


<------------------------------>
Exception
<------------------------------>
javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection
at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:798)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506)
at jsp_servlet._jsp.__scheduleradminmenu._jspService(__scheduleradminmenu.java:148)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)


<------------------------------->
struts-config.xml
<------------------------------->

<struts-config>
<form-beans>
<!-- ========== Form Bean Definitions =================================== -->
<!--Scheduler Control Window-->
<form-bean
name="ShowScheduledJobForm"
type="org.apache.struts.action.DynaActionForm">

<form-property name="AFBusinessLogicPath" type="java.lang.String" />
</form-bean>
</form-beans>

<!-- ========== Action Mapping Definitions ============================== -->
<action-mappings>
<!--Transition to Scheduled Job List Window-->
<action name="ShowScheduledJobForm"
path="/showscheduledjobs"
type="XXXXX.adapter.AFStrutsProtocolAdapter"
scope="request" >
<forward name="success" path="/jsp/ScheduledJobList.jsp"/>
</action>
</action-mappings>
</struts-config>

<----------------------------------->
JSP file
<----------------------------------->
<%@ page contentType="text/html;charset=Shift_JIS" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>

<html>
<head>
<title>XXXXXXX</title>
</head>

<body>
<table width="100%" border="1">
<tr width="100%">
<td align="center" style="font-size:24pt">Schedule Management</td>
</tr>
</table>

<table width="100%" border="0">
<tr height="60">
<td align="center" valign="bottom" style="font-size:16pt">

<html:form action="/showscheduledjobs">
<html:hidden property="AFBusinessLogicPath" value="/aaaaa/showscheduledjobsbl" />
<html:submit value="Register job" />
</html:form>

</td>
</tr>
<----------------------------------->
 
Is your form even working? You have :

<html:form action="/showscheduledjobs">

but then you form-bean is

<form-bean
name="ShowScheduledJobForm"
type="org.apache.struts.action.DynaActionForm">


I think those need to match up.

 
Hi,

I copied your code and executed it without any problem. I think you are missing some thing in your Action class. Try to put as many debug statements as you can. If not paste ActionClass code that will hlep us to debug.

I hope you have all the required .jar files in your classpath.

Siberian,

<html:form action="/showscheduledjobs">

<action name="ShowScheduledJobForm"
path="/showscheduledjobs"
type="XXXXX.adapter.AFStrutsProtocolAdapter"
scope="request" >
<forward name="success" path="/jsp/ScheduledJobList.jsp"/>
</action>


Both the red color lines should match and the URI would be

Cheers,
Venu
 
hi!!

Thank you for your valuable reply.

I checked my Action Class and .jar files. There is no problem with these things.

I changed my web.xml file, just added
<load-on-startup>0</load-on-startup>,
and it worked. Anyway I have solved this problem.

Thank you again.

ResDev
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top