Re: Action path prefix rules?

2020-08-14 Thread Heikki Hyyrö
Sorry, my post obviously had a typo. I was supposed to write the link open tag as . -Heikki Heikki Hyyrö kirjoitti 14.8.2020 klo 11.47:     Link to bar-action - To unsubscribe, e-mail: user-unsubscr

Action path prefix rules?

2020-08-14 Thread Heikki Hyyrö
Hi, I am a bit confused about the rules concerning mapping URL paths to actions. Let's say that I have a Struts application running at example.com with the app name "myApp". Then the usual path to access a Struts action named "foo" would presumably be example.com/myApp/foo.action Now, it

Passing a parameter from an interceptor to an action

2017-03-26 Thread Heikki Hyyrö
Hi, I would like to pass a parameter from an interceptor to an action, but am not sure what is a proper way to do it if I also want to ensure that a parameter with the same name cannot be injected into the action as a request parameter. I have set the interceptor to add the parameter into

Re: Problem reading a resource file (migrating 2.3.29 --> 2.5.10)

2017-03-11 Thread Heikki Hyyrö
11.03.2017, 09:20, Lukasz Lenart kirjoitti: This is do the changes in ActionSupport's dependencies, you must inject them first to have access to resource bundles. Instead your approach with singleton you can use something like this public class DbConnectionManager { public

Problem reading a resource file (migrating 2.3.29 --> 2.5.10)

2017-03-10 Thread Heikki Hyyrö
Hi, I decided to migrate a Struts-based application from Struts 2.3.x to 2.5.x. The application worked without problems with Struts version 2.3.29. After updating to 2.5.10, the application no longer seems to be able to read a root-level resource file "package.properties": calling

Re: Mysterious(?) carriage returns

2015-04-06 Thread Heikki Hyyrö
Chris Pratt thechrispr...@gmail.com kirjoitti 7.4.2015 kello 0.32: I believe line breaks in HTTP are always represented as CRLF pairs, regardless of the Client or Server OS's Thanks for the tip; it helped me to look for the right thing and verify that HTML 4.01 specification indeed states

Mysterious(?) carriage returns

2015-04-06 Thread Heikki Hyyrö
Hi, I have been stumped by the following problem: newlines within text received from an html form show up in the form ”\r\n” in our Struts 2 -based application. I am wondering how this is possible because I have verified the following: 1) The system is running on OS X or Linux, so the OS

Re: Anyway to map properties to different request names?

2014-11-05 Thread Heikki Hyyrö
Paul Benedict pbened...@apache.org kirjoitti 5.11.2014 kello 22.54: It bothers me that the Java programming model dictates the parameter names. In theory personId could be sent as a -- although a variable named a in Java is bad naming conventions. There isn't a good technical reason to keep

Re: Html-encoding to UTF-8: hidden field vs. other fields?

2014-09-21 Thread Heikki Hyyrö
Lukasz Lenart lukaszlen...@apache.org kirjoitti 21.9.2014 kello 11.32: Missing encoding declaration? Both forms are based on the same page-template that has meta http-equiv=Content-Type content=text/html; charset=UTF-8 in the page header. Is this not enough? Did you mean some other

Re: Html-encoding to UTF-8: hidden field vs. other fields?

2014-09-21 Thread Heikki Hyyrö
Heikki Hyyrö heikki.hy...@uta.fi kirjoitti 21.9.2014 kello 0.08: form action=”/App/saveText.action method=post form action=”/App/saveText.action method=post” Well, the problem was in fact a small typo in the redirect form! This is worthy of a bg :facepalm: Adding the missing quotation

Re: Struts 2 and automatic ids

2014-09-21 Thread Heikki Hyyrö
Lukasz Lenart lukaszlen...@apache.org kirjoitti 21.9.2014 kello 11.48: Can you prepare some exact example app? Would the example snippet at the bottom be enough? It shows a slightly cleaned version of one form we use. The form basically consists of a table that lists the users of the system.

Html-encoding to UTF-8: hidden field vs. other fields?

2014-09-20 Thread Heikki Hyyrö
Hi all, I have recently ran into a problem, which at least on the surface seems a bit strange. First the background. The Struts 2 -based application in question has the following kind of guard for losing data due to session timeout. If a user tries to submit a form after session timeout, the

Re: Struts 2 and automatic ids

2014-09-11 Thread Heikki Hyyrö
Martin Gainty mgai...@hotmail.com kirjoitti 11.9.2014 kello 14.31: MGreference for id is here http://www.w3.org/TR/html401/struct/global.html#adef-id MGthe 'functions' the (generated) id plays are illustrated here: The (unique) id attribute has several functions in HTML: Yes, I am quite

Struts 2 and automatic ids

2014-09-10 Thread Heikki Hyyrö
Hi all, I recently began to audit a Struts 2.3.16.1 application that I am maintaining. While running the pages through the HTML markup validation test at http://validator.w3.org/, I noticed a problem: Struts 2 seems to automatically generate id’s to many elements related to forms, and