Re: Reduce Java Script Depecency in Struts 2
Hi Hantsy, Jose, thanks, we'll take a look at the plug in. Best Regards Yanto On Wed, Oct 6, 2010 at 11:48 AM, Jose A. Corbacho mcco...@gmail.com wrote: I meant, yep, using the plugin provided for jQuery. On Wed, Oct 6, 2010 at 10:40 AM, Hantsy Bai han...@gmail.com wrote: There is a project which integrated JQuery into Struts2... http://code.google.com/p/struts2-jquery/ The dojo plugin shipped with Struts 2 is too old... Hantsy 于 2010/10/6 11:28, Jose A. Corbacho 写道: I changed to jQuery not long time ago and I have to say the system has improved its performance (I was using before the dojo plugin) as well as the code being cleaner. You'll still need to do some javascripting but using jQuery API that is, as said, cleaner. On Wed, Oct 6, 2010 at 10:05 AM, Yanto Bongyantob...@gmail.com wrote: Hi All, We've use Struts 2+Spring+Hibernate as our framework and use JSP as the UI. After we review the application, our application having quite a lot Java Script that cause certain form not working propertly in one of the browser. Any suggesstion how we can reduce Java Script in the JSP ? is the JQuery is a good option ? Best Regards Yanto - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
STRUTS example not running
hello I'm learning struts but an example i followed from the net isn't working...can anybody look into this ? i've uploaded the war file...plz help me out |test\ ||helloworld.jsp ||index.jsp ||META-INF\ ||WEB-INF\ |||WEB.XML |||CLASSES\ |||LIB\ STRUTS.XML user\ |helloworld.class |helloworld.java http://old.nabble.com/file/p29893890/test1.war test1.war i get this error: HTTP Status 404 - /test1/index.jsp type Status report message /test1/index.jsp description The requested resource (/test1/index.jsp) is not available. http://old.nabble.com/file/p29893890/test1.war test1.war -- View this message in context: http://old.nabble.com/STRUTS-example-not-running-tp29893890p29893890.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: STRUTS example not running
Required dependencies missing (You'll notice that WEB-INF/lib directory is empty). This is not the right example for starting. Try to download struts-blank application at http://apache.panu.it//struts/examples/struts2-blank-2.0.14.war Maurizio Cucchiara 2010/10/6 ir2pi ir2...@gmail.com: hello I'm learning struts but an example i followed from the net isn't working...can anybody look into this ? i've uploaded the war file...plz help me out |test\ ||helloworld.jsp ||index.jsp ||META-INF\ ||WEB-INF\ |||WEB.XML |||CLASSES\ |||LIB\ STRUTS.XML user\ |helloworld.class |helloworld.java http://old.nabble.com/file/p29893890/test1.war test1.war i get this error: HTTP Status 404 - /test1/index.jsp type Status report message /test1/index.jsp description The requested resource (/test1/index.jsp) is not available. http://old.nabble.com/file/p29893890/test1.war test1.war -- View this message in context: http://old.nabble.com/STRUTS-example-not-running-tp29893890p29893890.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Setting Content-Length for monitoring response progress in user agent
Hi. I'm developing an HTTP client application that is requesting to a St2 application that delivers xml content. I need to show the response progress to the user and that means I need to buffer the output, calculate the content length and set the Content-Length header before sending any data in the response. 1. Does Struts2 provides a way or achieving this without having to deal directly with servlet specification? 2. In case it does not, how should I do this? By means of an interceptor? A custom servlet filter? 3. How does this buffering affect the performance of the application and the container? Should I avoid it and reject the idea of displaying the response progress? Thanks and regards. Antonio. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Logging not working
Hi, I can't seem to get any errors to appear when struts goes wrong (action trying to set/get an attribute that doesn't exist etc). I have the commons-logging-1.1.jar file in my project-root/WEB-INF/lib folder and have the constant name=struts.devMode value=true / line in my struts.xml file. Despite this I have never seen an error in my log files. Is there something im missing here? Would the errors appear in the same log as servlet exceptions (tomcat/logs/localhost.-xx-xx.log)? Thanks in advanced, Darren - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Logging not working
try the tag s:debug/ on the page Regards, Mead On Wed, Oct 6, 2010 at 9:37 PM, Darren Karstens darrenkarst...@gmail.comwrote: Hi, I can't seem to get any errors to appear when struts goes wrong (action trying to set/get an attribute that doesn't exist etc). I have the commons-logging-1.1.jar file in my project-root/WEB-INF/lib folder and have the constant name=struts.devMode value=true / line in my struts.xml file. Despite this I have never seen an error in my log files. Is there something im missing here? Would the errors appear in the same log as servlet exceptions (tomcat/logs/localhost.-xx-xx.log)? Thanks in advanced, Darren - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Reduce Java Script Depecency in Struts 2
I haven't used the jQuery plugin but I would highly recommend just using straight jQuery. I've been very impressed with how easy it is to use and how much you can accomplish with very little jQuery code. As far as the jQuery plugin goes; it appears to give you a bunch of snazzy UI elements via jsp tags without having to actually learn jQuery. If that is what you are looking for, great, but, IMHO you are missing out on the full power of jQuery and adding a dependency on a 3rd party plugin which is rapidly changing. Recall lessons learned from all those who went with the Dojo plugin. On Wed, Oct 6, 2010 at 2:15 AM, Yanto Bong yantob...@gmail.com wrote: Hi Hantsy, Jose, thanks, we'll take a look at the plug in. Best Regards Yanto On Wed, Oct 6, 2010 at 11:48 AM, Jose A. Corbacho mcco...@gmail.com wrote: I meant, yep, using the plugin provided for jQuery. On Wed, Oct 6, 2010 at 10:40 AM, Hantsy Bai han...@gmail.com wrote: There is a project which integrated JQuery into Struts2... http://code.google.com/p/struts2-jquery/ The dojo plugin shipped with Struts 2 is too old... Hantsy 于 2010/10/6 11:28, Jose A. Corbacho 写道: I changed to jQuery not long time ago and I have to say the system has improved its performance (I was using before the dojo plugin) as well as the code being cleaner. You'll still need to do some javascripting but using jQuery API that is, as said, cleaner. On Wed, Oct 6, 2010 at 10:05 AM, Yanto Bongyantob...@gmail.com wrote: Hi All, We've use Struts 2+Spring+Hibernate as our framework and use JSP as the UI. After we review the application, our application having quite a lot Java Script that cause certain form not working propertly in one of the browser. Any suggesstion how we can reduce Java Script in the JSP ? is the JQuery is a good option ? Best Regards Yanto - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Reduce Java Script Depecency in Struts 2
Greg is right. JQuery is very easy to use and provides a new approach to write non-intrusive javascript. Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Logging not working
The s:debug/ tag worked, thanks that will come in handy. I would still like to get errors reporting in the logs, any got any ideas? On Wed, Oct 6, 2010 at 2:39 PM, Mead Lai laiqi...@gmail.com wrote: try the tag s:debug/ on the page Regards, Mead On Wed, Oct 6, 2010 at 9:37 PM, Darren Karstens darrenkarst...@gmail.comwrote: Hi, I can't seem to get any errors to appear when struts goes wrong (action trying to set/get an attribute that doesn't exist etc). I have the commons-logging-1.1.jar file in my project-root/WEB-INF/lib folder and have the constant name=struts.devMode value=true / line in my struts.xml file. Despite this I have never seen an error in my log files. Is there something im missing here? Would the errors appear in the same log as servlet exceptions (tomcat/logs/localhost.-xx-xx.log)? Thanks in advanced, Darren - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Logging not working
What do you have your log levels configured as? For struts, xwork, and OGNL? Dave On Wed, Oct 6, 2010 at 10:39 AM, Darren Karstens darrenkarst...@gmail.comwrote: The s:debug/ tag worked, thanks that will come in handy. I would still like to get errors reporting in the logs, any got any ideas? On Wed, Oct 6, 2010 at 2:39 PM, Mead Lai laiqi...@gmail.com wrote: try the tag s:debug/ on the page Regards, Mead On Wed, Oct 6, 2010 at 9:37 PM, Darren Karstens darrenkarst...@gmail.comwrote: Hi, I can't seem to get any errors to appear when struts goes wrong (action trying to set/get an attribute that doesn't exist etc). I have the commons-logging-1.1.jar file in my project-root/WEB-INF/lib folder and have the constant name=struts.devMode value=true / line in my struts.xml file. Despite this I have never seen an error in my log files. Is there something im missing here? Would the errors appear in the same log as servlet exceptions (tomcat/logs/localhost.-xx-xx.log)? Thanks in advanced, Darren - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Setting Content-Length for monitoring response progress in user agent
You could use StreamResult: package name=test namespace=/test extends=struts-default action name=stream class=it.xxx.StreamAction result type=stream param name=contentType${mimeType}/param param name=contentLength${length}/param param name=contentDispositioninline; filename=${fileName}/param param name=inputNameinputStream/param param name=bufferSize1024/param param name=allowCachingfalse/param /result /action /package public class StreamAction { private String fileName; private int buffSize = 1024; private BufferedInputStream fileStream; private long length; public String execute() throws Exception { File f = new File(fileName); FileInputStream fis = new FileInputStream(f); length=f.length(); fileStream = new BufferedInputStream(fis, buffSize); return Action.SUCCESS; } public InputStream getInputStream() { return fileStream; } public String getMimeType() { return application/x-pdf; } public long getLength() { return length; } public String getFileName() { return fileName; } public int getBuffSize() { return buffSize; } } -- Maurizio Cucchiara - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Reduce Java Script Depecency in Struts 2
I've tried the jquery plugin, but it just doesn't work for me. A bug in publishing and subscribing to topics had been ignored on the Google Groups site for it since July, but once I just wrote the straight jquery code it worked fine. I also didn't want to resort to Javascript to put content into a grid column with the grid plugin. It's still in my project for the parts that DO work: tabs and themes. Jason On Wed, Oct 6, 2010 at 8:41 AM, Greg Lindholm greg.lindh...@gmail.comwrote: I haven't used the jQuery plugin but I would highly recommend just using straight jQuery. I've been very impressed with how easy it is to use and how much you can accomplish with very little jQuery code. As far as the jQuery plugin goes; it appears to give you a bunch of snazzy UI elements via jsp tags without having to actually learn jQuery. If that is what you are looking for, great, but, IMHO you are missing out on the full power of jQuery and adding a dependency on a 3rd party plugin which is rapidly changing. Recall lessons learned from all those who went with the Dojo plugin. On Wed, Oct 6, 2010 at 2:15 AM, Yanto Bong yantob...@gmail.com wrote: Hi Hantsy, Jose, thanks, we'll take a look at the plug in. Best Regards Yanto On Wed, Oct 6, 2010 at 11:48 AM, Jose A. Corbacho mcco...@gmail.com wrote: I meant, yep, using the plugin provided for jQuery. On Wed, Oct 6, 2010 at 10:40 AM, Hantsy Bai han...@gmail.com wrote: There is a project which integrated JQuery into Struts2... http://code.google.com/p/struts2-jquery/ The dojo plugin shipped with Struts 2 is too old... Hantsy 于 2010/10/6 11:28, Jose A. Corbacho 写道: I changed to jQuery not long time ago and I have to say the system has improved its performance (I was using before the dojo plugin) as well as the code being cleaner. You'll still need to do some javascripting but using jQuery API that is, as said, cleaner. On Wed, Oct 6, 2010 at 10:05 AM, Yanto Bongyantob...@gmail.com wrote: Hi All, We've use Struts 2+Spring+Hibernate as our framework and use JSP as the UI. After we review the application, our application having quite a lot Java Script that cause certain form not working propertly in one of the browser. Any suggesstion how we can reduce Java Script in the JSP ? is the JQuery is a good option ? Best Regards Yanto - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Translation issue
Hello, i would like to display in a multi language page a select field where you choose your gender. in my action i define the list with the translation keys: gender = new HashMapInteger, String(); gender.put(0, user.gender.female); gender.put(1, user.gender.male); the jsp contains: s:select key=user.gender name=user.gender list=gender value=%{getText()} / the dropdown field is created properly - nearly. The translation keys user.gender.female are not translated the field shows the translation key. I do STFW myself and i have found nothing about. But i can't be alone with that problem? TIA Daniel signature.asc Description: This is a digitally signed message part
Apidocs locally
Hi. I need the javadoc api working locally. Does it exist a bundle to download? Or How can I generate the javadoc from source code using maven? I've never used maven and I'm having problems with it. From src directory I type: mvn javadoc:javadoc or mvn javadoc:aggregate But it complains: [INFO] Cannot execute mojo: resources. It requires a project with an existing pom.xml, but the build is not using one. Thanks. Antonio. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Translation issue
Why don't you simply move your translation process in this manner: gender.add(getText(user.gender.female)); gender.add(getText(user.gender.male)); Maurizio Cucchiara 2010/10/6 Daniel Rindt dri...@visetics.com: Hello, i would like to display in a multi language page a select field where you choose your gender. in my action i define the list with the translation keys: gender = new HashMapInteger, String(); gender.put(0, user.gender.female); gender.put(1, user.gender.male); the jsp contains: s:select key=user.gender name=user.gender list=gender value=%{getText()} / the dropdown field is created properly - nearly. The translation keys user.gender.female are not translated the field shows the translation key. I do STFW myself and i have found nothing about. But i can't be alone with that problem? TIA Daniel - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Apidocs locally
Try to launch in project root directory (on level up of src directory) Maurizio Cucchiara 2010/10/6 Antonio Sánchez inganto...@gmail.com: Hi. I need the javadoc api working locally. Does it exist a bundle to download? Or How can I generate the javadoc from source code using maven? I've never used maven and I'm having problems with it. From src directory I type: mvn javadoc:javadoc or mvn javadoc:aggregate But it complains: [INFO] Cannot execute mojo: resources. It requires a project with an existing pom.xml, but the build is not using one. Thanks. Antonio. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
OGNL and init params
No matter how hard I look, I can't find the answer to this (admittedly newbie) question. How do you get access to the values of init parameters or context parameters declared in your web.xml file in your jsp page? Can they be accessed through ognl? A related question ... is there a good reference showing exactly what is in the various struts2 scopes such as session, application, etc. Thanks, David
Re: Translation issue
Am Mittwoch, den 06.10.2010, 21:39 +0200 schrieb Maurizio Cucchiara: gender.add(getText(user.gender.female)); gender.add(getText(user.gender.male)); you ever tried that? I used it in the prepare method, and i don't know why but at lot of page request the getText is returning the wrong translation. signature.asc Description: This is a digitally signed message part
Re: Logging not working
If you want to record the ServerError, like ServletException, you can config the Tomcat Server logging, ref the document from Apache.org Regards, Mead On Wed, Oct 6, 2010 at 10:44 PM, Dave Newton davelnew...@gmail.com wrote: What do you have your log levels configured as? For struts, xwork, and OGNL? Dave On Wed, Oct 6, 2010 at 10:39 AM, Darren Karstens darrenkarst...@gmail.comwrote: The s:debug/ tag worked, thanks that will come in handy. I would still like to get errors reporting in the logs, any got any ideas? On Wed, Oct 6, 2010 at 2:39 PM, Mead Lai laiqi...@gmail.com wrote: try the tag s:debug/ on the page Regards, Mead On Wed, Oct 6, 2010 at 9:37 PM, Darren Karstens darrenkarst...@gmail.comwrote: Hi, I can't seem to get any errors to appear when struts goes wrong (action trying to set/get an attribute that doesn't exist etc). I have the commons-logging-1.1.jar file in my project-root/WEB-INF/lib folder and have the constant name=struts.devMode value=true / line in my struts.xml file. Despite this I have never seen an error in my log files. Is there something im missing here? Would the errors appear in the same log as servlet exceptions (tomcat/logs/localhost.-xx-xx.log)? Thanks in advanced, Darren - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Translation issue
Alternatively you could use: s:select key=user.gender listValue=getText(value) name=user.gender list=gender / s:select key=user.gender list=#{'0':getText('user.gender.male'), '1':getText('user.gender.female')} name=user.gender2 / Maurizio Cucchiara 2010/10/7 Daniel Rindt dri...@visetics.com: Am Mittwoch, den 06.10.2010, 21:39 +0200 schrieb Maurizio Cucchiara: gender.add(getText(user.gender.female)); gender.add(getText(user.gender.male)); you ever tried that? I used it in the prepare method, and i don't know why but at lot of page request the getText is returning the wrong translation. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: urls and iterations
Hi , Piotrek. It was an insufficient explanation. s:a tag use Rendering template /template/simple/a.ftl bad, At each iterator reading template. It is understood that the following programs work hard from the debug log. ex : XWorkConverter , FreemarkerTemplateEngine , UIBean Therefore, s:a was not used because of the repetition, and it proposed the idea of which it displayed the character string. A part of correction was added because it had seemed to be confused with the environment variable. JSP table border=1 class=threads s:iterator value=tableValues s:url var=show_url action=showThread s:param name=threadId value=%{id} / /s:url tr tds:property value=id //td tda href='s:property value=%{show_url} /'show/a/td /tr /s:iterator /table Thank you very well ..receiving stimulation... It apologizes while studying English because of poor English. Thanks Kou
Re: OGNL and init params
You would be able to access through ognl or more simply inside your action. ognl syntax, using implicit objects: s:property value=#application['simpleParamName']/ In order to get access inside your action, you have to implement ApplicationAware interface. Take a look at the bottom of this page http://struts.apache.org/2.0.14/docs/ognl-basics.html Maurizio Cucchiara 2010/10/6 Altenhof, David Aron dalte...@iupui.edu: No matter how hard I look, I can't find the answer to this (admittedly newbie) question. How do you get access to the values of init parameters or context parameters declared in your web.xml file in your jsp page? Can they be accessed through ognl? A related question ... is there a good reference showing exactly what is in the various struts2 scopes such as session, application, etc. Thanks, David - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org