Struts + JavaScript = dynamic forms
I d like to write a form with, say, 3 dropboxes. Choosing an option in 1. box changes list of available options in other 2 boxes. [Eg. box #1 can store list of countries and box #2 list of cities in chosen country, or all cities if no country is chosen.] It can be done with JavaScript. However, I am looking for your opinion about Struts-way of doing that task. -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Eclipse plug-in for Struts
You might want to check http://www.objectlearn.com. I use it for generating ejb beans. Sometimes it is hard to set it up. Don't try to run it with MyEclipseIDE installed. On 6/23/05, Arash Bijanzadeh <[EMAIL PROTECTED]> wrote: > Me too am searching for a plugin for Eclipse to be able to write my J2EE > components like JSP XML HTML and so on. > Any good free one? > Regards > Arash > > On 6/22/05, Barnett, Brian W. <[EMAIL PROTECTED]> wrote: > > > > http://www.sysdeo.com/sysdeo/eclipse/tomcatplugin > > > > -Original Message- > > From: Tony Smith [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, June 22, 2005 10:59 AM > > To: Struts Users Mailing List > > Subject: Eclipse plug-in for Struts > > > > > > Is there an Eclipse plug-in for Struts or Tomcat so > > that I can develop, debug, and test my web app all in > > Eclipse? Right now, if I want to change something I > > have to write my program in Eclipse, write my jsp in > > another text editor, export the jar file from Eclipse > > to web-inf/lib, restart Tomcat, and open IE > > > > > > > > > > > > __ > > Yahoo! Mail Mobile > > Take Yahoo! Mail with you! Check email on your mobile phone. > > http://mobile.yahoo.com/learn/mail > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > This email may contain confidential material. > > If you were not an intended recipient, > > Please notify the sender and delete all copies. > > We may monitor email to and from our network. > > > > ******** > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SimpleDispatchAction error
I probably have found an error. It needs short description. Each of ActionForms in my app uses two Action classes. One is 'typical' form launched after submitting a form. Its execute method forwards to next Action which sets data for new form before displaying it. [..] --> PreAction1 --> ActionForm1 --> Action1 --> PreAction2 --> ActionForm2 --> [...] Now, I guess that all actions generate GETs/POSTs. My logs prove it. Submiting a form proceeds without an error if its method=="GET". With POST I still get it. Everything would be fine if I could use only GET method. My question is, how can i get rid of this 'multi submit' error? I use PreActions mainly for prepopulating data in new form. Maybe there is some other nice way to do it? On 6/17/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > On 6/17/05, Janek Ziniewicz <[EMAIL PROTECTED]> wrote: > > SimpleDispatchAction inherits from Action class not from DispatchAction. > > At http://wiki.apache.org/struts/StrutsCatalogDispatchActionImproved you > > can read: > > "You can use a dispatch action without requiring configuration of a > > parameter attribute in struts-config.xml." > > > > My problem is that each of my forms generates two POSTs with one click. I > > am not sure if the error comes from SimpleDispatchAction although it > > appeared when I 've started using it. Its code looks ok. > <...removed...> > > Are there any 'typical' situations when one click generates two submits? > > No, this is not typical. Get some HTTP sniffer (for Firefox I'd > recommend LiveHttpHeaders) and see what is happening. Also, in Tomcat > mail-list someone posted a bug, that for each request servlet is > called three times. Maybe it is related if you use non-stable Tomcat > build. But that one was three times, not two. > > --------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: SimpleDispatchAction error
SimpleDispatchAction inherits from Action class not from DispatchAction. At http://wiki.apache.org/struts/StrutsCatalogDispatchActionImproved you can read: "You can use a dispatch action without requiring configuration of a parameter attribute in struts-config.xml." My problem is that each of my forms generates two POSTs with one click. I am not sure if the error comes from SimpleDispatchAction although it appeared when I 've started using it. Its code looks ok. Error appears in second POST, when SimpleDispatchAction::execute tries to get handler parameter from request. Request of second POST doesn't have any attributes set by me. All of them are erased after first POST - which is proper behaviour. I dont know where this second POST comes from. Are there any 'typical' situations when one click generates two submits? Dnia Fri, 17 Jun 2005 15:27:01 +0200, McDonnell, Colm (MLIM) <[EMAIL PROTECTED]> napisał: The exception message Request[/login] does not contain handler parameter named 'null'. Implies that you either haven't defined the dispatch parameter or you haven't supplied a value for the dispatch parameter. Have you checked the API for DispatchAction, in particular the parts relating to the "parameter" attribute of a dispatch action mapping. -Original Message- From: Janek Ziniewicz [mailto:[EMAIL PROTECTED] Sent: 17 June 2005 13:23 To: user@struts.apache.org Subject: SimpleDispatchAction error Hello again, all my action classes are derived from SimpleDispatchAction class. After submitting a form I am forwarded to desired page but always get a following error. Logs of my app show that after each submitting to POSTs are sent. First forwards me to next page, second produces an error. Any ideas what is happening? Source of StrutsCatalogDispatchAction can be found at http://wiki.apache.org/struts/StrutsCatalogDispatchActionImproved but almost for sure problem is not located in SimpleDispatchAction. 11:21:27,140 ERROR [SimpleDispatchAction] Request[/login] does not contain handler parameter named 'null'. This may be caused by whitespace in the label text. ... ... -- Pozdrawiam, Janek Ziniewicz gg:902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SimpleDispatchAction error
oyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:595) -- Pozdrawiam, Janek Ziniewicz gg:902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
StrutsCatalogDispatchAction error
Source of StrutsCatalogDispatchAction http://wiki.apache.org/struts/StrutsCatalogDispatchActionImproved -- Pozdrawiam, Janek Ziniewicz gg:902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SimpleDispatchAction error
l.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683) at java.lang.Thread.run(Thread.java:595) -- Pozdrawiam, Janek Ziniewicz gg:902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: another newbie
You could use a jsp debugger which is part of MyEclipseIDE. Dnia Fri, 17 Jun 2005 09:21:31 +0200, Nitesh <[EMAIL PROTECTED]> napisał: Looks like you have an action in the html:form in submit.jsp which is not there in the struts-config action mappings (checkout the case of the actions as well) Nitesh - Original Message - From: "Amin Mohd Sani" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Friday, June 17, 2005 11:59 AM Subject: RE: another newbie Anyone using eclipse and jboss with struts? I'm getting this error as below : 12:30:48,329 ERROR [Engine] StandardWrapperValve[jsp]: Servlet.service() for ser vlet jsp threw exception javax.servlet.jsp.JspException: Cannot retrieve mapping for action /submit at org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:753) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:443) at org.apache.jsp.submit_jsp._jspx_meth_html_form_0(submit_jsp.java:140) it looks like I'm missing something on the eclipse side. TIA, Amin - 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] -- Pozdrawiam, Janek Ziniewicz gg:902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
question
http://struts.apache.org/userGuide/struts-tiles.html#insert I 've read here about 'flush' attribute. What does it exactly do and what is the practical difference between setting it to false or true? -- Pozdrawiam, Janek Ziniewicz gg:902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: BeanUtils.populate error
Thank you delbd, that indeed could produce an error. I 've found that the error occured when fields in form didn't have unique "name" attributes and I tried to perform forward to the same form. href="/NILTemp/showAttachment.do?attid=name="att"property="id"/>">[View] I use SimpleDispatchAction as parent for my Action classes and changing names to unique could cause some problems for me. Do you know any fast and easy [:)] way to deal with this? Dnia Wed, 15 Jun 2005 15:20:27 +0200, delbd <[EMAIL PROTECTED]> napisał: You most probably have the wrong setter parameters for one or several of your from's properties. like have you have a setDate(Date date) instead of setDate(String date) The only allowed signatures, if am not wrong are setXXX(String) and setXXX(FormFile) Le Mercredi 15 Juin 2005 15:07, Jan Ziniewicz a écrit : I get this error when I click on a buttons in my forms. Some buttons work, some don't and I don't know where is the error. Any suggestions? I can give you more detailed information but i guess that it is quite typical error. javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor .java:805) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203 ) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) com.newitech.struts.controller.AccessController.process(AccessController.ja va:261) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) com.newitech.struts.controller.AccessController.doPost(AccessController.jav a:254) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) com.newitech.struts.filter.LoginFilter.doFilter(LoginFilter.java:62) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter. java:75) root cause java.lang.IllegalArgumentException: argument type mismatch sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils .java:1789) org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils. java:1684) org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1 713) org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019) org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808) org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor. java:805) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203 ) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194) com.newitech.struts.controller.AccessController.process(AccessController.ja va:261) org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432) com.newitech.struts.controller.AccessController.doPost(AccessController.jav a:254) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) javax.servlet.http.HttpServlet.service(HttpServlet.java:810) com.newitech.struts.filter.LoginFilter.doFilter(LoginFilter.java:62) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter. java:75) -- Pozdrawiam, Janek Ziniewicz gg:902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ActionForm::reset method
So where is the proper place to prepopulate fields? [I know I am a noob] On 6/8/05, Hubert Rabago <[EMAIL PROTECTED]> wrote: > Yes. Is this causing a problem for you? Please note that reset() is > not where you should be prepopulating fields. As it says in the > javadoc: > > "In practice, the only properties that need to be reset are those > which represent checkboxes on a session-scoped form." > > ... and ... > > "You mainly need to worry about setting checkbox values to false; most > of the time you can leave this method unimplemented." > > Hubert > > > On 6/8/05, Janek Ziniewicz <[EMAIL PROTECTED]> wrote: > > My app contains a few forms. Each form has one ActionForm and one > > Action class associated. Each time page with form is displayed I see > > that ActionForm::reset method is displayed. After submitting I can see > > that reset method is launched again, and right after that > > ActionForm::execute. > > > > Is it proper behaviour? > > > > -- > > Pozdrawiam, > > Janek Ziniewicz > > gg: 902858 > > irc.freenode.net: #gore, #dub > > > > ----- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
ActionForm::reset method
My app contains a few forms. Each form has one ActionForm and one Action class associated. Each time page with form is displayed I see that ActionForm::reset method is displayed. After submitting I can see that reset method is launched again, and right after that ActionForm::execute. Is it proper behaviour? -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Size of a collection in a bean
<% Vector foo; request.setAttribute("bar", foo); %> Is there any simple method to write size of a collection stored in a bean? -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaying files from database
Hi, what I want to do is display in a webpage file which is stored in database. My struts app should recognize its mime type and according to this perform suitable action (eg if it is *pdf run acrobat, if *html just display it, etc). I know how to put and get this data from dbase and how to recognize its mime type but this is not enough to do the task. Code below causes java.lang.IllegalStateException. Although in some cases I can see attachment on screen. How can I make it work? ServletOutputStream sout=response.getOutputStream(); sout.write(blob); -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaying files from database
Hi, what I want to do is display in a webpage file which is stored in database. My struts app should recognize its mime type and according to this perform suitable action (eg if it is *pdf run acrobat, if *html just display it, etc). I know how to put and get this data from dbase and how to recognize its mime type but this is not enough to do the task. Code below causes java.lang.IllegalStateException. Although in some cases I can see attachment on screen. How can I make it work? ServletOutputStream sout=response.getOutputStream(); sout.write(blob); -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaying files from database on a webpage
Hi, what I want to do is display in a webpage file which is stored in database. My struts app should recognize its mime type and according to this perform suitable action (eg if it is *pdf run acrobat, if *html just display it, etc). I know how to put and get this data from dbase and how to recognize its mime type but this is not enough to do the task. Code below causes java.lang.IllegalStateException. Although in some cases I can see attachment on screen. How can I make work? ServletOutputStream sout=response.getOutputStream(); sout.write(blob); -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Displaying files from database on a webpage
Hi, what I want to do is display in a webpage file which is stored in database. My struts app should recognize its mime type and according to this perform suitable action (eg if it is *pdf run acrobat, if *html just display it, etc). I know how to put and get this data from dbase and how to recognize its mime type but this is not enough to do the task. Code below causes java.lang.IllegalStateException. Although in some cases I can see attachment on screen. How can I make work? ServletOutputStream sout=response.getOutputStream(); sout.write(blob); -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Autologin?
Thank you Michael, that link really helped me. I have one more question. Wendy Smoak mentioned using Filter(s). Could you drop me some links describing what filters are? I 'd like to read something about it. On 5/24/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > This may help you: http://wiki.apache.org/struts/StrutsRememberMeCookie > You can modify the action and go to directly to user page instead of > showing the "remember me" checkbox. > > On 5/24/05, Jan Ziniewicz <[EMAIL PROTECTED]> wrote: > > I have problems with user logging in my application. Basically I want to > > have functionality same as on gmail.com -- if I have a proper cookie > > forward me to inbox omiting login page. > > > > I know how to play with cookies but struts part of the task is a problem > > for me > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Autologin?
I have problems with user logging in my application. Basically I want to have functionality same as on gmail.com -- if I have a proper cookie forward me to inbox omiting login page. I know how to play with cookies but struts part of the task is a problem for me. -- Pozdrawiam, Janek Ziniewicz gg: 902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Dealing with many forms
Hi, I am writing my first Struts application, and have some problems with it. Some part of my app, gets data from database, fills appropriate form, displays it and, if user changed the form, writes data back to database. Another functionality is: get whole webpage (including form)from database, fill it with data and if user changes it, write changed data back to database. It was done with Jsp and JavaScript. Writing ActionForm for each form would be senseless because part of functionality of the app is that any user can submit new forms. And now the problem: Some devices do not deal with JavaScript well (some palmtops, cellphones etc). And my app must run properly on them. So, is there any way to do the task above without JavaScript? -- Pozdrawiam, Janek Ziniewicz gg:902858 irc.freenode.net: #gore, #dub - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]