How to use XSL Result
Hi, I am trying to create a simple XML output using Struts 2 (2.6.1). Following tips from this list I chose to use an action with xsl result (although writing/debugging an extra XSLT in my case is just a nice exercise). I am looking for some documentation about the XML (resp. DOM) the XSLT is to process. I only find some examples but nothing comprehensive. Especially the handling of map properties is important to me. It seems a node called "entry" with children "key" and "value" is created? I tried to use no stylesheet at all as some of the posters/bloggers in the web suggest but I only get error messages that no location (of the stylesheet?) has been specified. Could someone please help? Thanks! Martin - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Aw: Re: [s2] strange (for me) OGNL behavior
Thanks Jim, that is the explanation I needed. I can't get rid of the name attribute, but I can live with the stack traces in my log file. Martin - Original Nachricht Von: Jim Kiley An: Struts Users Mailing List Datum: 29.05.2009 14:45 Betreff: Re: [s2] strange (for me) OGNL behavior > Whenever you click an HTML button with your mouse, the browser will submit > the X and Y coordinates of the area that you clicked. This is to support > image maps. By giving the submit button a name (I think), the browser > tries > to provide those X and Y coordinates with respect to the button's name > (thus > name.x and name.y). Struts is trying to parse those input parameters but > because you probably don't have an object in your action class that has the > name that your submit button has, it is lost. > This error won't actually cause you any real problems, but if you want to > get rid of it I think you'll want to get rid of the 'name' attribute on > your > submit button. > > jk > > On Fri, May 29, 2009 at 5:46 AM, wrote: > > > Hi, > > > > OGNL is a great mystery for me. It does magic and - well - strange > things. > > :-) > > Perhaps you can help me out. > > > > The situation: > > I have a S2 (2.16) site where I use on some pages a form like this: > > > > > > > name="plzs_submit" cssStyle="margin-left: 5px;" /> > > > > > > This works great. > > > > The problem: > > when pressing the Submit-button, Struts throws exceptions that it (OGNL) > > cannot set the properties x and y which do not exist. > > This does not stop my app from working, its just ugly. > > > > Looking a bit into the problem I found that the form tries to transfer > > plzs_submit.x and plzs_submit.y and this causes the problem. > > > > I am puzzled. > > > > Any explanation and hint for stopping this will be greatly appreciated. > > > > Martin > > > > +--- > > Dipl. inf. Martin Kindler > > Julius-Leber-Str. 8 > > D-76448 Durmersheim > > > > Tel. +49 (0)7245 80 48 774 > > GSM +49 (0)160 977 636 14 > > > > - > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > > For additional commands, e-mail: user-h...@struts.apache.org > > > > > > > -- > Jim Kiley > Senior Technical Consultant | Summa > [p] 412.258.3346 > http://www.summa-tech.com > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[s2] strange (for me) OGNL behavior
Hi, OGNL is a great mystery for me. It does magic and - well - strange things. :-) Perhaps you can help me out. The situation: I have a S2 (2.16) site where I use on some pages a form like this: This works great. The problem: when pressing the Submit-button, Struts throws exceptions that it (OGNL) cannot set the properties x and y which do not exist. This does not stop my app from working, its just ugly. Looking a bit into the problem I found that the form tries to transfer plzs_submit.x and plzs_submit.y and this causes the problem. I am puzzled. Any explanation and hint for stopping this will be greatly appreciated. Martin +--- Dipl. inf. Martin Kindler Julius-Leber-Str. 8 D-76448 Durmersheim Tel. +49 (0)7245 80 48 774 GSM +49 (0)160 977 636 14 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Aw: Re: Aw: [s2] Using UTF-8 in .properties files
It is definitely possible to develop non-English applications using resource bundles. I typically put the Unicode codes (\u) in the .properties files when developing apps which must support e. g. cyrillic text. This is not as comfortable as it could be, but there are web based converters from non-ASCII text to unicode code sequences. And then: copy & paste. If you have to deal with a lot of text, it might be worthwhile to look for ResourceBundle extensions capable of real Unicode text. Martin - Original Nachricht Von: Cristian Peraferrer An: Struts Users Mailing List Datum: 09.04.2009 11:52 Betreff: Re: Aw: [s2] Using UTF-8 in .properties files > So, is it possible to *really* develop internationalized struts web > apps? How can I add chinese or japanese, if the way to > internationalize it isn't capable to use other encoding than ASCII? I > can't understand that. > > Any idea? > > Thanks, > Cristian. > > On 09/04/2009, at 11:39, kindl...@arcor.de wrote: > > > If you look in the Java docs, you will see this is not > > possible. .properties files are always ASCII. The only possibility > > to include non-ASCII characters is using the Unicode codes \u. I > > do hate this. > > > > There might be a way to extend the resource bundle framework to > > support files using other encodings, but I never found a ready-to- > > use package and writing it myself was never worthwhile. > > > > Martin > > > > > > - Original Nachricht > > Von: Cristian Peraferrer > > An: user@struts.apache.org > > Datum: 09.04.2009 11:28 > > Betreff: [s2] Using UTF-8 in .properties files > > > >> Hi, > >> > >> How I can use UTF-8 in the .properties files? (I need the .properties > >> files for i18n, so loggically I will need characters other than the > >> contained in ASCII or latin1). > >> > >> Thanks, > >> Cristian. > >> > >> -- > >> GPG Key-ID: 0x564903FA - Jabber ID: corellian at swissjabber.ch > >> > >> > >> - > >> 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 > > > > -- > GPG Key-ID: 0x564903FA - Jabber ID: corellian at swissjabber.ch > > > - > 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
Aw: [s2] Using UTF-8 in .properties files
If you look in the Java docs, you will see this is not possible. .properties files are always ASCII. The only possibility to include non-ASCII characters is using the Unicode codes \u. I do hate this. There might be a way to extend the resource bundle framework to support files using other encodings, but I never found a ready-to-use package and writing it myself was never worthwhile. Martin - Original Nachricht Von: Cristian Peraferrer An: user@struts.apache.org Datum: 09.04.2009 11:28 Betreff: [s2] Using UTF-8 in .properties files > Hi, > > How I can use UTF-8 in the .properties files? (I need the .properties > files for i18n, so loggically I will need characters other than the > contained in ASCII or latin1). > > Thanks, > Cristian. > > -- > GPG Key-ID: 0x564903FA - Jabber ID: corellian at swissjabber.ch > > > - > 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
Aw: Re: minimal app server for embedded Struts1 or 2 solution
Scott, this is a little internal application which imports data from several systems into our CMS. We support a lot of these "importers". These run typically on dedicated machines and should be rapidly installable. If I would choose to make it a web application deployable on an application server this would mean a big maintenance overhead. I am simply looking for a better solution for an administrative interface than just hitting the command line. Martin - Original Nachricht Von: [EMAIL PROTECTED] An: Struts Users Mailing List Datum: 23.06.2008 16:38 Betreff: Re: minimal app server for embedded Struts1 or 2 solution > This sounds a little suspicious! When you say " I cannot assume a Servlet > container to be installed on machines my app will run on" what do you mean? > I would hope you are planning to host this from a server someplace, right? > Not sure about your environment, but you could always use an ISP to host > your Struts application. I use DailyRazor and have full control over the > server and none of the headaches of babysitting the machinery. > > Scott > > On Mon, Jun 23, 2008 at 7:08 AM, <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > I am currently working on a little application which needs a user > interface > > for administration. I think an embedded app server with a Struts based > > application might be a good choice. But one big obstacle is in the way, I > > fear: the size of such a solution. > > What do you think is the minimal solution giving the comfort of a Struts > > based approach and not dominating the workhorse app with tons of jars > only > > needed for the small admin part? > > Jetty as an App server? Or Tomcat? Or some other, really small? Struts 1 > or > > 2 (I would think Struts1 is the smaller solution)? Or shouldn't I attempt > > this approach and write a simple servlet? What do you do? > > I cannot assume a Servlet container to be installed on machines my app > will > > run on. There might be multiple instances of my app running on the same > > machine. The UI should work over the network although a console based > > approach might be possible, too. > > > > Thanks in advance > > > > Martin > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Scott > [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
minimal app server for embedded Struts1 or 2 solution
Hi, I am currently working on a little application which needs a user interface for administration. I think an embedded app server with a Struts based application might be a good choice. But one big obstacle is in the way, I fear: the size of such a solution. What do you think is the minimal solution giving the comfort of a Struts based approach and not dominating the workhorse app with tons of jars only needed for the small admin part? Jetty as an App server? Or Tomcat? Or some other, really small? Struts 1 or 2 (I would think Struts1 is the smaller solution)? Or shouldn't I attempt this approach and write a simple servlet? What do you do? I cannot assume a Servlet container to be installed on machines my app will run on. There might be multiple instances of my app running on the same machine. The UI should work over the network although a console based approach might be possible, too. Thanks in advance Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: [struts2]how to configure the web app - solved!
First of all, thanks to all who answered to my previous posting! I did not want one of this big "use another framework [Spring/AppFuse/Hibernate/...] in addition to Struts2" things. While this is surely the right way to go for a lot of heavy weight systems there are also smaller lightweight apps which need some initialization at startup time (and btw: these other frameworks themselves need a hook to the lifecycle events of the web app) Finally I found the way to go: just use a ServletContextListener and put the configuration parameters you need in the deployment descriptor web.xml. The only "trick" needed: use instead of ! One can access these context parameters the same way like servlet init parameters: use ... public void contextInitialized(ServletContextEvent lcEvent) { ServletContext context = lcEvent.getServletContext(); String par = context.getInitParameter("foo"); // this will access the context parameter "foo" from web.xml ... } Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Aw: Re: [struts2]how to configure the web app
Hi Jim, could you detail on this? I am not really familiar with Spring and at first sight it looks much too mighty for just some little initialization, but maybe its providing the hook I am looking for. Martin - Original Nachricht Von: Jim Kiley <[EMAIL PROTECTED]> An: Struts Users Mailing List Datum: 16.05.2008 14:30 Betreff: Re: [struts2]how to configure the web app > Hi Martin, > > This seems like an ideal situation for using Spring dependency injection. > Are you familiar with Spring at all? > > jk > > On Fri, May 16, 2008 at 8:04 AM, <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > I am new to Struts2 and stumbling immediately. > > > > I want to have an initialization routine in my web app which will connect > > to a data base etc. at startup time. This routine needs some parameters > (e. > > g. the path of a config file to be read). How can I access such external > > information? > > > > With Servlets I would normally implement a ServletContextListener which > > would get its information as an init-param from web.xml. > > But for Struts2 there is no spec where I could put it. > > > > Writing Struts1 applications I typically utilized a plugin which could > read > > parameters from struts-config.xml. Maybe this is still possible, but the > > Struts2 plugin mechanism seems to be too powerful (or just overwhelming) > for > > me. > > > > What is the preferred way? > > > > Thanks > > > > Martin > > > > - > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > -- > Jim Kiley > Technical Consultant | Summa > [p] 412.258.3346 [m] 412.445.1729 > http://www.summa-tech.com > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[struts2]how to configure the web app
Hi, I am new to Struts2 and stumbling immediately. I want to have an initialization routine in my web app which will connect to a data base etc. at startup time. This routine needs some parameters (e. g. the path of a config file to be read). How can I access such external information? With Servlets I would normally implement a ServletContextListener which would get its information as an init-param from web.xml. But for Struts2 there is no spec where I could put it. Writing Struts1 applications I typically utilized a plugin which could read parameters from struts-config.xml. Maybe this is still possible, but the Struts2 plugin mechanism seems to be too powerful (or just overwhelming) for me. What is the preferred way? Thanks Martin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]