Cannot find ActionMappings or ActionFormBeans collection
Hello, I am new to Struts, my first application is giving me this error. I am using Tomcat 4.0 and struts 1.2.4. Where did I go wrong? Please help me. javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection Here are my files -Template.jsp %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html body html:form action=/Article table border=0 width=100% tr td width=18%font size=2 face=VerdanaKeywords/font/td td width=32%input type=text name=keywords size=60 /td /tr /table html:submitSubmit/html:submit /html:form web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- Struts Tag Library Descriptors -- taglib taglib-uri/WEB-INF/struts-bean/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-nested/taglib-uri taglib-location/WEB-INF/struts-nested.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-tiles/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib /web-app struts-config.xml form-beans form-bean name=articleForm type=articles.ArticleForm/ /form-beans action-mappings action path=/Article type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings --ArticleForm.java package articles; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionErrors; public class ArticleForm extends ActionForm { private String keywords = null; public String getKeywords(){ return keywords; } public void setKeywords(String keywords){ this.keywords = keywords; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if( getKeywords() == null || getKeywords().length() 1 ) { errors.add(keywords,new ActionMessage(error.keywords.required)); } return errors; } } --ArticleAction.java package articles; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; //import articles.ArticleForm; public class ArticleAction extends Action { private String keywords = null; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { String target = new String(success); if(form != null) { // Use the ArticleForm to get the request parameters ArticleForm articleForm = (ArticleForm)form; keywords = articleForm.getTitle(); } // if no title is supplied, set the target to failure if ( keywords == null ) { target = new String(failure); } else { request.setAttribute(keywords, keywords); } return (mapping.findForward(target)); } } Thank you, Uma
Re: [OT - Friday]Corporate Stupidity
On Friday 10 December 2004 16:57, Jim Barrows wrote: Just found out that the 800lb brass monkeys have decided that it's a good idea to do full background and checks on all their employees. Which has got to be the dumbest thing ever been done to me as a contractor or employee... so what's the stupidest thing a company has ever done to YOU? That was it. Complete with fingerprint checks because they claimed they couldn't tell from knowing my date and place of birth whether I actually had a criminal record. Never mind that the _police_ told me they knew I didn't. -- derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Opinions on Struts Layout
On Friday 10 December 2004 16:38, David G. Friedman wrote: Derek, If you made a list of bullet points for the parts of struts layout you like most, perhaps we listmembers could point you in the direction of native Struts parts or equivalent add-ons. I don't really see how there could be native Struts parts, since it's just an extension of Struts, but what I've been using is: layout:row, layout:column - really simplify layout of row-oriented but non-tabular data input tags - I haven't a clue how it's done, but if they fail validation, the corresponding message is displayed with the input field rather than just using html:errors. layout:treeview for collapsing menus I haven't yet used layout:datagrid but it looks quite handy for tabular data. For tabbed panels, I found struts-menu more useful. -- derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cross web app communication
You cannot forward to another web application. You can, however, redirect. You set the redirect attribute of the forward tag to true. robert -Original Message- From: avinash_shirol [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 4:17 AM To: [EMAIL PROTECTED] Subject: Cross web app communication Hi, I have following questions 1. I have two web applications deployed on different m/c. When I login to one web application, I would like to view a page provided by the other application. Basically, redirecting a user to a different web application. Is this possible? If so, how? 2. I tried to provide a http url(google url) with absolute path in the forward tag of struts-config.xml. I kept getting error message Request Dispatcher not found for http://www.google.com; in spite of mentioning relativeLocation=false. Can't we give absolute pathnames in the path field in struts config? -Avinash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT - Friday]Corporate Stupidity
In my country, it's against the law to take your fingerprints unless you are accused of a crime and only the police can do it. It's a great disrespect to treat an employee as a criminal. You shouldn't have to prove yourself innocent, rather THEY should have to prove you guilty. On Sat, 11 Dec 2004 11:38:39 -0400, Derek Broughton [EMAIL PROTECTED] wrote: On Friday 10 December 2004 16:57, Jim Barrows wrote: Just found out that the 800lb brass monkeys have decided that it's a good idea to do full background and checks on all their employees. Which has got to be the dumbest thing ever been done to me as a contractor or employee... so what's the stupidest thing a company has ever done to YOU? That was it. Complete with fingerprint checks because they claimed they couldn't tell from knowing my date and place of birth whether I actually had a criminal record. Never mind that the _police_ told me they knew I didn't. -- derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT - Friday]Corporate Stupidity
I work for the state oil company in Brazil, which has the monopoly of all oil exploration and production. It´s the largest company in Brazil and one of the largest in Latin America. They check everybody upon hiring, but taking fingerprints is unthinkable. But in the US, where paranoia seems to be the rule, I can understand companies taking such measures. On Sun, 12 Dec 2004 10:40:55 -0500, Frank W. Zammetti [EMAIL PROTECTED] wrote: This might seem like an obvious comment, but this depends on what type of job it is. I work for one of the largest financial companies in the U.S. in the mutual fund sector. There are real, legitimate concerns with so much money involved. To me, asking for my fingerprints wasn't an outrageous request. I think I could have argued it was superfluous, but not unreasonable. I'm not saying every company is in this boat, indeed most probably are not. In most cases it probably is ridiculous to ask for such things. In some cases though, like my company, a full background check doesn't seem crazy to me. -- Frank W. Zammetti Founder and Chief Software Architect Omnytex Technologies http://www.omnytex.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT - Friday]Corporate Stupidity
What country are you from, Luiz? Jack On Sun, 12 Dec 2004 11:56:32 -0300, Luiz Esmiralha [EMAIL PROTECTED] wrote: In my country, it's against the law to take your fingerprints unless you are accused of a crime and only the police can do it. It's a great disrespect to treat an employee as a criminal. You shouldn't have to prove yourself innocent, rather THEY should have to prove you guilty. On Sat, 11 Dec 2004 11:38:39 -0400, Derek Broughton [EMAIL PROTECTED] wrote: On Friday 10 December 2004 16:57, Jim Barrows wrote: Just found out that the 800lb brass monkeys have decided that it's a good idea to do full background and checks on all their employees. Which has got to be the dumbest thing ever been done to me as a contractor or employee... so what's the stupidest thing a company has ever done to YOU? That was it. Complete with fingerprint checks because they claimed they couldn't tell from knowing my date and place of birth whether I actually had a criminal record. Never mind that the _police_ told me they knew I didn't. -- derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- You can't wake a person who is pretending to be asleep. ~Native Proverb~ Each man is good in His sight. It is not necessary for eagles to be crows. ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT - Friday]Corporate Stupidity
Oops, Brazil. Thanks. I am amazed at how the United States is fastly becoming a country far behind others in terms of freedoms from government intervention into personal lives. Jack On Sun, 12 Dec 2004 10:49:07 -0800, Dakota Jack [EMAIL PROTECTED] wrote: What country are you from, Luiz? Jack On Sun, 12 Dec 2004 11:56:32 -0300, Luiz Esmiralha [EMAIL PROTECTED] wrote: In my country, it's against the law to take your fingerprints unless you are accused of a crime and only the police can do it. It's a great disrespect to treat an employee as a criminal. You shouldn't have to prove yourself innocent, rather THEY should have to prove you guilty. On Sat, 11 Dec 2004 11:38:39 -0400, Derek Broughton [EMAIL PROTECTED] wrote: On Friday 10 December 2004 16:57, Jim Barrows wrote: Just found out that the 800lb brass monkeys have decided that it's a good idea to do full background and checks on all their employees. Which has got to be the dumbest thing ever been done to me as a contractor or employee... so what's the stupidest thing a company has ever done to YOU? That was it. Complete with fingerprint checks because they claimed they couldn't tell from knowing my date and place of birth whether I actually had a criminal record. Never mind that the _police_ told me they knew I didn't. -- derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- You can't wake a person who is pretending to be asleep. ~Native Proverb~ Each man is good in His sight. It is not necessary for eagles to be crows. ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ -- You can't wake a person who is pretending to be asleep. ~Native Proverb~ Each man is good in His sight. It is not necessary for eagles to be crows. ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cross web app communication
Out of interest, Robert, would you mind expanding on this if you have more detailed observations that you could offer? Thanks. Jack On Sun, 12 Dec 2004 09:45:13 -0500, Robert Taylor [EMAIL PROTECTED] wrote: You cannot forward to another web application. You can, however, redirect. You set the redirect attribute of the forward tag to true. robert -Original Message- From: avinash_shirol [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 4:17 AM To: [EMAIL PROTECTED] Subject: Cross web app communication Hi, I have following questions 1. I have two web applications deployed on different m/c. When I login to one web application, I would like to view a page provided by the other application. Basically, redirecting a user to a different web application. Is this possible? If so, how? 2. I tried to provide a http url(google url) with absolute path in the forward tag of struts-config.xml. I kept getting error message Request Dispatcher not found for http://www.google.com; in spite of mentioning relativeLocation=false. Can't we give absolute pathnames in the path field in struts config? -Avinash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- You can't wake a person who is pretending to be asleep. ~Native Proverb~ Each man is good in His sight. It is not necessary for eagles to be crows. ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[ANNOUNCE] Struts 1.2.6 Beta Released
The Struts team is pleased to announce the release of Struts 1.2.6 Beta. This release includes minor new functionality, and a number of fixes for bugs which were reported against previous versions. The binary, source and library distributions are available from the Struts download page: http://struts.apache.org/download.cgi The Release Notes are available on the Struts web site at: http://struts.apache.org/userGuide/release-notes.html -- Martin Cooper - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cross web app communication
Not really an observation, but more of how the Servlet specification constrains the use of forwarding to another resource. Forwarding is accomplished by using the RequestDispatcher.forward(). You can access a RequestDispatcher by calling Request.getRequestDispatcher() passing it the path name of a resource which is relative to the current servlet context. A redirect sends a status code back to the browser along with the url to which you wish to be redirected. The url may be relative to the same web app or a fully qualified url to a different resource. When you set the redirect attribute of the forward tag to true, then Struts will use Response.sendRedirect() to redirect the request to the specified resource which could be the same web app or a different web app. /robert -Original Message- From: Dakota Jack [mailto:[EMAIL PROTECTED] Sent: Sunday, December 12, 2004 2:02 PM To: Struts Users Mailing List Subject: Re: Cross web app communication Out of interest, Robert, would you mind expanding on this if you have more detailed observations that you could offer? Thanks. Jack On Sun, 12 Dec 2004 09:45:13 -0500, Robert Taylor [EMAIL PROTECTED] wrote: You cannot forward to another web application. You can, however, redirect. You set the redirect attribute of the forward tag to true. robert -Original Message- From: avinash_shirol [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 07, 2004 4:17 AM To: [EMAIL PROTECTED] Subject: Cross web app communication Hi, I have following questions 1. I have two web applications deployed on different m/c. When I login to one web application, I would like to view a page provided by the other application. Basically, redirecting a user to a different web application. Is this possible? If so, how? 2. I tried to provide a http url(google url) with absolute path in the forward tag of struts-config.xml. I kept getting error message Request Dispatcher not found for http://www.google.com; in spite of mentioning relativeLocation=false. Can't we give absolute pathnames in the path field in struts config? -Avinash - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- You can't wake a person who is pretending to be asleep. ~Native Proverb~ Each man is good in His sight. It is not necessary for eagles to be crows. ~Hunkesni (Sitting Bull), Hunkpapa Sioux~ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
deploy war file of struts?
I copied the struts application war file under tomcat's server- webapp directory. I restarted the server but it didn't get deployed automatically. I am using tomcat4.1. What's wrong? Build is ok - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: html:errors and manual iterate
You might need to pass one more argument namely message to the html:messages tag . If you've saved a message in struts scode with your OWN key, you should pass message='true' if this message has been saved into struts scope using ExceptionHandler.saveException() method, you can pass message = 'false' regards, Sunny. Erik Weber wrote: For reference, it looks like this: %-- Display error message keyed under 'usernameError' if it exists --% html:messages id=error property=usernameError tr td/td td${error}/td /tr /html:messages Thanks again all! - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot find ActionMappings or ActionFormBeans collection
hi, Ensure that your are having your struts-config like the one below. And also please check your class path regards, Sunny ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd; struts-config form-beans form-bean name=articleForm type=articles.ArticleForm/ /form-beans action-mappings action path=/Article type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings /struts-config uma.k wrote: Hello, I am new to Struts, my first application is giving me this error. I am using Tomcat 4.0 and struts 1.2.4. Where did I go wrong? Please help me. javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection Here are my files -Template.jsp %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html body html:form action=/Article table border=0 width=100% tr td width=18%font size=2 face=VerdanaKeywords/font/td td width=32%input type=text name=keywords size=60 /td /tr /table html:submitSubmit/html:submit /html:form web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- Struts Tag Library Descriptors -- taglib taglib-uri/WEB-INF/struts-bean/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-nested/taglib-uri taglib-location/WEB-INF/struts-nested.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-tiles/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib /web-app struts-config.xml form-beans form-bean name=articleForm type=articles.ArticleForm/ /form-beans action-mappings action path=/Article type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings --ArticleForm.java package articles; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionErrors; public class ArticleForm extends ActionForm { private String keywords = null; public String getKeywords(){ return keywords; } public void setKeywords(String keywords){ this.keywords = keywords; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if( getKeywords() == null || getKeywords().length() 1 ) { errors.add(keywords,new ActionMessage(error.keywords.required)); } return errors; } } --ArticleAction.java package articles; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; //import articles.ArticleForm; public class ArticleAction extends Action { private String keywords = null; public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { String target = new String(success); if(form != null) { // Use the
RE: Cannot find ActionMappings or ActionFormBeans collection
Hi Sunny, Thanks for the reply. The classpath is set right and my struts-config.xml file looks the same way as you posted, I just removed the un necessary tags. Any ideas now? Uma -Original Message- From: Sunny [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 10:04 AM To: Struts Users Mailing List Subject: Re: Cannot find ActionMappings or ActionFormBeans collection hi, Ensure that your are having your struts-config like the one below. And also please check your class path regards, Sunny ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd; struts-config form-beans form-bean name=articleForm type=articles.ArticleForm/ /form-beans action-mappings action path=/Article type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings /struts-config uma.k wrote: Hello, I am new to Struts, my first application is giving me this error. I am using Tomcat 4.0 and struts 1.2.4. Where did I go wrong? Please help me. javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection Here are my files -Template.jsp %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html body html:form action=/Article table border=0 width=100% tr td width=18%font size=2 face=VerdanaKeywords/font/td td width=32%input type=text name=keywords size=60 /td /tr /table html:submitSubmit/html:submit /html:form web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- Struts Tag Library Descriptors -- taglib taglib-uri/WEB-INF/struts-bean/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-nested/taglib-uri taglib-location/WEB-INF/struts-nested.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-tiles/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib /web-app struts-config.xml form-beans form-bean name=articleForm type=articles.ArticleForm/ /form-beans action-mappings action path=/Article type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings --ArticleForm.java package articles; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionErrors; public class ArticleForm extends ActionForm { private String keywords = null; public String getKeywords(){ return keywords; } public void setKeywords(String keywords){ this.keywords = keywords; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if( getKeywords() == null || getKeywords().length() 1 ) { errors.add(keywords,new ActionMessage(error.keywords.required)); } return errors; } } --ArticleAction.java package articles; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import
RE: Cannot find ActionMappings or ActionFormBeans collection
Is that error at start-up or when you are invoking an action by going to a Struts *.do action through a URL? Regards, David -Original Message- From: uma.k [mailto:[EMAIL PROTECTED] Sent: Sunday, December 12, 2004 11:54 PM To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Subject: RE: Cannot find ActionMappings or ActionFormBeans collection Hi Sunny, Thanks for the reply. The classpath is set right and my struts-config.xml file looks the same way as you posted, I just removed the un necessary tags. Any ideas now? Uma -Original Message- From: Sunny [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 10:04 AM To: Struts Users Mailing List Subject: Re: Cannot find ActionMappings or ActionFormBeans collection hi, Ensure that your are having your struts-config like the one below. And also please check your class path regards, Sunny ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd; struts-config form-beans form-bean name=articleForm type=articles.ArticleForm/ /form-beans action-mappings action path=/Article type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings /struts-config uma.k wrote: Hello, I am new to Struts, my first application is giving me this error. I am using Tomcat 4.0 and struts 1.2.4. Where did I go wrong? Please help me. javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection Here are my files -Template.jsp %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html body html:form action=/Article table border=0 width=100% tr td width=18%font size=2 face=VerdanaKeywords/font/td td width=32%input type=text name=keywords size=60 /td /tr /table html:submitSubmit/html:submit /html:form web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- Struts Tag Library Descriptors -- taglib taglib-uri/WEB-INF/struts-bean/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-nested/taglib-uri taglib-location/WEB-INF/struts-nested.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-tiles/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib /web-app struts-config.xml form-beans form-bean name=articleForm type=articles.ArticleForm/ /form-beans action-mappings action path=/Article type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings --ArticleForm.java package articles; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionErrors; public class ArticleForm extends ActionForm { private String keywords = null; public String getKeywords(){ return keywords; } public void setKeywords(String keywords){ this.keywords = keywords; } public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); if( getKeywords() == null || getKeywords().length() 1 ) { errors.add(keywords,new ActionMessage(error.keywords.required)); } return errors; } }
RE: Opinions on Struts Layout
By native parts I meant that it is possible some features of Struts Layount might have been added to Struts since struts-layout was started. *shrug* Regards, David -Original Message- From: Derek Broughton [mailto:[EMAIL PROTECTED] Sent: Saturday, December 11, 2004 11:06 AM To: Struts Users Mailing List Subject: Re: Opinions on Struts Layout On Friday 10 December 2004 16:38, David G. Friedman wrote: Derek, If you made a list of bullet points for the parts of struts layout you like most, perhaps we listmembers could point you in the direction of native Struts parts or equivalent add-ons. I don't really see how there could be native Struts parts, since it's just an extension of Struts, but what I've been using is: layout:row, layout:column - really simplify layout of row-oriented but non-tabular data input tags - I haven't a clue how it's done, but if they fail validation, the corresponding message is displayed with the input field rather than just using html:errors. layout:treeview for collapsing menus I haven't yet used layout:datagrid but it looks quite handy for tabular data. For tabbed panels, I found struts-menu more useful. -- derek - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot find ActionMappings or ActionFormBeans collection
Hi David, That error is displayed while I am loading my Template.jsp itself. http://localhost:8080/test/Template.jsp Not able to see the GUI itself. Uma -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 10:28 AM To: Struts Users Mailing List Subject: RE: Cannot find ActionMappings or ActionFormBeans collection Is that error at start-up or when you are invoking an action by going to a Struts *.do action through a URL? Regards, David -Original Message- From: uma.k [mailto:[EMAIL PROTECTED] Sent: Sunday, December 12, 2004 11:54 PM To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Subject: RE: Cannot find ActionMappings or ActionFormBeans collection Hi Sunny, Thanks for the reply. The classpath is set right and my struts-config.xml file looks the same way as you posted, I just removed the un necessary tags. Any ideas now? Uma -Original Message- From: Sunny [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 10:04 AM To: Struts Users Mailing List Subject: Re: Cannot find ActionMappings or ActionFormBeans collection hi, Ensure that your are having your struts-config like the one below. And also please check your class path regards, Sunny ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd; struts-config form-beans form-bean name=articleForm type=articles.ArticleForm/ /form-beans action-mappings action path=/Article type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings /struts-config uma.k wrote: Hello, I am new to Struts, my first application is giving me this error. I am using Tomcat 4.0 and struts 1.2.4. Where did I go wrong? Please help me. javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection Here are my files -Template.jsp %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html body html:form action=/Article table border=0 width=100% tr td width=18%font size=2 face=VerdanaKeywords/font/td td width=32%input type=text name=keywords size=60 /td /tr /table html:submitSubmit/html:submit /html:form web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- Struts Tag Library Descriptors -- taglib taglib-uri/WEB-INF/struts-bean/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-nested/taglib-uri taglib-location/WEB-INF/struts-nested.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-tiles/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib /web-app struts-config.xml form-beans form-bean name=articleForm type=articles.ArticleForm/ /form-beans action-mappings action path=/Article type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings --ArticleForm.java package articles; import javax.servlet.http.HttpServletRequest; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionMapping; import org.apache.struts.action.ActionMessage; import org.apache.struts.action.ActionErrors; public class ArticleForm extends ActionForm { private String keywords = null; public String getKeywords(){ return keywords; } public void setKeywords(String keywords){ this.keywords = keywords; } public
Re: Cannot find ActionMappings or ActionFormBeans collection
Try adding all the properties of your form some thing like form-bean name=articleForm type=articles.ArticleForm/ form-property name = property1 type = java.lang.String / /form-bean and ensure that you *DO HAVE* getters and setters for the property in ArticleForm class regards, Sunny. uma.k wrote: Hi Sunny, This is my complete error message. Is this the one you are asking for? javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:471) at org.apache.jsp.Template$jsp._jspService(Template$jsp.java:519) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125 ) at java.lang.Thread.run(Thread.java:595) - Root Cause - javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:711) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:419) at org.apache.jsp.Template$jsp._jspService(Template$jsp.java:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at
Re: Cannot find ActionMappings or ActionFormBeans collection
Check the code at the line 711 of FormTag and you will find what is wrong. Jack On Mon, 13 Dec 2004 10:39:36 +0530, uma.k [EMAIL PROTECTED] wrote: Hi Sunny, This is my complete error message. Is this the one you are asking for? javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:471) at org.apache.jsp.Template$jsp._jspService(Template$jsp.java:519) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125 ) at java.lang.Thread.run(Thread.java:595) - Root Cause - javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:711) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:419) at org.apache.jsp.Template$jsp._jspService(Template$jsp.java:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5
Re: Cannot find ActionMappings or ActionFormBeans collection
ModuleConfig is *NULL*. Seems struts is not able to load the module. Dakota Jack wrote: Check the code at the line 711 of FormTag and you will find what is wrong. Jack - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot find ActionMappings or ActionFormBeans collection
Hi Sunny, I didn't get you. I am not using any ModuleConfig, Where am I refering it from and in which file? Uma -Original Message- From: Sunny [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 11:41 AM To: Struts Users Mailing List Subject: Re: Cannot find ActionMappings or ActionFormBeans collection ModuleConfig is *NULL*. Seems struts is not able to load the module. Dakota Jack wrote: Check the code at the line 711 of FormTag and you will find what is wrong. Jack - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
about logic tag
I have a vector object in a jsp page. An ActionForm's two instances are stored in that vector. How can i display the values using bean logic tag?
Re: Cannot find ActionMappings or ActionFormBeans collection
In order to have a request properly setup, you need to be going through the controller. To go through the controller, you need to be viewing an action instead of a JSP page. Try invoking an action that uses the template and see if the problem persists. You can't expect Struts to set things up for a page it doesn't know you're requesting, and it can't know you're requesting the page unless you go through the controller :-) Good Luck, Eddie - Original Message - From: uma.k [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Sunday, December 12, 2004 11:00 PM Subject: RE: Cannot find ActionMappings or ActionFormBeans collection Hi David, That error is displayed while I am loading my Template.jsp itself. http://localhost:8080/test/Template.jsp Not able to see the GUI itself. Uma -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 10:28 AM To: Struts Users Mailing List Subject: RE: Cannot find ActionMappings or ActionFormBeans collection Is that error at start-up or when you are invoking an action by going to a Struts *.do action through a URL? Regards, David -Original Message- From: uma.k [mailto:[EMAIL PROTECTED] Sent: Sunday, December 12, 2004 11:54 PM To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Subject: RE: Cannot find ActionMappings or ActionFormBeans collection Hi Sunny, Thanks for the reply. The classpath is set right and my struts-config.xml file looks the same way as you posted, I just removed the un necessary tags. Any ideas now? Uma -Original Message- From: Sunny [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 10:04 AM To: Struts Users Mailing List Subject: Re: Cannot find ActionMappings or ActionFormBeans collection hi, Ensure that your are having your struts-config like the one below. And also please check your class path regards, Sunny ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd; struts-config form-beans form-bean name=articleForm type=articles.ArticleForm/ /form-beans action-mappings action path=/Article type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings /struts-config uma.k wrote: Hello, I am new to Struts, my first application is giving me this error. I am using Tomcat 4.0 and struts 1.2.4. Where did I go wrong? Please help me. javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection Here are my files -Template.jsp %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html body html:form action=/Article table border=0 width=100% tr td width=18%font size=2 face=VerdanaKeywords/font/td td width=32%input type=text name=keywords size=60 /td /tr /table html:submitSubmit/html:submit /html:form web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- Struts Tag Library Descriptors -- taglib taglib-uri/WEB-INF/struts-bean/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic/taglib-uri taglib-location/WEB-INF/struts-logic.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-nested/taglib-uri taglib-location/WEB-INF/struts-nested.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-tiles/taglib-uri taglib-location/WEB-INF/struts-tiles.tld/taglib-location /taglib /web-app struts-config.xml form-beans form-bean name=articleForm type=articles.ArticleForm/ /form-beans action-mappings action path=/Article type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings --ArticleForm.java package articles;
Re: about logic tag
logic:iterate id = actionForm name = vector !-- for each iteration you have reference to current element in vector to actionForm. use it. -- bean:write property =class name = actionForm/ !-- write runtime class of actionForm to jsp. equivalant of out.println(actionForm.getClass()); -- /logic:iterate Pramod wrote: I have a vector object in a jsp page. An ActionForm's two instances are stored in that vector. How can i display the values using bean logic tag? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot find ActionMappings or ActionFormBeans collection
Hey thanks Eddie, I didnt think in this perspective. Cl, I need to think out of the box ;-) Eddie Bush wrote: In order to have a request properly setup, you need to be going through the controller. To go through the controller, you need to be viewing an action instead of a JSP page. Try invoking an action that uses the template and see if the problem persists. You can't expect Struts to set things up for a page it doesn't know you're requesting, and it can't know you're requesting the page unless you go through the controller :-) Good Luck, Eddie - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: about logic tag
It is not displaying the results. The code producing new instances of ActionForm. i will send my code logic:iterate id=advanceEntryForm name=results tr td bgcolor=beigebean:write property=resid name=advanceEntryForm / /tr /logic:iterate - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot find ActionMappings or ActionFormBeans collection
Hi Bush, Its confusing me. How do I call an Action without the Template.jsp form being submitted? My Action and ActionForm are i web-inf/classes/articles folder. My Template.jsp will take that information from the user and send it to the respective jsp based on the execute method. If I am wrong please correct me. Thanks Uma -Original Message- From: Eddie Bush [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 11:54 AM To: Struts Users Mailing List Subject: Re: Cannot find ActionMappings or ActionFormBeans collection In order to have a request properly setup, you need to be going through the controller. To go through the controller, you need to be viewing an action instead of a JSP page. Try invoking an action that uses the template and see if the problem persists. You can't expect Struts to set things up for a page it doesn't know you're requesting, and it can't know you're requesting the page unless you go through the controller :-) Good Luck, Eddie - Original Message - From: uma.k [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Sunday, December 12, 2004 11:00 PM Subject: RE: Cannot find ActionMappings or ActionFormBeans collection Hi David, That error is displayed while I am loading my Template.jsp itself. http://localhost:8080/test/Template.jsp Not able to see the GUI itself. Uma -Original Message- From: David G. Friedman [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 10:28 AM To: Struts Users Mailing List Subject: RE: Cannot find ActionMappings or ActionFormBeans collection Is that error at start-up or when you are invoking an action by going to a Struts *.do action through a URL? Regards, David -Original Message- From: uma.k [mailto:[EMAIL PROTECTED] Sent: Sunday, December 12, 2004 11:54 PM To: 'Struts Users Mailing List'; [EMAIL PROTECTED] Subject: RE: Cannot find ActionMappings or ActionFormBeans collection Hi Sunny, Thanks for the reply. The classpath is set right and my struts-config.xml file looks the same way as you posted, I just removed the un necessary tags. Any ideas now? Uma -Original Message- From: Sunny [mailto:[EMAIL PROTECTED] Sent: Monday, December 13, 2004 10:04 AM To: Struts Users Mailing List Subject: Re: Cannot find ActionMappings or ActionFormBeans collection hi, Ensure that your are having your struts-config like the one below. And also please check your class path regards, Sunny ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.1//EN http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd; struts-config form-beans form-bean name=articleForm type=articles.ArticleForm/ /form-beans action-mappings action path=/Article type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings /struts-config uma.k wrote: Hello, I am new to Struts, my first application is giving me this error. I am using Tomcat 4.0 and struts 1.2.4. Where did I go wrong? Please help me. javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection Here are my files -Template.jsp %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % html body html:form action=/Article table border=0 width=100% tr td width=18%font size=2 face=VerdanaKeywords/font/td td width=32%input type=text name=keywords size=60 /td /tr /table html:submitSubmit/html:submit /html:form web.xml ?xml version=1.0 encoding=ISO-8859-1? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app !-- Standard Action Servlet Configuration (with debugging) -- servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param load-on-startup2/load-on-startup /servlet !-- Standard Action Servlet Mapping -- servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping !-- Struts Tag Library Descriptors -- taglib taglib-uri/WEB-INF/struts-bean/taglib-uri taglib-location/WEB-INF/struts-bean.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-html/taglib-uri taglib-location/WEB-INF/struts-html.tld/taglib-location /taglib taglib taglib-uri/WEB-INF/struts-logic/taglib-uri
RE: Cannot find ActionMappings or ActionFormBeans collection
Hi Eddie, Are you saying that put a link to this jsp and pass this jsp through the controller? Buts its a simple jsp and it doesn't require any Actions. Any explanation on this please? You can't expect Struts to set things up for a page it doesn't know you're requesting, and it can't know you're requesting the page unless you go through the controller :-) Uma - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot find ActionMappings or ActionFormBeans collection
use http://localhost:8080/test/Template.do instead of http://localhost:8080/test/Template.jsp uma.k wrote: Hi Eddie, Are you saying that put a link to this jsp and pass this jsp through the controller? Buts its a simple jsp and it doesn't require any Actions. Any explanation on this please? You can't expect Struts to set things up for a page it doesn't know you're requesting, and it can't know you're requesting the page unless you go through the controller :-) Uma - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: about logic tag
I can't produce the result. The bean tag creating new instance of ActionForm.Get me a solution. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot find ActionMappings or ActionFormBeans collection
Are you able to Get other pages working? e.g. : login.do This kind of error comes *only* when ActionServlet itself is not initialised / not mapped. uma.k wrote: No, Nothing helped me. I still get that error and I cannot call Template.do as the tomcat gives error that the file is not found. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Cannot find ActionMappings or ActionFormBeans collection
Hi Sunny, This is my complete error message. Is this the one you are asking for? javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp l.java:471) at org.apache.jsp.Template$jsp._jspService(Template$jsp.java:519) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:2 46) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve. java:170) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170 ) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 64) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java :174) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java: 1027) at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125 ) at java.lang.Thread.run(Thread.java:595) - Root Cause - javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:711) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:419) at org.apache.jsp.Template$jsp._jspService(Template$jsp.java:64) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:201) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application FilterChain.java:247) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh ain.java:193) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja va:243) at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:5 66) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja va:190) at
Re: Cannot find ActionMappings or ActionFormBeans collection
I do suspect the initialization of ActionServlet, It would be better if you (uma) can paste your catalina logs regards, Sunny David G. Friedman wrote: Is that error at start-up or when you are invoking an action by going to a Struts *.do action through a URL? Regards, David - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Cannot find ActionMappings or ActionFormBeans collection
Do following changes: your struts-config: action-mappings action path=/Article type=articles.ArticleAction scope=request validate=true parameter=/Template.jsp forward name=success path=/Template.jsp/ /action action path=/ArticleUpdate type=articles.ArticleAction name=articleForm scope=request validate=true input=/Template.jsp forward name=success path=/preview.jsp/ forward name=failure path=/Template.jsp/ /action /action-mappings your Template.jsp html:form action = /ArticleUpdate . /html:form uma.k wrote: Hi Bush, Its confusing me. How do I call an Action without the Template.jsp form being submitted? My Action and ActionForm are i web-inf/classes/articles folder. My Template.jsp will take that information from the user and send it to the respective jsp based on the execute method. If I am wrong please correct me. Thanks Uma - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]