Problem in using logic:iterate in struts
Hello all, I have developed 1 application using struts.I am getting this error in my JSP.I have used logic:iterate.I have populated an arraylist in action class which I am using in my JSP.I am able to see the data from the arraylist in my JSP but I am getting error when I am clicking on the hyperlink in JSP.This is the error.Please help me as I am pretty new to struts.Any help will be highly appreciated.Thanx in advance. ApplicationDispatcher[/TGMC_DB1-2009] PWC1231: Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Cannot find bean: topic_list in any scope at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935) at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232) at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from :121) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:718) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270) at
Issue using struts2 autocompleter.
Hi, I am facing an issue in strts2 autocompleter. Issue: In jsp page where I have used autocompleter, IE is showing an alert message with stack overflow at line: 8259 and in the same jsp page, I have an error as djConfig.baseScriptUri.length' is null or not an object and autocompleter is behaving like a combo box. Jsp code for autocompleter is: s:head theme=ajax/ inside head tag s:autocompleter list=mailNameList name=mailName theme=simple / inside body tag In Action class: private ListString mailNameList; when I remove s:head theme=ajax/ tag, both errors are not coming, but instead of autocompleter, combo box is displaying in the jsp page. Kindly help me.. Thanks in advance -- View this message in context: http://www.nabble.com/Issue-using-struts2-autocompleter.-tp19622997p19622997.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in using logic:iterate in struts
UITOT schrieb: Hello all, I have developed 1 application using struts.I am getting this error in my JSP.I have used logic:iterate.I have populated an arraylist in action class which I am using in my JSP.I am able to see the data from the arraylist in my JSP but I am getting error when I am clicking on the hyperlink in JSP.This is the error.Please help me as I am pretty new to struts.Any help will be highly appreciated.Thanx in advance. javax.servlet.jsp.JspException: Cannot find bean: topic_list in any scope I don't know anything about Struts 1 but this looks to me as if you didn't create a bean with the name topic_list anywhere in the code. // this is the statement which is generating error get_threads.do?topic_id=bean:write name= - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Issue using struts2 autocompleter.
Hi, I am facing an issue in struts2 autocompleter. Issue: In jsp page where I have used autocompleter, IE is showing an alert message with stack overflow at line: 8259 and in the same jsp page, I have an error as djConfig.baseScriptUri.length' is null or not an object and autocompleter is behaving like a combo box. Jsp code for autocompleter is: s:head theme=ajax/ inside head tag s:autocompleter list=mailNameList name=mailName theme=simple / inside body tag In Action class: private ListString mailNameList; when I remove s:head theme=ajax/ tag, both errors are not coming, but instead of autocompleter, combo box is displaying in the jsp page. Kindly help me.. Thanks in advance -- View this message in context: http://www.nabble.com/Issue-using-struts2-autocompleter.-tp19623666p19623666.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: quest on dynamic redirect
Thank you. I can't understand how to realize the redirect descripted here: - during the login action, after the login is confirmed the action realizes that a redirect is requestet (to a.action) Particulary I can't understand what it means: result name=redirect type=..${redirectTo}/result Do you have a sample? Gianluca 2008/9/23 Alexander Baetz [EMAIL PROTECTED]: I thought of the same problem some time ago. - during the execution of I all information for the correct redirect is stored (session, bean... whatsoever) - during the login action, after the login is confirmed the action realizes that a redirect is requestet (to a.action) now the login action can get a result like this result name=redirect type=..${redirectTo}/result now the action is asced for the correct action name/tiles view... it shall return. Greetings, Alexander Gianluca Musella schrieb: This is my requirement: - the user asks for a resource, say A.action - the controller fires a custom interceptor I to authenticate the user - user isn't authenticated, so I redirect to L, the login page - user enters valid credentials - the controller redirect to the original requested A.action The problem is that the results of the login action are statically cablated in struts.xml: result type=tiles name=successhome/result result type=tiles name=failurelogin/result But I need a new case to redirect dynamically to A.action (I can't provide statically all cases in my struts.xml). How can I have this behaviour? thanks Gianluca - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: quest on dynamic redirect
here a longer explanation: when I realizes the user isnt authenticated the link (the action to be called) is saved (in a bean, a session, somewhere where you find it back later) then the user logs himself in. the login action logs him in, checks if a redirect was saved (in the bean, the session,.) and returns a special result result name=redirect type=redirectAction${redirectTo}/result the string inside the result is the return value of the call getredirectTo on the value stack (where the action lies on top) so if your user wants to get a.action all you have to do is return redirect as the result of the login action and return a for getredirectTo. Greetings, Alexander Gianluca Musella schrieb: Thank you. I can't understand how to realize the redirect descripted here: - during the login action, after the login is confirmed the action realizes that a redirect is requestet (to a.action) Particulary I can't understand what it means: result name=redirect type=..${redirectTo}/result Do you have a sample? Gianluca 2008/9/23 Alexander Baetz [EMAIL PROTECTED]: I thought of the same problem some time ago. - during the execution of I all information for the correct redirect is stored (session, bean... whatsoever) - during the login action, after the login is confirmed the action realizes that a redirect is requestet (to a.action) now the login action can get a result like this result name=redirect type=..${redirectTo}/result now the action is asced for the correct action name/tiles view... it shall return. Greetings, Alexander Gianluca Musella schrieb: This is my requirement: - the user asks for a resource, say A.action - the controller fires a custom interceptor I to authenticate the user - user isn't authenticated, so I redirect to L, the login page - user enters valid credentials - the controller redirect to the original requested A.action The problem is that the results of the login action are statically cablated in struts.xml: result type=tiles name=successhome/result result type=tiles name=failurelogin/result But I need a new case to redirect dynamically to A.action (I can't provide statically all cases in my struts.xml). How can I have this behaviour? thanks Gianluca - 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] - 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: quest on dynamic redirect
thank you Alexander, I understand well now. Bye, Gianluca 2008/9/23 Alexander Baetz [EMAIL PROTECTED]: here a longer explanation: when I realizes the user isnt authenticated the link (the action to be called) is saved (in a bean, a session, somewhere where you find it back later) then the user logs himself in. the login action logs him in, checks if a redirect was saved (in the bean, the session,.) and returns a special result result name=redirect type=redirectAction${redirectTo}/result the string inside the result is the return value of the call getredirectTo on the value stack (where the action lies on top) so if your user wants to get a.action all you have to do is return redirect as the result of the login action and return a for getredirectTo. Greetings, Alexander Gianluca Musella schrieb: Thank you. I can't understand how to realize the redirect descripted here: - during the login action, after the login is confirmed the action realizes that a redirect is requestet (to a.action) Particulary I can't understand what it means: result name=redirect type=..${redirectTo}/result Do you have a sample? Gianluca 2008/9/23 Alexander Baetz [EMAIL PROTECTED]: I thought of the same problem some time ago. - during the execution of I all information for the correct redirect is stored (session, bean... whatsoever) - during the login action, after the login is confirmed the action realizes that a redirect is requestet (to a.action) now the login action can get a result like this result name=redirect type=..${redirectTo}/result now the action is asced for the correct action name/tiles view... it shall return. Greetings, Alexander Gianluca Musella schrieb: This is my requirement: - the user asks for a resource, say A.action - the controller fires a custom interceptor I to authenticate the user - user isn't authenticated, so I redirect to L, the login page - user enters valid credentials - the controller redirect to the original requested A.action The problem is that the results of the login action are statically cablated in struts.xml: result type=tiles name=successhome/result result type=tiles name=failurelogin/result But I need a new case to redirect dynamically to A.action (I can't provide statically all cases in my struts.xml). How can I have this behaviour? thanks Gianluca - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Quest on actionInvocation
Hi all, in an interceptor is possible to know which action's method is called? For example, in action name=homeSecure class=org.almayer.web.action.HomeAction method=executeSecure[...]/action actionInvocation.getAction() contains an instance of org.almayer.web.action.HomeAction, but how to know about thr called executeSecure? Thanks Gianluca - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Getting acknowledgment for an AJAX request
hi, Please check http://www.roseindia.net/ajax Thanks -Original Message- From: ManiKanta G [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 3:41 PM To: Struts-User Subject: Getting acknowledgment for an AJAX request Hi, I m practicing AJAX in S2. And in response to my previous mail, Dave replied That's what Ajax does (loosely speaking): returns HTML fragments (or data as JSON, XML, etc.). That's the point of it--so you don't have to return entire pages and refresh the entire window. So, If I want to acknowledge some AJAX request (say, '2 new records has been added') I just needed the count of how many rows got inserted/updated successfully or a flag indicating the success or failure of the request. And for this I m sure I don't need to return a jsp. How can be this done? through JSON? if yes, can some one point me to some resource to learn using JSON in S2? Thanks in advance ManiKanta - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quest on actionInvocation
in an interceptor is possible to know which action's method is called? You can get the requesting method name by using invocation.getProxy().getMethod(). Similarly you can get the action name: invocation.getProxy().getNamespace(). Of cource invocation.getInvocationContext().getName() will also returns the same. ActionContext.getContext().getName() may be useful some times. Using invocation.getProxy().getXXX methods, you can get some other which you have interest. Hope this helps. ManiKanta
Re: Getting acknowledgment for an AJAX request
Please check http://www.roseindia.net/ajax well I didn't find any thing. More over site speaks about regular AJAX there. Can some tell me how to do that in S2. I mean JSON or some other. Regards, ManiKanta
RE: Getting acknowledgment for an AJAX request
Hi This has lot of info about sending ajax requests http://developer.yahoo.com/yui/ -Original Message- From: ManiKanta G [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 4:03 PM To: Struts Users Mailing List Subject: Re: Getting acknowledgment for an AJAX request Please check http://www.roseindia.net/ajax well I didn't find any thing. More over site speaks about regular AJAX there. Can some tell me how to do that in S2. I mean JSON or some other. Regards, ManiKanta - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Quest on actionInvocation
thank you ManiKanta, it helps much. 2008/9/23 ManiKanta G [EMAIL PROTECTED]: in an interceptor is possible to know which action's method is called? You can get the requesting method name by using invocation.getProxy().getMethod(). Similarly you can get the action name: invocation.getProxy().getNamespace(). Of cource invocation.getInvocationContext().getName() will also returns the same. ActionContext.getContext().getName() may be useful some times. Using invocation.getProxy().getXXX methods, you can get some other which you have interest. Hope this helps. ManiKanta - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: quest on dynamic redirect
Mmm... doesn't work. This is in my struts.xml: action name=login class=org.almayer.web.action.SessionAction method=login result name=redirect type=redirectAction${redirectTo}/result /action This is the login action's method (I omitt logic): public String login() throws Exception { return home; } And this is the Tomcat response: type: Status report message: No result defined for action org.almayer.web.action.SessionAction and result home description: The requested resource (No result defined for action org.almayer.web.action.SessionAction and result home) is not available. What's my fault? Gianluca 2008/9/23 Gianluca Musella [EMAIL PROTECTED]: thank you Alexander, I understand well now. Bye, Gianluca 2008/9/23 Alexander Baetz [EMAIL PROTECTED]: here a longer explanation: when I realizes the user isnt authenticated the link (the action to be called) is saved (in a bean, a session, somewhere where you find it back later) then the user logs himself in. the login action logs him in, checks if a redirect was saved (in the bean, the session,.) and returns a special result result name=redirect type=redirectAction${redirectTo}/result the string inside the result is the return value of the call getredirectTo on the value stack (where the action lies on top) so if your user wants to get a.action all you have to do is return redirect as the result of the login action and return a for getredirectTo. Greetings, Alexander Gianluca Musella schrieb: Thank you. I can't understand how to realize the redirect descripted here: - during the login action, after the login is confirmed the action realizes that a redirect is requestet (to a.action) Particulary I can't understand what it means: result name=redirect type=..${redirectTo}/result Do you have a sample? Gianluca 2008/9/23 Alexander Baetz [EMAIL PROTECTED]: I thought of the same problem some time ago. - during the execution of I all information for the correct redirect is stored (session, bean... whatsoever) - during the login action, after the login is confirmed the action realizes that a redirect is requestet (to a.action) now the login action can get a result like this result name=redirect type=..${redirectTo}/result now the action is asced for the correct action name/tiles view... it shall return. Greetings, Alexander Gianluca Musella schrieb: This is my requirement: - the user asks for a resource, say A.action - the controller fires a custom interceptor I to authenticate the user - user isn't authenticated, so I redirect to L, the login page - user enters valid credentials - the controller redirect to the original requested A.action The problem is that the results of the login action are statically cablated in struts.xml: result type=tiles name=successhome/result result type=tiles name=failurelogin/result But I need a new case to redirect dynamically to A.action (I can't provide statically all cases in my struts.xml). How can I have this behaviour? thanks Gianluca - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: quest on dynamic redirect
action name=login class=org.almayer.web.action.SessionAction method=login result name=redirect type=redirectAction${redirectTo}/result /action This is the login action's method (I omitt logic): public String login() throws Exception { return home; } You have to add getter String getRedirectTo() { return this.redirectTo; } and in login() method public String login() throws Exception { this.redirectTo = home; return redirect; } Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: quest on dynamic redirect
ok, it sounds better. thank you Lukasz 2008/9/23 Lukasz Lenart [EMAIL PROTECTED]: action name=login class=org.almayer.web.action.SessionAction method=login result name=redirect type=redirectAction${redirectTo}/result /action This is the login action's method (I omitt logic): public String login() throws Exception { return home; } You have to add getter String getRedirectTo() { return this.redirectTo; } and in login() method public String login() throws Exception { this.redirectTo = home; return redirect; } Regards -- Lukasz http://www.lenart.org.pl/ - 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]
Java Mail errors
hi to all, I am new to java mail. i want to send an email from my system using the following program: --- import javax.mail.*; import javax.mail.internet.*; import java.util.*; public void postMail( String recipients[ ], String subject, String message , String from) throws MessagingException { boolean debug = false; //Set the host smtp address Properties props = new Properties(); props.put(mail.smtp.host, smtp.jcom.net); // create some properties and get the default Session Session session = Session.getDefaultInstance(props, null); session.setDebug(debug); // create a message Message msg = new MimeMessage(session); // set the from and to address InternetAddress addressFrom = new InternetAddress(from); msg.setFrom(addressFrom); InternetAddress[] addressTo = new InternetAddress[recipients.length]; for (int i = 0; i recipients.length; i++) { addressTo[i] = new InternetAddress(recipients[i]); } msg.setRecipients(Message.RecipientType.TO, addressTo); // Optional : You can also set your custom headers in the Email if you Want msg.addHeader(MyHeaderName, myHeaderValue); // Setting the Subject and Content Type msg.setSubject(subject); msg.setContent(message, text/plain); Transport.send(msg); } - i am using Linux so my classpath for mail.jar is : .:/usr/share/tomcat6/lib/mail.jar: while compiling i am getting the following errors: postMail.java:5: class, interface, or enum expected public void postMail( String recipients[ ], String subject, String message , String from) throws MessagingException ^ postMail.java:10: class, interface, or enum expected Properties props = new Properties(); ^ postMail.java:11: class, interface, or enum expected props.put(mail.smtp.host, smtp.jcom.net); ^ postMail.java:14: class, interface, or enum expected Session session = Session.getDefaultInstance(props, null); ^ postMail.java:15: class, interface, or enum expected session.setDebug(debug); ^ postMail.java:18: class, interface, or enum expected Message msg = new MimeMessage(session); ^ postMail.java:21: class, interface, or enum expected InternetAddress addressFrom = new InternetAddress(from); ^ postMail.java:22: class, interface, or enum expected msg.setFrom(addressFrom); ^ postMail.java:24: class, interface, or enum expected InternetAddress[] addressTo = new InternetAddress[recipients.length]; ^ postMail.java:25: class, interface, or enum expected for (int i = 0; i recipients.length; i++) ^ postMail.java:25: class, interface, or enum expected for (int i = 0; i recipients.length; i++) ^ postMail.java:25: class, interface, or enum expected for (int i = 0; i recipients.length; i++) ^ postMail.java:28: class, interface, or enum expected } ^ postMail.java:33: class, interface, or enum expected msg.addHeader(MyHeaderName, myHeaderValue); ^ postMail.java:36: class, interface, or enum expected msg.setSubject(subject); ^ postMail.java:37: class, interface, or enum expected msg.setContent(message, text/plain); ^ postMail.java:38: class, interface, or enum expected Transport.send(msg); ^ postMail.java:39: class, interface, or enum expected } ^ 18 errors Can any one resolve my problem. waiting for your replys -- Regards, Narasimha Raju.Naidu uni...
RE: Issue using struts2 autocompleter.
1. You need to have theme=ajax otherwise autocompleter won't work. 2. Did you try to remove simple theme from s:autocompleter ? or put ajax there instead of simple. Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Rag [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 2:19 PM To: user@struts.apache.org Subject: Issue using struts2 autocompleter. Hi, I am facing an issue in struts2 autocompleter. Issue: In jsp page where I have used autocompleter, IE is showing an alert message with stack overflow at line: 8259 and in the same jsp page, I have an error as djConfig.baseScriptUri.length' is null or not an object and autocompleter is behaving like a combo box. Jsp code for autocompleter is: s:head theme=ajax/ inside head tag s:autocompleter list=mailNameList name=mailName theme=simple / inside body tag In Action class: private ListString mailNameList; when I remove s:head theme=ajax/ tag, both errors are not coming, but instead of autocompleter, combo box is displaying in the jsp page. Kindly help me.. Thanks in advance -- View this message in context: http://www.nabble.com/Issue-using-struts2-autocompleter.-tp19623666p1962 3666.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: quest on dynamic redirect
It works fine. Thank you Alex, thank you Lukasz. 2008/9/23 Gianluca Musella [EMAIL PROTECTED]: ok, it sounds better. thank you Lukasz 2008/9/23 Lukasz Lenart [EMAIL PROTECTED]: action name=login class=org.almayer.web.action.SessionAction method=login result name=redirect type=redirectAction${redirectTo}/result /action This is the login action's method (I omitt logic): public String login() throws Exception { return home; } You have to add getter String getRedirectTo() { return this.redirectTo; } and in login() method public String login() throws Exception { this.redirectTo = home; return redirect; } Regards -- Lukasz http://www.lenart.org.pl/ - 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: Java Mail errors
Hi, I think you should first read some Java tutorial how to write Java classes (you are missing class declaration), next try to find some Java Mail Tutorial with Google and the least and the most important is that this group is to support Struts users, not to solve any kind of Java problem you can have. Kind regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Mail errors
thanks for your reply, is it public static void main() what you are saying. is it required for every class? On Tue, Sep 23, 2008 at 4:55 PM, Lukasz Lenart [EMAIL PROTECTED] wrote: Hi, I think you should first read some Java tutorial how to write Java classes (you are missing class declaration), next try to find some Java Mail Tutorial with Google and the least and the most important is that this group is to support Struts users, not to solve any kind of Java problem you can have. Kind regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards, Narasimha Raju.Naidu uni...
RE: Issue using struts2 autocompleter.
Hi, Thanks for your replay Viswanath. 1. I tried without theme attribute, eventhen its behaving like a combo box. 2. When I put theme = ajax in autocompleter tag, its behaving like a textbox, not at all displaying the list from action class. Kindly help me... Thanks in advance Jishnu Viswanath wrote: 1. You need to have theme=ajax otherwise autocompleter won't work. 2. Did you try to remove simple theme from s:autocompleter ? or put ajax there instead of simple. Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Rag [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 2:19 PM To: user@struts.apache.org Subject: Issue using struts2 autocompleter. Hi, I am facing an issue in struts2 autocompleter. Issue: In jsp page where I have used autocompleter, IE is showing an alert message with stack overflow at line: 8259 and in the same jsp page, I have an error as djConfig.baseScriptUri.length' is null or not an object and autocompleter is behaving like a combo box. Jsp code for autocompleter is: s:head theme=ajax/ inside head tag s:autocompleter list=mailNameList name=mailName theme=simple / inside body tag In Action class: private ListString mailNameList; when I remove s:head theme=ajax/ tag, both errors are not coming, but instead of autocompleter, combo box is displaying in the jsp page. Kindly help me.. Thanks in advance -- View this message in context: http://www.nabble.com/Issue-using-struts2-autocompleter.-tp19623666p1962 3666.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Issue-using-struts2-autocompleter.-tp19623666p19625899.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Java Mail errors
Here's a starting point for you: http://java.sun.com/new2java/ Nils-H On Tue, Sep 23, 2008 at 1:36 PM, Narasimha Raju Naidu [EMAIL PROTECTED] wrote: thanks for your reply, is it public static void main() what you are saying. is it required for every class? On Tue, Sep 23, 2008 at 4:55 PM, Lukasz Lenart [EMAIL PROTECTED] wrote: Hi, I think you should first read some Java tutorial how to write Java classes (you are missing class declaration), next try to find some Java Mail Tutorial with Google and the least and the most important is that this group is to support Struts users, not to solve any kind of Java problem you can have. Kind regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards, Narasimha Raju.Naidu uni... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Issue using struts2 autocompleter.
Which version of struts are you using? Later versions of sturts 2.1.x check http://struts.apache.org/2.0.11.2/docs/ajax-tags.html Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Rag [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 5:12 PM To: user@struts.apache.org Subject: RE: Issue using struts2 autocompleter. Hi, Thanks for your replay Viswanath. 1. I tried without theme attribute, eventhen its behaving like a combo box. 2. When I put theme = ajax in autocompleter tag, its behaving like a textbox, not at all displaying the list from action class. Kindly help me... Thanks in advance Jishnu Viswanath wrote: 1. You need to have theme=ajax otherwise autocompleter won't work. 2. Did you try to remove simple theme from s:autocompleter ? or put ajax there instead of simple. Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Rag [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 2:19 PM To: user@struts.apache.org Subject: Issue using struts2 autocompleter. Hi, I am facing an issue in struts2 autocompleter. Issue: In jsp page where I have used autocompleter, IE is showing an alert message with stack overflow at line: 8259 and in the same jsp page, I have an error as djConfig.baseScriptUri.length' is null or not an object and autocompleter is behaving like a combo box. Jsp code for autocompleter is: s:head theme=ajax/ inside head tag s:autocompleter list=mailNameList name=mailName theme=simple / inside body tag In Action class: private ListString mailNameList; when I remove s:head theme=ajax/ tag, both errors are not coming, but instead of autocompleter, combo box is displaying in the jsp page. Kindly help me.. Thanks in advance -- View this message in context: http://www.nabble.com/Issue-using-struts2-autocompleter.-tp19623666p1962 3666.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Issue-using-struts2-autocompleter.-tp19623666p1962 5899.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Issue using struts2 autocompleter.
Oops I mean Late version needs plugin Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Jishnu Viswanath [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 5:15 PM To: Struts Users Mailing List Subject: RE: Issue using struts2 autocompleter. Which version of struts are you using? Later versions of sturts 2.1.x check http://struts.apache.org/2.0.11.2/docs/ajax-tags.html Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Rag [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 5:12 PM To: user@struts.apache.org Subject: RE: Issue using struts2 autocompleter. Hi, Thanks for your replay Viswanath. 1. I tried without theme attribute, eventhen its behaving like a combo box. 2. When I put theme = ajax in autocompleter tag, its behaving like a textbox, not at all displaying the list from action class. Kindly help me... Thanks in advance Jishnu Viswanath wrote: 1. You need to have theme=ajax otherwise autocompleter won't work. 2. Did you try to remove simple theme from s:autocompleter ? or put ajax there instead of simple. Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Rag [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 2:19 PM To: user@struts.apache.org Subject: Issue using struts2 autocompleter. Hi, I am facing an issue in struts2 autocompleter. Issue: In jsp page where I have used autocompleter, IE is showing an alert message with stack overflow at line: 8259 and in the same jsp page, I have an error as djConfig.baseScriptUri.length' is null or not an object and autocompleter is behaving like a combo box. Jsp code for autocompleter is: s:head theme=ajax/ inside head tag s:autocompleter list=mailNameList name=mailName theme=simple / inside body tag In Action class: private ListString mailNameList; when I remove s:head theme=ajax/ tag, both errors are not coming, but instead of autocompleter, combo box is displaying in the jsp page. Kindly help me.. Thanks in advance -- View this message in context: http://www.nabble.com/Issue-using-struts2-autocompleter.-tp19623666p1962 3666.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Issue-using-struts2-autocompleter.-tp19623666p1962 5899.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - To unsubscribe,
Re: Custom tag and map-backed action
Those are all good points, but when my collection was expressly declared to be a MapString, Employee I would sort of expect the key to be a String! When the framework guesses for a different type (feature?) and your application fails; all the discussion about valid number systems is sort of meaningless. Scott On Mon, Sep 22, 2008 at 7:53 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: I don't know but I hope not, since I don't want my expressions to reduce to different data types depending if there is a number or not in them! Even if abc would reduce to the string 'abc', the expression 0xabc reduce to an Integer (have tested it), since it is an hexadecimal number. 2008/9/22 [EMAIL PROTECTED]: I expected the conversion facility or iterator key to be smart enough to recognize my MapString, Employee and setup the internal key variable accordingly. Do you suppose it would have worked if my Map had contained 'abc':emp1, 'def':emp2, 'ghi':emp3? Peace, Scott On Mon, Sep 22, 2008 at 3:47 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: Interesting. Seems it is a feature, as documented in [1]. Tested it myself: s:property value=1234h.class.name / s:property value=1234b.class.name / s:property value=1234F.class.name / s:property value=1234L.class.name / s:property value=1234d.class.name / s:property value=(1234).class.name / The last one (Integer) didn't work without the ( ), which I don't know if this is a necessity or a bug. What about Short and Byte data type? it doesn't say... However, I think is NOT a bug that employees[1234F].id returns nothing, since the map key is a string and you need to quote it accordingly. [1] http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/basicExpressions.html#constants 2008/9/22 stanlick [EMAIL PROTECTED]: I encountered a very strange situation today. I had the following in a web page: s:iterator value=employees s:textfield name=employees[%{key}].id .../ where the get method in my action was: public MapString,Employee getEmployees() The employee id 7932F was being interpreted as 7932! The trailing F was apparently being considered a literal for FLOAT and was being trimmed off the String. When I wrapped the variable in quotes is worked s:textfield name=employees[ '%{key' }].id .../ Does this appear to be a bug? -- View this message in context: http://www.nabble.com/Custom-tag-and-map-backed-action-tp19614086p19614086.html Sent from the Struts - User mailing list archive at Nabble.com. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts 2 Plugin Repository Page
Hi, I created a plugin for Struts 2 and posted a news in the Struts 2 Plugin Repository Wiki. However, I cannot see my plugin listed in the http://cwiki.apache.org/S2PLUGINS/home.html announcements list. (I can see it in http://cwiki.apache.org/confluence/display/S2PLUGINS/home). I noticed the .html extension in the first URL. Is this a static page and not updated when wiki is updated? Thanks. -- View this message in context: http://www.nabble.com/Struts-2-Plugin-Repository-Page-tp19626458p19626458.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Issue using struts2 autocompleter.
Hi, I am using struts2.0.11. I will try the example given in the url. Thanks for the url. Jishnu Viswanath wrote: Oops I mean Late version needs plugin Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Jishnu Viswanath [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 5:15 PM To: Struts Users Mailing List Subject: RE: Issue using struts2 autocompleter. Which version of struts are you using? Later versions of sturts 2.1.x check http://struts.apache.org/2.0.11.2/docs/ajax-tags.html Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Rag [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 5:12 PM To: user@struts.apache.org Subject: RE: Issue using struts2 autocompleter. Hi, Thanks for your replay Viswanath. 1. I tried without theme attribute, eventhen its behaving like a combo box. 2. When I put theme = ajax in autocompleter tag, its behaving like a textbox, not at all displaying the list from action class. Kindly help me... Thanks in advance Jishnu Viswanath wrote: 1. You need to have theme=ajax otherwise autocompleter won't work. 2. Did you try to remove simple theme from s:autocompleter ? or put ajax there instead of simple. Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Rag [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 2:19 PM To: user@struts.apache.org Subject: Issue using struts2 autocompleter. Hi, I am facing an issue in struts2 autocompleter. Issue: In jsp page where I have used autocompleter, IE is showing an alert message with stack overflow at line: 8259 and in the same jsp page, I have an error as djConfig.baseScriptUri.length' is null or not an object and autocompleter is behaving like a combo box. Jsp code for autocompleter is: s:head theme=ajax/ inside head tag s:autocompleter list=mailNameList name=mailName theme=simple / inside body tag In Action class: private ListString mailNameList; when I remove s:head theme=ajax/ tag, both errors are not coming, but instead of autocompleter, combo box is displaying in the jsp page. Kindly help me.. Thanks in advance -- View this message in context: http://www.nabble.com/Issue-using-struts2-autocompleter.-tp19623666p1962 3666.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Issue-using-struts2-autocompleter.-tp19623666p1962 5899.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and
Re: Java Mail errors
is it public static void main() what you are saying. is it required for every class? Not exactly, the method main() is needed if you want to launch the program (it's a entry point to your application), but if you writing Java class which will be used with server or with some other framework (like Struts), you don't have write such method. Bassicly each Java class should looks like this: package pl.org.lenart; import javax.mail.* import some.other.packages.* public class MailSender { public void sendMail() { // method body } } and such code has to be saved in directory pl/org/lenart and file named MailSender.java This is the basic Java knowledge so please follow the link and learn how to write programs in Java Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Java Mail errors
HI, Here is the lot of examples and tutorials on Java mail api. Read at http://www.roseindia.net/javamail/ Enjoy. -Original Message- From: Jishnu Viswanath [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 5:38 PM To: Struts Users Mailing List Subject: RE: Java Mail errors LOL Well from the last reply you need to learn java, but if you know or some of your friends know Java refer to http://java.sun.com/products/javamail/javadocs/javax/mail/package-summar y.html for mailing things. Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 5:15 PM To: Struts Users Mailing List Subject: Re: Java Mail errors Here's a starting point for you: http://java.sun.com/new2java/ Nils-H On Tue, Sep 23, 2008 at 1:36 PM, Narasimha Raju Naidu [EMAIL PROTECTED] wrote: thanks for your reply, is it public static void main() what you are saying. is it required for every class? On Tue, Sep 23, 2008 at 4:55 PM, Lukasz Lenart [EMAIL PROTECTED] wrote: Hi, I think you should first read some Java tutorial how to write Java classes (you are missing class declaration), next try to find some Java Mail Tutorial with Google and the least and the most important is that this group is to support Struts users, not to solve any kind of Java problem you can have. Kind regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards, Narasimha Raju.Naidu uni... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - 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: Java Mail errors
LOL Well from the last reply you need to learn java, but if you know or some of your friends know Java refer to http://java.sun.com/products/javamail/javadocs/javax/mail/package-summar y.html for mailing things. Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Nils-Helge Garli Hegvik [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 5:15 PM To: Struts Users Mailing List Subject: Re: Java Mail errors Here's a starting point for you: http://java.sun.com/new2java/ Nils-H On Tue, Sep 23, 2008 at 1:36 PM, Narasimha Raju Naidu [EMAIL PROTECTED] wrote: thanks for your reply, is it public static void main() what you are saying. is it required for every class? On Tue, Sep 23, 2008 at 4:55 PM, Lukasz Lenart [EMAIL PROTECTED] wrote: Hi, I think you should first read some Java tutorial how to write Java classes (you are missing class declaration), next try to find some Java Mail Tutorial with Google and the least and the most important is that this group is to support Struts users, not to solve any kind of Java problem you can have. Kind regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Regards, Narasimha Raju.Naidu uni... - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
2 newbie questions about Struts and JSP
Hi, I am studying JSP and I understand that these pages are translated into java code servlets, which are then compiled and executed on the application server. i) Do these 'JSP servlets' implement the HttpJspPage interface defined in javax.servlet.jsp? ii) Does Struts (or Spring MVC) provide implementation of such 'JSP servlets'? Or does Strut (and Spring MVC) have nothing to do with this? Thanks, J. -- View this message in context: http://www.nabble.com/2-newbie-questions-about-Struts-and-JSP-tp19627021p19627021.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Issue using struts2 autocompleter.
djConfig.baseScriptUri.length' is null or not an object means the dojo.js which configures baseScriptUri attribute via the function dojo.hostenv.getBaseScriptUri = function(){ was never initialised properly with the end result the baseScriptUri ws never initialised struts needs to know the location of head.ftl which is located using the templateDir attribute (which you supplied to the struts widget) as seen here #include /${parameters.templateDir}/simple/head.ftl / if templateDir=anywhereOtherThanLocationOfDojo.JSFile you'll never configure baseScriptUri for Struts or anyone else to load dojo javascript files http://struts.apache.org/2.0.11.2/docs/autocompleter.html Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. Date: Tue, 23 Sep 2008 05:20:21 -0700 From: [EMAIL PROTECTED] To: user@struts.apache.org Subject: RE: Issue using struts2 autocompleter. Hi, I am using struts2.0.11. I will try the example given in the url. Thanks for the url. Jishnu Viswanath wrote: Oops I mean Late version needs plugin Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Jishnu Viswanath [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 5:15 PM To: Struts Users Mailing List Subject: RE: Issue using struts2 autocompleter. Which version of struts are you using? Later versions of sturts 2.1.x check http://struts.apache.org/2.0.11.2/docs/ajax-tags.html Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Rag [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 5:12 PM To: user@struts.apache.org Subject: RE: Issue using struts2 autocompleter. Hi, Thanks for your replay Viswanath. 1. I tried without theme attribute, eventhen its behaving like a combo box. 2. When I put theme = ajax in autocompleter tag, its behaving like a textbox, not at all displaying the list from action class. Kindly help me... Thanks in advance Jishnu Viswanath wrote: 1. You need to have theme=ajax otherwise autocompleter won't work. 2. Did you try to remove simple theme from s:autocompleter ? or put ajax there instead of simple. Regards, Jishnu Viswanath Software Engineer *(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll Tavant Technologies Inc., www.tavant.com PEOPLE :: PASSION :: EXCELLENCE -Original Message- From: Rag [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 2:19 PM To: user@struts.apache.org Subject: Issue using struts2 autocompleter. Hi, I am facing an issue in struts2 autocompleter. Issue: In jsp page where I have used autocompleter, IE is showing an alert message with stack overflow at line: 8259 and in the same jsp page, I have an error as djConfig.baseScriptUri.length' is null or not an object and autocompleter is behaving like a combo box. Jsp code for autocompleter is: s:head theme=ajax/ inside head tag s:autocompleter list=mailNameList name=mailName theme=simple / inside body tag In Action class: private ListString mailNameList; when I remove s:head theme=ajax/ tag, both errors are not coming, but instead of autocompleter, combo box is displaying in the jsp page. Kindly help me.. Thanks in advance -- View this message in context: http://www.nabble.com/Issue-using-struts2-autocompleter.-tp19623666p1962 3666.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Any comments or statements made in this email are not necessarily those of Tavant Technologies. The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies may be subject to our monitoring procedures. - To unsubscribe, e-mail: [EMAIL
Re: 2 newbie questions about Struts and JSP
If you are developing using Tomcat (hopefully you are), consider reading the comments (and documentation) on the Jasper 2 JSP Engine. Particularly look here: http://tomcat.apache.org/tomcat-5.5-doc/jasper-howto.html Specifically, trying the flags keepgenerated will bring some light to your question. If you are using Eclipse (or any other decent IDE), also consider putting a break point in a jsp page and take a look at what the variables show you. This will bring lots of goddies to your studying. Concerning Struts (or Spring MVC), Struts 1.x and Spring MVC use a servlet to control incoming requests whereas Struts 2.x uses a Filter instead. They do not implement any JSP specific interface as they are not concern with JSP technology. JSP is (IMHO) a rendering technology (think of it as a servlet that simply outputs HTML code to the output buffer writer). Technically, it's the V in MVC. Granted you could do it with a servlet, but JSP was born with the idea that visualizing HTML mixed with Java code was easier to imagine instead of writing code like : out.write(head/head); etc, etc... Servlets can be used to be the C of MVC (or at least help out). This is a distinction I've seen pretty much everywhere I've been (when you implement your own). You could write your servlets to forward to other servlets (jsps) of use 3rd Party frameworks. Frameworks like Struts 1.x, 2.x or Spring MVC delegate this mechanism to simple class (Action, Controller, Pojo, etc) to do the processing continuing with the MVC pattern. The delegation to a rendering technology typically occurs within these frameworks where you have options (instead of simply relying on JPS, now you can choose in using Velocity, Freemarker, etc). I've been using the latter and I'm liking it very much. Hope this helps! UseTheFork wrote: Hi, I am studying JSP and I understand that these pages are translated into java code servlets, which are then compiled and executed on the application server. i) Do these 'JSP servlets' implement the HttpJspPage interface defined in javax.servlet.jsp? ii) Does Struts (or Spring MVC) provide implementation of such 'JSP servlets'? Or does Strut (and Spring MVC) have nothing to do with this? Thanks, J. -- -- Alberto http://www.linkedin.com/in/aflores - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom tag and map-backed action
AFAIK, OGNL does not have any support for generics, but even if it would support it, I would prefer that it wont be too smart, for example in: s:property value=aMap[abc].id/ I prefer that abc be treated as an action property and call method getAbc() than coerce it to the string 'abc'. 2008/9/23 [EMAIL PROTECTED]: Those are all good points, but when my collection was expressly declared to be a MapString, Employee I would sort of expect the key to be a String! When the framework guesses for a different type (feature?) and your application fails; all the discussion about valid number systems is sort of meaningless. Scott On Mon, Sep 22, 2008 at 7:53 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: I don't know but I hope not, since I don't want my expressions to reduce to different data types depending if there is a number or not in them! Even if abc would reduce to the string 'abc', the expression 0xabc reduce to an Integer (have tested it), since it is an hexadecimal number. 2008/9/22 [EMAIL PROTECTED]: I expected the conversion facility or iterator key to be smart enough to recognize my MapString, Employee and setup the internal key variable accordingly. Do you suppose it would have worked if my Map had contained 'abc':emp1, 'def':emp2, 'ghi':emp3? Peace, Scott On Mon, Sep 22, 2008 at 3:47 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: Interesting. Seems it is a feature, as documented in [1]. Tested it myself: s:property value=1234h.class.name / s:property value=1234b.class.name / s:property value=1234F.class.name / s:property value=1234L.class.name / s:property value=1234d.class.name / s:property value=(1234).class.name / The last one (Integer) didn't work without the ( ), which I don't know if this is a necessity or a bug. What about Short and Byte data type? it doesn't say... However, I think is NOT a bug that employees[1234F].id returns nothing, since the map key is a string and you need to quote it accordingly. [1] http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/basicExpressions.html#constants 2008/9/22 stanlick [EMAIL PROTECTED]: I encountered a very strange situation today. I had the following in a web page: s:iterator value=employees s:textfield name=employees[%{key}].id .../ where the get method in my action was: public MapString,Employee getEmployees() The employee id 7932F was being interpreted as 7932! The trailing F was apparently being considered a literal for FLOAT and was being trimmed off the String. When I wrapped the variable in quotes is worked s:textfield name=employees[ '%{key' }].id .../ Does this appear to be a bug? -- View this message in context: http://www.nabble.com/Custom-tag-and-map-backed-action-tp19614086p19614086.html Sent from the Struts - User mailing list archive at Nabble.com. - 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] - 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: 2 newbie questions about Struts and JSP
Hi Alberto, thank you for your answer !!! Very helpful !!! J. -- View this message in context: http://www.nabble.com/2-newbie-questions-about-Struts-and-JSP-tp19627021p19628686.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in using logic:iterate in struts
Hello Alexander, First of all thanx for replying.My code looks very much unclear here.You can refer this link http://forums.sun.com/thread.jspa?threadID=5333420.Again topic_list is my arraylist.I have created it in action class I have set it in request scope.Same arraylist I am using in logic:iterate.Why to create a bean for topic_list?? please solve my doubt...Thanks in advance. Alexander Baetz wrote: UITOT schrieb: Hello all, I have developed 1 application using struts.I am getting this error in my JSP.I have used logic:iterate.I have populated an arraylist in action class which I am using in my JSP.I am able to see the data from the arraylist in my JSP but I am getting error when I am clicking on the hyperlink in JSP.This is the error.Please help me as I am pretty new to struts.Any help will be highly appreciated.Thanx in advance. javax.servlet.jsp.JspException: Cannot find bean: topic_list in any scope I don't know anything about Struts 1 but this looks to me as if you didn't create a bean with the name topic_list anywhere in the code. // this is the statement which is generating error get_threads.do?topic_id=bean:write name= - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/Problem-in-using-logic%3Aiterate-in-struts-tp19622971p19628906.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom tag and map-backed action
I agree totally! If the TypeDeterminer had called getEmployees() which it clearly did for iterator *and* had bothered to glean the generic type of the key, it would have recognized the action expected the key to of type String. If the data type is specifically spelled out and the framework decides a type diametrically opposed, this is a problem.:teeth: Gabriel Belingueres-2 wrote: AFAIK, OGNL does not have any support for generics, but even if it would support it, I would prefer that it wont be too smart, for example in: s:property value=aMap[abc].id/ I prefer that abc be treated as an action property and call method getAbc() than coerce it to the string 'abc'. 2008/9/23 [EMAIL PROTECTED]: Those are all good points, but when my collection was expressly declared to be a MapString, Employee I would sort of expect the key to be a String! When the framework guesses for a different type (feature?) and your application fails; all the discussion about valid number systems is sort of meaningless. Scott On Mon, Sep 22, 2008 at 7:53 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: I don't know but I hope not, since I don't want my expressions to reduce to different data types depending if there is a number or not in them! Even if abc would reduce to the string 'abc', the expression 0xabc reduce to an Integer (have tested it), since it is an hexadecimal number. 2008/9/22 [EMAIL PROTECTED]: I expected the conversion facility or iterator key to be smart enough to recognize my MapString, Employee and setup the internal key variable accordingly. Do you suppose it would have worked if my Map had contained 'abc':emp1, 'def':emp2, 'ghi':emp3? Peace, Scott On Mon, Sep 22, 2008 at 3:47 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: Interesting. Seems it is a feature, as documented in [1]. Tested it myself: s:property value=1234h.class.name / s:property value=1234b.class.name / s:property value=1234F.class.name / s:property value=1234L.class.name / s:property value=1234d.class.name / s:property value=(1234).class.name / The last one (Integer) didn't work without the ( ), which I don't know if this is a necessity or a bug. What about Short and Byte data type? it doesn't say... However, I think is NOT a bug that employees[1234F].id returns nothing, since the map key is a string and you need to quote it accordingly. [1] http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/basicExpressions.html#constants 2008/9/22 stanlick [EMAIL PROTECTED]: I encountered a very strange situation today. I had the following in a web page: s:iterator value=employees s:textfield name=employees[%{key}].id .../ where the get method in my action was: public MapString,Employee getEmployees() The employee id 7932F was being interpreted as 7932! The trailing F was apparently being considered a literal for FLOAT and was being trimmed off the String. When I wrapped the variable in quotes is worked s:textfield name=employees[ '%{key' }].id .../ Does this appear to be a bug? -- View this message in context: http://www.nabble.com/Custom-tag-and-map-backed-action-tp19614086p19614086.html Sent from the Struts - User mailing list archive at Nabble.com. - 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] - 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] -- View this message in context: http://www.nabble.com/Custom-tag-and-map-backed-action-tp19614086p19629362.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: two forms, two submits
Hello I was able to configure it to keep both separate. However now the error is when I submit on a very simple form with the code below it states: No getter method available for property value for bean under name dropDown dropDown is just a collection of LabelValueBean. I just expected on submit for the option value to be the value of the filter and be delivered filter/value to the action. Do I need to create dropDown as a two member object with a value member and an array of LabelValueBean? Thanks to all who responded/viewed. struts table tr td html:select property=filter onchange= option value=All PendingAll Pending/option html:options collection=dropDown property=value labelProperty=label / option value=AllAll/option /html:select tdhtml:submit property=FilterSubmit value=Filter Submit onclick=this.form.submit() //td td/td /tr /table with this html table tr td select name=filter onchange=option value=All PendingAll Pending/option option value=0Option One/option option value=1Option Two/option option value=AllAll/option/select --- On Mon, 9/22/08, Piero Sartini [EMAIL PROTECTED] wrote: From: Piero Sartini [EMAIL PROTECTED] Subject: Re: two forms, two submits To: Struts Users Mailing List user@struts.apache.org Date: Monday, September 22, 2008, 4:26 PM He mentioned html:submit - I guess we are talking about Struts 1, so there are no themes involved. Piero On Monday 22 September 2008 22:14:50 Kawczynski, David wrote: FYI, a theme can be specified in a s:form tag or any of its s: form elements via theme=simple|xhtml|ajax attribute. If you didn't specify one it's using the xhtml theme. Do your forms submit to the same event handler? It would be helpful if we could see the struts.xml and the web pages that house the forms. -Original Message- From: cpanon [mailto:[EMAIL PROTECTED] Sent: Monday, September 22, 2008 3:57 PM To: Struts Users Mailing List Subject: Re: two forms, two submits Hi Pascal I dont understand the use of the word theme. This is a very simplistic jsp that has two forms, each with a different action and a html:submit button that does not work for one of the two forms. I hope I am clearer. It is almost too simple to further describe. tia. Notice: This e-mail message, together with any attachments, contains information of Merck Co., Inc. (One Merck Drive, Whitehouse Station, New Jersey, USA 08889), and/or its affiliates (which may be known outside the United States as Merck Frosst, Merck Sharp Dohme or MSD and in Japan, as Banyu - direct contact information for affiliates is available at http://www.merck.com/contact/contacts.html) that may be confidential, proprietary copyrighted and/or legally privileged. It is intended solely for the use of the individual or entity named on this message. If you are not the intended recipient, and have received this message in error, please notify us immediately by reply e-mail and then delete it from your system. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom tag and map-backed action
I agree too. 2008/9/23 stanlick [EMAIL PROTECTED]: I agree totally! If the TypeDeterminer had called getEmployees() which it clearly did for iterator *and* had bothered to glean the generic type of the key, it would have recognized the action expected the key to of type String. If the data type is specifically spelled out and the framework decides a type diametrically opposed, this is a problem.:teeth: Gabriel Belingueres-2 wrote: AFAIK, OGNL does not have any support for generics, but even if it would support it, I would prefer that it wont be too smart, for example in: s:property value=aMap[abc].id/ I prefer that abc be treated as an action property and call method getAbc() than coerce it to the string 'abc'. 2008/9/23 [EMAIL PROTECTED]: Those are all good points, but when my collection was expressly declared to be a MapString, Employee I would sort of expect the key to be a String! When the framework guesses for a different type (feature?) and your application fails; all the discussion about valid number systems is sort of meaningless. Scott On Mon, Sep 22, 2008 at 7:53 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: I don't know but I hope not, since I don't want my expressions to reduce to different data types depending if there is a number or not in them! Even if abc would reduce to the string 'abc', the expression 0xabc reduce to an Integer (have tested it), since it is an hexadecimal number. 2008/9/22 [EMAIL PROTECTED]: I expected the conversion facility or iterator key to be smart enough to recognize my MapString, Employee and setup the internal key variable accordingly. Do you suppose it would have worked if my Map had contained 'abc':emp1, 'def':emp2, 'ghi':emp3? Peace, Scott On Mon, Sep 22, 2008 at 3:47 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: Interesting. Seems it is a feature, as documented in [1]. Tested it myself: s:property value=1234h.class.name / s:property value=1234b.class.name / s:property value=1234F.class.name / s:property value=1234L.class.name / s:property value=1234d.class.name / s:property value=(1234).class.name / The last one (Integer) didn't work without the ( ), which I don't know if this is a necessity or a bug. What about Short and Byte data type? it doesn't say... However, I think is NOT a bug that employees[1234F].id returns nothing, since the map key is a string and you need to quote it accordingly. [1] http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/basicExpressions.html#constants 2008/9/22 stanlick [EMAIL PROTECTED]: I encountered a very strange situation today. I had the following in a web page: s:iterator value=employees s:textfield name=employees[%{key}].id .../ where the get method in my action was: public MapString,Employee getEmployees() The employee id 7932F was being interpreted as 7932! The trailing F was apparently being considered a literal for FLOAT and was being trimmed off the String. When I wrapped the variable in quotes is worked s:textfield name=employees[ '%{key' }].id .../ Does this appear to be a bug? -- View this message in context: http://www.nabble.com/Custom-tag-and-map-backed-action-tp19614086p19614086.html Sent from the Struts - User mailing list archive at Nabble.com. - 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] - 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] -- View this message in context: http://www.nabble.com/Custom-tag-and-map-backed-action-tp19614086p19629362.html Sent from the Struts - User mailing list archive at Nabble.com. - 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: Is my struts.xml never read?
Yes, it is configured to intercept all requests, and I wouldn't get a Struts error message if the FilterDispatcher didn't launch, would I? And I did post my struts.xml and the URL, but Mr. Dave didn't include it in his reply. Both http://localhost/home.action and http://localhost/random.action return the same error message, see my first post. ---classpath/struts.xml--- ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts constant name=struts.devMode value=true / package name=default namespace=/ extends=struts-default action name=home class=my.package.web.struts.action.HomeAction result/WEB-INF/jsp/page/home.jsp/result /action action name=random class=my.package.web.struts.action.HomeAction result/WEB-INF/jsp/page/home.jsp/result /action /package /struts --end struts.xml-- ---content/WEB-INF/web.xml--- ?xml version=1.0 encoding=UTF-8? web-app id=WebApp_ID version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-nameMyProject/display-name welcome-file-list welcome-fileindex.html/welcome-file welcome-fileindex.htm/welcome-file welcome-fileindex.jsp/welcome-file welcome-filedefault.html/welcome-file welcome-filedefault.htm/welcome-file welcome-filedefault.jsp/welcome-file /welcome-file-list filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping /web-app -end web.xml- Carlos Luis Zúñiga Sibaja wrote: Is the Struts Dispatcher configured in your web.xml to intercept all requests? Carlos Luis Zúñiga Sibaja __ [EMAIL PROTECTED] divide et impera... Alberto A. Flores wrote: please post your struts.xml and the url you are trying to hit. Your web.xml relevant part will also behelpful ... On Mon, Sep 22, 2008 at 5:43 PM, Emil Lundberg [EMAIL PROTECTED]wrote: That's strange... When i set constant name=struts.devMode value=true / in struts.xml, struts goes into devMode, but still doesn't find my action mappings. Did I do something wrong? I've worked with struts before but I just can't seem to get this right for some reason... Could it have something to do with that I'm not using Spring yet in this project? /Emil Dave Newton wrote: --- On Mon, 9/22/08, Emil Lundberg [EMAIL PROTECTED] wrote: I'm having a problem with Struts2 in Eclipse. I've set all the JARs up and the FilterDispatcher launches properly. The problem is that it seems my struts.xml is never read, because I keep getting a message saying There is no Action mapped for namespace / and action name home. - [unknown location] when trying to access http://localhost/home.action (yes, Tomcat is configured to port 80). I've searched all over for a week or so but I still haven't found a solution. I think the problem is where I put struts.xml or some configuration somewhere. Are you deploying it to the root application context? If you put struts.xml at the root of your source directory it should be deployed properly. If you haven't already, turn on devMode. You can also set the XWork and S2 logging to DEBUG to get more of an idea what's happening with the configuration. Dave - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: two forms, two submits
Try this: http://wiki.apache.org/struts/StrutsWidgets#head-d413131b40091e2337eb036c8a7ce9e43f428aec On Tue, Sep 23, 2008 at 7:47 AM, cpanon [EMAIL PROTECTED] wrote: now the error is when I submit on a very simple form with the code below it states: No getter method available for property value for bean under name dropDown dropDown is just a collection of LabelValueBean. I just expected on submit for the option value to be the value of the filter and be delivered filter/value to the action. Do I need to create dropDown as a two member object with a value member and an array of LabelValueBean? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is my struts.xml never read?
I just tried both on my own terminal and these work just fine. Here is a layout of my war: foo - WEB-INF -lib struts2-core.jar (and the other 3 minimum jars you need) -classes -struts.xml -jsp -page -home.jsp -web.xml you said you have a classpath folder? Emil Lundberg wrote: Yes, it is configured to intercept all requests, and I wouldn't get a Struts error message if the FilterDispatcher didn't launch, would I? And I did post my struts.xml and the URL, but Mr. Dave didn't include it in his reply. Both http://localhost/home.action and http://localhost/random.action return the same error message, see my first post. ---classpath/struts.xml--- ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts constant name=struts.devMode value=true / package name=default namespace=/ extends=struts-default action name=home class=my.package.web.struts.action.HomeAction result/WEB-INF/jsp/page/home.jsp/result /action action name=random class=my.package.web.struts.action.HomeAction result/WEB-INF/jsp/page/home.jsp/result /action /package /struts --end struts.xml-- ---content/WEB-INF/web.xml--- ?xml version=1.0 encoding=UTF-8? web-app id=WebApp_ID version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-nameMyProject/display-name welcome-file-list welcome-fileindex.html/welcome-file welcome-fileindex.htm/welcome-file welcome-fileindex.jsp/welcome-file welcome-filedefault.html/welcome-file welcome-filedefault.htm/welcome-file welcome-filedefault.jsp/welcome-file /welcome-file-list filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping /web-app -end web.xml- Carlos Luis Zúñiga Sibaja wrote: Is the Struts Dispatcher configured in your web.xml to intercept all requests? Carlos Luis Zúñiga Sibaja __ [EMAIL PROTECTED] divide et impera... Alberto A. Flores wrote: please post your struts.xml and the url you are trying to hit. Your web.xml relevant part will also behelpful ... On Mon, Sep 22, 2008 at 5:43 PM, Emil Lundberg [EMAIL PROTECTED]wrote: That's strange... When i set constant name=struts.devMode value=true / in struts.xml, struts goes into devMode, but still doesn't find my action mappings. Did I do something wrong? I've worked with struts before but I just can't seem to get this right for some reason... Could it have something to do with that I'm not using Spring yet in this project? /Emil Dave Newton wrote: --- On Mon, 9/22/08, Emil Lundberg [EMAIL PROTECTED] wrote: I'm having a problem with Struts2 in Eclipse. I've set all the JARs up and the FilterDispatcher launches properly. The problem is that it seems my struts.xml is never read, because I keep getting a message saying There is no Action mapped for namespace / and action name home. - [unknown location] when trying to access http://localhost/home.action (yes, Tomcat is configured to port 80). I've searched all over for a week or so but I still haven't found a solution. I think the problem is where I put struts.xml or some configuration somewhere. Are you deploying it to the root application context? If you put struts.xml at the root of your source directory it should be deployed properly. If you haven't already, turn on devMode. You can also set the XWork and S2 logging to DEBUG to get more of an idea what's happening with the configuration. Dave - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- -- Alberto http://www.linkedin.com/in/aflores - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom tag and map-backed action
Sounds reasonable until you remember two words: type erasure. There is no way to 'glean the generic type' of a collection at runtime. L. Gabriel Belingueres wrote: I agree too. 2008/9/23 stanlick [EMAIL PROTECTED]: I agree totally! If the TypeDeterminer had called getEmployees() which it clearly did for iterator *and* had bothered to glean the generic type of the key, it would have recognized the action expected the key to of type String. If the data type is specifically spelled out and the framework decides a type diametrically opposed, this is a problem.:teeth: Gabriel Belingueres-2 wrote: AFAIK, OGNL does not have any support for generics, but even if it would support it, I would prefer that it wont be too smart, for example in: s:property value=aMap[abc].id/ I prefer that abc be treated as an action property and call method getAbc() than coerce it to the string 'abc'. 2008/9/23 [EMAIL PROTECTED]: Those are all good points, but when my collection was expressly declared to be a MapString, Employee I would sort of expect the key to be a String! When the framework guesses for a different type (feature?) and your application fails; all the discussion about valid number systems is sort of meaningless. Scott On Mon, Sep 22, 2008 at 7:53 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: I don't know but I hope not, since I don't want my expressions to reduce to different data types depending if there is a number or not in them! Even if abc would reduce to the string 'abc', the expression 0xabc reduce to an Integer (have tested it), since it is an hexadecimal number. 2008/9/22 [EMAIL PROTECTED]: I expected the conversion facility or iterator key to be smart enough to recognize my MapString, Employee and setup the internal key variable accordingly. Do you suppose it would have worked if my Map had contained 'abc':emp1, 'def':emp2, 'ghi':emp3? Peace, Scott On Mon, Sep 22, 2008 at 3:47 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: Interesting. Seems it is a feature, as documented in [1]. Tested it myself: s:property value=1234h.class.name / s:property value=1234b.class.name / s:property value=1234F.class.name / s:property value=1234L.class.name / s:property value=1234d.class.name / s:property value=(1234).class.name / The last one (Integer) didn't work without the ( ), which I don't know if this is a necessity or a bug. What about Short and Byte data type? it doesn't say... However, I think is NOT a bug that employees[1234F].id returns nothing, since the map key is a string and you need to quote it accordingly. [1] http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/basicExpressions.html#constants 2008/9/22 stanlick [EMAIL PROTECTED]: I encountered a very strange situation today. I had the following in a web page: s:iterator value=employees s:textfield name=employees[%{key}].id .../ where the get method in my action was: public MapString,Employee getEmployees() The employee id 7932F was being interpreted as 7932! The trailing F was apparently being considered a literal for FLOAT and was being trimmed off the String. When I wrapped the variable in quotes is worked s:textfield name=employees[ '%{key' }].id .../ Does this appear to be a bug? -- View this message in context: http://www.nabble.com/Custom-tag-and-map-backed-action-tp19614086p19614086.html Sent from the Struts - User mailing list archive at Nabble.com. - 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] - 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] -- View this message in context: http://www.nabble.com/Custom-tag-and-map-backed-action-tp19614086p19629362.html Sent from the Struts - User mailing list archive at Nabble.com. - 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: Is my struts.xml never read?
You never answered the question about where you were deploying it to: are you deploying it to the root context? Dave --- On Tue, 9/23/08, Emil Lundberg [EMAIL PROTECTED] wrote: Yes, it is configured to intercept all requests, and I wouldn't get a Struts error message if the FilterDispatcher didn't launch, would I? And I did post my struts.xml and the URL, but Mr. Dave didn't include it in his reply. Both http://localhost/home.action and http://localhost/random.action return the same error message, see my first post. ---classpath/struts.xml--- ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts constant name=struts.devMode value=true / package name=default namespace=/ extends=struts-default action name=home class=my.package.web.struts.action.HomeAction result/WEB-INF/jsp/page/home.jsp/result /action action name=random class=my.package.web.struts.action.HomeAction result/WEB-INF/jsp/page/home.jsp/result /action /package /struts --end struts.xml-- ---content/WEB-INF/web.xml--- ?xml version=1.0 encoding=UTF-8? web-app id=WebApp_ID version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-nameMyProject/display-name welcome-file-list welcome-fileindex.html/welcome-file welcome-fileindex.htm/welcome-file welcome-fileindex.jsp/welcome-file welcome-filedefault.html/welcome-file welcome-filedefault.htm/welcome-file welcome-filedefault.jsp/welcome-file /welcome-file-list filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping /web-app -end web.xml- Carlos Luis Zúñiga Sibaja wrote: Is the Struts Dispatcher configured in your web.xml to intercept all requests? Carlos Luis Zúñiga Sibaja __ [EMAIL PROTECTED] divide et impera... Alberto A. Flores wrote: please post your struts.xml and the url you are trying to hit. Your web.xml relevant part will also behelpful ... On Mon, Sep 22, 2008 at 5:43 PM, Emil Lundberg [EMAIL PROTECTED]wrote: That's strange... When i set constant name=struts.devMode value=true / in struts.xml, struts goes into devMode, but still doesn't find my action mappings. Did I do something wrong? I've worked with struts before but I just can't seem to get this right for some reason... Could it have something to do with that I'm not using Spring yet in this project? /Emil Dave Newton wrote: --- On Mon, 9/22/08, Emil Lundberg [EMAIL PROTECTED] wrote: I'm having a problem with Struts2 in Eclipse. I've set all the JARs up and the FilterDispatcher launches properly. The problem is that it seems my struts.xml is never read, because I keep getting a message saying There is no Action mapped for namespace / and action name home. - [unknown location] when trying to access http://localhost/home.action (yes, Tomcat is configured to port 80). I've searched all over for a week or so but I still haven't found a solution. I think the problem is where I put struts.xml or some configuration somewhere. Are you deploying it to the root application context? If you put struts.xml at the root of your source directory it should be deployed properly. If you haven't already, turn on devMode. You can also set the XWork and S2 logging to DEBUG to get more of an idea what's happening with the configuration. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem in using logic:iterate in struts
Unfortunately your struts-config.xml and JSP code didn't make it through to the list properly. Make sure you're sending your message as plain text. A couple of questions: *) How are you accessing the page? (i.e. what URL are you typing?) *) Are you sure you are calling the action before the JSP is rendered? What happens if you put a println at the top of execute() L. UITOT wrote: Hello all, I have developed 1 application using struts.I am getting this error in my JSP.I have used logic:iterate.I have populated an arraylist in action class which I am using in my JSP.I am able to see the data from the arraylist in my JSP but I am getting error when I am clicking on the hyperlink in JSP.This is the error.Please help me as I am pretty new to struts.Any help will be highly appreciated.Thanx in advance. ApplicationDispatcher[/TGMC_DB1-2009] PWC1231: Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Cannot find bean: topic_list in any scope at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935) at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232) at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from :121) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:718) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150) at
Re: Getting acknowledgment for an AJAX request
ManiKanta G wrote: Hi, I m practicing AJAX in S2. And in response to my previous mail, Dave replied That's what Ajax does (loosely speaking): returns HTML fragments (or data as JSON, XML, etc.). That's the point of it--so you don't have to return entire pages and refresh the entire window. So, If I want to acknowledge some AJAX request (say, '2 new records has been added') I just needed the count of how many rows got inserted/updated successfully or a flag indicating the success or failure of the request. And for this I m sure I don't need to return a jsp. How can be this done? through JSON? if yes, can some one point me to some resource to learn using JSON in S2? If all you need to return is a number or true/false, simply write that to the response in your action method and return null (so Struts knows not to try executing any other results for the request). For more complex response data, the JSON plugin would be a good starting place. There's nothing stopping you from generating the response with a JSP, either, it's just not usually the easiest thing to do for an Ajax response. The bottom line is that, once you understand what it is you want to return (a number, a boolean, a JSON data structure, etc.) the means by which you generate that response are up to you. Understand what the response ought to look like first, *then* worry about what your options are for generating it. L. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is my struts.xml never read?
Dave: Like I said, I'm using Eclipse, so I don't really know where everything ends up on the server. I've set the default class directory to project root/build/classes, and that's where struts.xml is. The default content root is project root/content, if that's any help. Alberto: Yes, I have a project root/classpath folder, and it seems to be the same as project root/build/classes, because when I edit classpath/struts.xml, build/classes/struts.xml recieves the same change. What's strange about all this is that struts reads constant name=struts.devMode value=true / and goes into devMode, but doesn't find my actions... /Emil Dave Newton wrote: You never answered the question about where you were deploying it to: are you deploying it to the root context? Dave Alberto Flores skrev: I just tried both on my own terminal and these work just fine. Here is a layout of my war: foo - WEB-INF -lib struts2-core.jar (and the other 3 minimum jars you need) -classes -struts.xml -jsp -page -home.jsp -web.xml you said you have a classpath folder? Emil Lundberg wrote: Yes, it is configured to intercept all requests, and I wouldn't get a Struts error message if the FilterDispatcher didn't launch, would I? And I did post my struts.xml and the URL, but Mr. Dave didn't include it in his reply. Both http://localhost/home.action and http://localhost/random.action return the same error message, see my first post. ---classpath/struts.xml--- ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts constant name=struts.devMode value=true / package name=default namespace=/ extends=struts-default action name=home class=my.package.web.struts.action.HomeAction result/WEB-INF/jsp/page/home.jsp/result /action action name=random class=my.package.web.struts.action.HomeAction result/WEB-INF/jsp/page/home.jsp/result /action /package /struts --end struts.xml-- ---content/WEB-INF/web.xml--- ?xml version=1.0 encoding=UTF-8? web-app id=WebApp_ID version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-nameMyProject/display-name welcome-file-list welcome-fileindex.html/welcome-file welcome-fileindex.htm/welcome-file welcome-fileindex.jsp/welcome-file welcome-filedefault.html/welcome-file welcome-filedefault.htm/welcome-file welcome-filedefault.jsp/welcome-file /welcome-file-list filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping /web-app -end web.xml- Carlos Luis Zúñiga Sibaja wrote: Is the Struts Dispatcher configured in your web.xml to intercept all requests? Carlos Luis Zúñiga Sibaja __ [EMAIL PROTECTED] divide et impera... Alberto A. Flores wrote: please post your struts.xml and the url you are trying to hit. Your web.xml relevant part will also behelpful ... On Mon, Sep 22, 2008 at 5:43 PM, Emil Lundberg [EMAIL PROTECTED]wrote: That's strange... When i set constant name=struts.devMode value=true / in struts.xml, struts goes into devMode, but still doesn't find my action mappings. Did I do something wrong? I've worked with struts before but I just can't seem to get this right for some reason... Could it have something to do with that I'm not using Spring yet in this project? /Emil Dave Newton wrote: --- On Mon, 9/22/08, Emil Lundberg [EMAIL PROTECTED] wrote: I'm having a problem with Struts2 in Eclipse. I've set all the JARs up and the FilterDispatcher launches properly. The problem is that it seems my struts.xml is never read, because I keep getting a message saying There is no Action mapped for namespace / and action name home. - [unknown location] when trying to access http://localhost/home.action (yes, Tomcat is configured to port 80). I've searched all over for a week or so but I still haven't found a solution. I think the problem is where I put struts.xml or some configuration somewhere. Are you deploying it to the root application context? If you put struts.xml at the root of your source directory it should be deployed properly. If you haven't already, turn on devMode. You can also set the XWork and S2 logging to DEBUG to get more of an idea what's happening with the configuration. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Correct usage of datetimepicker?
Hi, I am also facing the problem of invalid field value. I didnt give any validation for the datetimepicker but it validate itself and give this field error. Pls help asap. With Regards, Ashok Torsten Römer wrote: Great, that was quickly fixed :-) I'm looking forward to 2.1.0! Thanks! Torsten Musachy Barroso wrote: I found several problem with the datetimepicker, first (and the worst) is that the names of the input fields (visible and hidden) were switched. Second, the hidden field was storing just the date section of the RFC 3339 format. In short, in the few cases that it worked it was because Xwork tries as a hard as possible to parse dates, using different formats. thanks musachy On 5/8/07, Torsten Römer [EMAIL PROTECTED] wrote: Done! (WW-1917) Hope this is useful, if I can help out in any other way please let me know! BTW there is no such locale en_UK, it should be en_GB, but unfortunately that wasn't the problem. Torsten Musachy Barroso schrieb: Can you log a jira ticket with the details on how to reproduce the problem? https://issues.apache.org/struts/ thanks musachy On 5/8/07, Torsten Römer [EMAIL PROTECTED] wrote: Yes I did, and I also get that far; the datepicker shows up fine, and it inserts the picked date in the field in the format I specified using displayFormat - but when I submit the form I get that validation error. So I am still using String instead of Date and I'm currently trying to get the entered date validated. When this works I am already quite happy. The problem that occurs in case the user has JavaScript disabled I am BTW working around by placing an additional textfield with the same name in a noscript tag. Like this the user can at least enter a date manually. Torsten Musachy Barroso schrieb: Did you look at the examples in showcase? I know the timepicker was really broken on 2.0.6, but the datepicker was working. musachy On 5/8/07, Torsten Römer [EMAIL PROTECTED] wrote: I didn't have any struts.date.format set in my .properties files, but for testing I set it to -MM-dd in all of them but that doesn't seem to have any effect. The date is still shown in dd.MM.yy format, and I get that validation error when request_locale=en_UK. Then I also set displayFormat to -MM-dd but like this I always get a validation error. If I try to set saveFormat I get an exception: SCHWERWIEGEND: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: /page/reservation.jsp(15,1) Attribute saveFormat invalid for tag datetimepicker according to TLD The only way how I can get it to work is to use strings and parse the date myself in the action class. But like this, no validation is done at all. It's a pity because the datetimepicker would be extremely easy to use it looks really nice but it doesn't seem to like me ;-) Torsten Martin Gainty schrieb: please display contents of struts.date.format for both *en_UK.properties and *de_DE.properties files Martin-- This email message and any files transmitted with it contain confidential information intended only for the person(s) to whom this email message is addressed. If you have received this email message in error, please notify the sender immediately by telephone or email and destroy the original message without making a copy. Thank you. - Original Message - From: Musachy Barroso [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Monday, May 07, 2007 8:05 PM Subject: Re: Correct usage of datetimepicker? Using Date for the action field is the way to go. The selected value is submited in RFC 3339 format (that can me modified using the saveFormat attribute, which shouldn't have been public on the first place). I'm not really sure how it would work if the client has javascript disabled. musachy On 5/7/07, Torsten Römer [EMAIL PROTECTED] wrote: I'm a bit unsure about a few things around datetimepicker. What type should the fields in my action class be? I am currently using java.util.Date, it works fine for request_locale=de_DE but I get a Invalid field value for field ... error for request_locale=en_UK and the date redisplayed is NaN.NaN.aN. I don't quite understand this, because the API doc says: The value sent to the server is typically a locale-independent value in a hidden field as defined by the name attribute - but it seems the locale matters anyway? What also confuses me, is the displayFormat attribute. If I set it to e.g. -MM-dd, I always get the Invalid field value for field ... error, regardless of the request_locale. I am also a bit unsure about the format and
Re: Is my struts.xml never read?
(Sorry for the double post) I looked around a bit in the navigator and found this file: ---context-root/.settings/org.eclipse.wst.common.component--- ?xml version=1.0 encoding=UTF-8? project-modules id=moduleCoreId project-version=1.5.0 wb-module deploy-name=MyProject wb-resource deploy-path=/ source-path=/content/ wb-resource deploy-path=/WEB-INF/classes source-path=/src/ wb-resource deploy-path=/WEB-INF/classes source-path=/build/classes/ wb-resource deploy-path=/WEB-INF/classes source-path=/classpath/ property name=context-root value=MyProject/ property name=java-output-path/ /wb-module /project-modules end .settings/org.eclipse.wst.common.component- So it seems struts.xml is deployed to /WEB-INF/classes, not the context root. /Emil Dave Newton skrev: You never answered the question about where you were deploying it to: are you deploying it to the root context? Dave --- On Tue, 9/23/08, Emil Lundberg [EMAIL PROTECTED] wrote: Yes, it is configured to intercept all requests, and I wouldn't get a Struts error message if the FilterDispatcher didn't launch, would I? And I did post my struts.xml and the URL, but Mr. Dave didn't include it in his reply. Both http://localhost/home.action and http://localhost/random.action return the same error message, see my first post. ---classpath/struts.xml--- ?xml version=1.0 encoding=UTF-8? !DOCTYPE struts PUBLIC -//Apache Software Foundation//DTD Struts Configuration 2.0//EN http://struts.apache.org/dtds/struts-2.0.dtd; struts constant name=struts.devMode value=true / package name=default namespace=/ extends=struts-default action name=home class=my.package.web.struts.action.HomeAction result/WEB-INF/jsp/page/home.jsp/result /action action name=random class=my.package.web.struts.action.HomeAction result/WEB-INF/jsp/page/home.jsp/result /action /package /struts --end struts.xml-- ---content/WEB-INF/web.xml--- ?xml version=1.0 encoding=UTF-8? web-app id=WebApp_ID version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; display-nameMyProject/display-name welcome-file-list welcome-fileindex.html/welcome-file welcome-fileindex.htm/welcome-file welcome-fileindex.jsp/welcome-file welcome-filedefault.html/welcome-file welcome-filedefault.htm/welcome-file welcome-filedefault.jsp/welcome-file /welcome-file-list filter filter-namestruts2/filter-name filter-classorg.apache.struts2.dispatcher.FilterDispatcher/filter-class /filter filter-mapping filter-namestruts2/filter-name url-pattern/*/url-pattern /filter-mapping /web-app -end web.xml- Carlos Luis Zúñiga Sibaja wrote: Is the Struts Dispatcher configured in your web.xml to intercept all requests? Carlos Luis Zúñiga Sibaja __ [EMAIL PROTECTED] divide et impera... Alberto A. Flores wrote: please post your struts.xml and the url you are trying to hit. Your web.xml relevant part will also behelpful ... On Mon, Sep 22, 2008 at 5:43 PM, Emil Lundberg [EMAIL PROTECTED]wrote: That's strange... When i set constant name=struts.devMode value=true / in struts.xml, struts goes into devMode, but still doesn't find my action mappings. Did I do something wrong? I've worked with struts before but I just can't seem to get this right for some reason... Could it have something to do with that I'm not using Spring yet in this project? /Emil Dave Newton wrote: --- On Mon, 9/22/08, Emil Lundberg [EMAIL PROTECTED] wrote: I'm having a problem with Struts2 in Eclipse. I've set all the JARs up and the FilterDispatcher launches properly. The problem is that it seems my struts.xml is never read, because I keep getting a message saying There is no Action mapped for namespace / and action name home. - [unknown location] when trying to access http://localhost/home.action (yes, Tomcat is configured to port 80). I've searched all over for a week or so but I still haven't found a solution. I think the problem is where I put struts.xml or some configuration somewhere. Are you deploying it to the root application context? If you put struts.xml at the root of your source directory it should be deployed properly. If you haven't already, turn on devMode. You can also set the XWork and
Re: Is my struts.xml never read?
--- On Tue, 9/23/08, Emil Lundberg wrote: Like I said, I'm using Eclipse, so I don't really know where everything ends up on the server. You'll want to know the application context root. IIRC the default is that Eclipse will create an application context with the same name as the project--you'd need to specifically tell it to deploy at the root context. If you look at your servers you should see the apps that are deployed to it. From there you can find the context root (or somewhere around there). Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Is my struts.xml never read?
--- On Tue, 9/23/08, Emil Lundberg wrote: (Sorry for the double post) I looked around a bit in the navigator and found this file: project-modules id=moduleCoreId project-version=1.5.0 wb-module deploy-name=MyProject wb-resource deploy-path=/ source-path=/content/ wb-resource deploy-path=/WEB-INF/classes source-path=/src/ wb-resource deploy-path=/WEB-INF/classes source-path=/build/classes/ wb-resource deploy-path=/WEB-INF/classes source-path=/classpath/ property name=context-root value=MyProject/ property name=java-output-path/ /wb-module /project-modules So it seems struts.xml is deployed to /WEB-INF/classes, not the context root. The struts.xml file should be deployed to the classpath; this is correct behavior. See that context-root property? That's the *application context* (which you can discover more easily than that). Your URLs, then, will look like this: http://localhost/MyProject/baz.action Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Custom tag and map-backed action
http://www.google.com/gwt/n?eosr=onq=Reflection+generics+Java+source=mhl=enei=ZWfZSODxI5nYqAKR1t53sa=Xoi=blendedct=rescd=4rd=1u=http%3A%2F%2Ftutorials.jenkov.com%2Fjava-reflection%2Fgenerics.html On 9/23/08, Laurie Harper [EMAIL PROTECTED] wrote: Sounds reasonable until you remember two words: type erasure. There is no way to 'glean the generic type' of a collection at runtime. L. Gabriel Belingueres wrote: I agree too. 2008/9/23 stanlick [EMAIL PROTECTED]: I agree totally! If the TypeDeterminer had called getEmployees() which it clearly did for iterator *and* had bothered to glean the generic type of the key, it would have recognized the action expected the key to of type String. If the data type is specifically spelled out and the framework decides a type diametrically opposed, this is a problem.:teeth: Gabriel Belingueres-2 wrote: AFAIK, OGNL does not have any support for generics, but even if it would support it, I would prefer that it wont be too smart, for example in: s:property value=aMap[abc].id/ I prefer that abc be treated as an action property and call method getAbc() than coerce it to the string 'abc'. 2008/9/23 [EMAIL PROTECTED]: Those are all good points, but when my collection was expressly declared to be a MapString, Employee I would sort of expect the key to be a String! When the framework guesses for a different type (feature?) and your application fails; all the discussion about valid number systems is sort of meaningless. Scott On Mon, Sep 22, 2008 at 7:53 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: I don't know but I hope not, since I don't want my expressions to reduce to different data types depending if there is a number or not in them! Even if abc would reduce to the string 'abc', the expression 0xabc reduce to an Integer (have tested it), since it is an hexadecimal number. 2008/9/22 [EMAIL PROTECTED]: I expected the conversion facility or iterator key to be smart enough to recognize my MapString, Employee and setup the internal key variable accordingly. Do you suppose it would have worked if my Map had contained 'abc':emp1, 'def':emp2, 'ghi':emp3? Peace, Scott On Mon, Sep 22, 2008 at 3:47 PM, Gabriel Belingueres [EMAIL PROTECTED]wrote: Interesting. Seems it is a feature, as documented in [1]. Tested it myself: s:property value=1234h.class.name / s:property value=1234b.class.name / s:property value=1234F.class.name / s:property value=1234L.class.name / s:property value=1234d.class.name / s:property value=(1234).class.name / The last one (Integer) didn't work without the ( ), which I don't know if this is a necessity or a bug. What about Short and Byte data type? it doesn't say... However, I think is NOT a bug that employees[1234F].id returns nothing, since the map key is a string and you need to quote it accordingly. [1] http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/basicExpressions.html#constants 2008/9/22 stanlick [EMAIL PROTECTED]: I encountered a very strange situation today. I had the following in a web page: s:iterator value=employees s:textfield name=employees[%{key}].id .../ where the get method in my action was: public MapString,Employee getEmployees() The employee id 7932F was being interpreted as 7932! The trailing F was apparently being considered a literal for FLOAT and was being trimmed off the String. When I wrapped the variable in quotes is worked s:textfield name=employees[ '%{key' }].id .../ Does this appear to be a bug? -- View this message in context: http://www.nabble.com/Custom-tag-and-map-backed-action-tp19614086p19614086.html Sent from the Struts - User mailing list archive at Nabble.com. - 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] - 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] -- View this message in context: http://www.nabble.com/Custom-tag-and-map-backed-action-tp19614086p19629362.html Sent from the Struts - User mailing list archive at Nabble.com. - 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: How to write variable in a Struts 2 tag?
newton.dave wrote: --- bugs_ [EMAIL PROTECTED] wrote: I must find some good tutorial for ognl http://struts.apache.org/2.x/docs/ognl.html http://struts.apache.org/2.x/docs/ognl-basics.html http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/index.html Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] I don't normally register to reply or thank people for stuff, but this was really annoying me, and your quote made me read OGNL doco's. Worked really well, thanks. Rod -- View this message in context: http://www.nabble.com/How-to-write-variable-in-a-Struts-2-tag--tp15981156p19638275.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Best Practice for Transfer Data from Action to Viewer JSP?
Hi, I am new to struts. I am using Struts 1.2.9. I have two String arrays generated in an action should go to the JSP pages html:options. I can set it as an attribute in request/session and pull them in jsp pages. But it seems a bit against the idea of separation between model and view. If I change the view from JSP then there might be some difficulty to pull the object out. Is there any other ways to do this? What will be the best practice for a thing like this? Thanks. Guojun
Re: Problem in using logic:iterate in struts
Hello Laurie, Thanx a lot for replying.Let me tell you the exact scenario.I am developing a discussion forum for my Project.There is one JSP called View_topic.jsp.This will display the list of all topics in the Discussion Forum.Before this JSP one action class say view_topics_Action is getting called which is setting the arraylist for topics say topic_list in request scope.This list is getting displayed using logic:iterate in view_topic.jsp.No problem till here.Now when user clicks on a particular topic I want that all the threads related to that topic should get displayed.So I have made each topic as a Hyperlink.Now when user clicks on a particular topic I want the topic_id to get passed to some action class say view_threads_Action which will take care of retrieving the Threads details for that topic if it is successful it will call another JSP say View_threads.jsp. Now I don't have any problem in displaying topic list.I am getting error only when I am clicking on the hyperlink.The error is in JSP view_topic.jsp only so it not going to action class view_threads_Action. I hope I am able to explain my problem.Please help.Thanx. Laurie Harper wrote: Unfortunately your struts-config.xml and JSP code didn't make it through to the list properly. Make sure you're sending your message as plain text. A couple of questions: *) How are you accessing the page? (i.e. what URL are you typing?) *) Are you sure you are calling the action before the JSP is rendered? What happens if you put a println at the top of execute() L. UITOT wrote: Hello all, I have developed 1 application using struts.I am getting this error in my JSP.I have used logic:iterate.I have populated an arraylist in action class which I am using in my JSP.I am able to see the data from the arraylist in my JSP but I am getting error when I am clicking on the hyperlink in JSP.This is the error.Please help me as I am pretty new to struts.Any help will be highly appreciated.Thanx in advance. ApplicationDispatcher[/TGMC_DB1-2009] PWC1231: Servlet.service() for servlet jsp threw exception javax.servlet.jsp.JspException: Cannot find bean: topic_list in any scope at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935) at org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:232) at org.apache.jsp.viewThreads_jsp._jspService(viewThreads_jsp.java from :121) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at org.apache.catalina.core.ApplicationDispatcher.doInvoke(ApplicationDispatcher.java:853) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:703) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:542) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:474) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:366) at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085) at org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263) at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398) at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) at javax.servlet.http.HttpServlet.service(HttpServlet.java:718) at javax.servlet.http.HttpServlet.service(HttpServlet.java:831) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198) at