Re: [S2] Going nuts with

2007-03-14 Thread Laurie Harper
Roger Varley wrote: Hi I have this fragment of .jsp code scope="request"/> When this runs I see the text "Index" and the value of #status.index followed by the text "varia

RE: Re: Html:Cancel and html:submit works only on new page

2007-03-14 Thread Amit_Wadhwa
Hi there, Thanks for looking, This is the page which doesnt execute if I goto it from a link. It works if opened directly. (Apologize for the long pieces of code) ChooseJournalType.jsp <%@ page language="java" %> <%@ include file="../pages/Includes/Validator.jsp" %> <% String tooltitle = applic

Re: [s2] Datetimepicker not working on non-English?

2007-03-14 Thread Petr Blahos
If the field used by the datetimepicker is of type Date, there shouldn't be a problem, if it is an string, the displayFormat will be used to try to parse the date. This is what I, sort of, expected. However, the field used in showcase-->CRUD *IS* java.util.Date and it does not work. (Tried in

Re: Cross site scripting issue

2007-03-14 Thread Adam Ruggles
You should check out this site: http://iamcal.com/publish/articles/php/processing_html/ It's in PHP and Perl, but it only took me a couple of hours to translate it to Java. Sami Dalouche wrote: Hi, If you want to escape HTML, you can use Jakarta Commons-Lang StringEscapeUtils class : http:/

Re: Html:Cancel and html:submit works only on new page

2007-03-14 Thread Laurie Harper
[EMAIL PROTECTED] wrote: Hi, I have a navigation page which takes me to pageA.jsp throw an PageA.jsp has a textbox, a submit button and a cancel button. If I navigate through the index.jsp navigation menu to goto PageA.jsp, the cancel and submit requests don't work - they both return a blank pa

Re: Cross site scripting issue

2007-03-14 Thread Sami Dalouche
Hi, If you want to escape HTML, you can use Jakarta Commons-Lang StringEscapeUtils class : http://jakarta.apache.org/commons/lang/apidocs/org/apache/commons/lang/StringEscapeUtils.html#escapeHtml(java.lang.String) Personally, I am using the Radeox Wiki engine (http://www.radeox.org/space/start) t

[S2] Validating two dates

2007-03-14 Thread Binil Thomas
Hi all, I searched the archives on this, but could not find an answer - hence I am posting it here. I have two date fields on my form. I want to validate that the first is always on or before the second. I want the error message to show next to the second date field. In my Action-alias-validati

How to session attributes Struts 2.0.6

2007-03-14 Thread tom tom
Hi, How can we set the session variables which we used to do in stuts 1.x. and thereafter access in the jsps. e.g. session.setAttribute("NAME","USER11"); and in jsp This message is for user 1 How can we access to the session, should it be as follows In execute method Rend

Re: Cross site scripting issue

2007-03-14 Thread Joseph McGranaghan
Are you allowing the user to redisplay any entered HTML ala myspace? I'm working on a solution for this right now. For this situation, I'm filtering it in action before it is saved to DB. Here are some REs and a simple function: private final static String XSS_BIG_OBJECTS_FILTER = "(((<\\s*

Re: Lazy loading actions in Struts 2

2007-03-14 Thread Marco from Balboa
Dave, When you say "I define it by name in applicationContext.xml", what do you mean? I tried following the documentation where they instruct to place the name of the Spring bean in class attribute for the action definition in the struts.xml. I assume this is what you are doing as well, correct? I

Re: odd tiles deployment

2007-03-14 Thread Chris Pat
Hello Dave Yes to both. It really amazes me. I printout the recordset and the results are the same in all deployments. (I have deployed the same mysql db in all) The page that gets rendered rendered by tiles however the tile that shows the session data in W2KSrv does not; it does in the other

How to overwrite default setting in Struts2

2007-03-14 Thread Shuai Zheng
Dear All, I try to use my own setting to overwrite the default settings. Following line is added into my struts.properties: struts.configuration.files=struts-heal-default.xml,struts-plugin.xml, struts.xml I have a struts-heal-default.xml in my classpath to re-define the stack, but this does not

Re: How to change the return of an action ?

2007-03-14 Thread Dave Newton
--- Jonatas Gustavo Rodrigues wrote: > In this way, this object (like an UIComponent) could > be used for an> registered Result object to render > the result (this Tapestry). I expect that you could create a result type mapping from a String result to whatever you wanted, the same way there are a

How to change the return of an action ?

2007-03-14 Thread Jonatas Gustavo Rodrigues
The DefaultActionInvocation returns only a String or a Result from an action invocation. Why struts does not permit the action to return something else, like an Object ? In this way, this object (like an UIComponent) could be used for an registered Result object to render the result (this Tapest

Re: odd tiles deployment

2007-03-14 Thread Dave Newton
--- Chris Pat <[EMAIL PROTECTED]> wrote: > EXCEPT the tile never show. The page renders > without errors however the Tile that is(and does on > other deployments) show the session data does not > show. I have tried everything, twice. It is now > bordering on insanity of trying everything again a

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
--- Dave Newton <[EMAIL PROTECTED]> wrote: > Forgot to mention that may do > what you need... I haven't played with it yet. Or not. I don't think the S2 ajax tags really cover this usecase; I think (at least for now) this issue may need to be solved with plain old JavaScript, perhaps via Dojo, p

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
Oops; an earlier msg I sent didn't make it. --- Dave Newton <[EMAIL PROTECTED]> wrote: > --- [EMAIL PROTECTED] wrote: >> I don't see any other way of using the ajax >> support to populate some of the form fields??? > > That I'd have to think about; so far the only thing > I've come up with in my

Re: Lazy loading actions in Struts 2

2007-03-14 Thread Dave Newton
--- Marco from Balboa <[EMAIL PROTECTED]> wrote: > but I am also encountering that it is happening at > application startup too. If I put a debug stmt in an Action ctor I don't see it on startup, only on a request. I am running under Tomcat 5.5, also using Spring. Ah, if I define it by name in a

Re: Need Help -Urgent

2007-03-14 Thread Dave Newton
--- Sachin <[EMAIL PROTECTED]> wrote: > yes dave. You are right. > > Map is containing all the form data. > > how can i resolve this ? Don't put all the form data in the link? For example, you could use just the saved object's ID and retrieve the object from the DB. d. ___

Re: Need Help -Urgent

2007-03-14 Thread Jason Stelzer
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mar 14, 2007, at 7:07 PM, Sachin wrote: yes dave. You are right. Map is containing all the form data. how can i resolve this ? Generally you POST form data for precisely this reason. GET has inherent limitations. - -- J. -BEGIN

Re: Lazy loading actions in Struts 2

2007-03-14 Thread Marco from Balboa
They are definitely instantiated on each request, but I am also encountering that it is happening at application startup too. Is the behavior that I am observing unusual or unexpected? How do I stop it? Thanks Marco Dave Newton-4 wrote: > > --- Marco from Balboa <[EMAIL PROTECTED]> wrote: >>

Re: Lazy loading actions in Struts 2

2007-03-14 Thread Marco from Balboa
They are definitely instantiated on each request, but I am also encountering that it is happening at application startup too. Is the behavior that I am observing unusual or unexpected? How do I stop it? Thanks Marco Dave Newton-4 wrote: > > --- Marco from Balboa <[EMAIL PROTECTED]> wrote: >>

Re: Need Help -Urgent

2007-03-14 Thread Sachin
yes dave. You are right. Map is containing all the form data. how can i resolve this ? On 3/14/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- Sachin <[EMAIL PROTECTED]> wrote: > But when i try to click the edit link for the > particular record which is having 2 > chars as a data, the edi

Re: Struts 2.0.6 portlets

2007-03-14 Thread tom tom
Thank you, Any documentation around on this topic, Struts 2.0.6 portlets development.? (best practices etc). And things to be aware of? I would like to know things like for e.g? If I want a session variable should I put it to the HttpSession or Portlet session. What we really want is forget the

Re: Need Help -Urgent

2007-03-14 Thread Dave Newton
--- Sachin <[EMAIL PROTECTED]> wrote: > But when i try to click the edit link for the > particular record which is having 2 > chars as a data, the edit link is getting disabled > automatically. If that data length is less than 250 > chars the edit link is working fine in the form. is > ther

Re: Need Help -Urgent

2007-03-14 Thread Sachin
Hi, Sorry if i am disturbing you guys. Still i am facing the issue.i removed all extra characters using javscript, Now its allowing me to add/edit the information and stored in database as expected and forwarded to listing view jsp with entered value. But when i try to click the edit link for t

Re: initialize java form bean

2007-03-14 Thread Dave Newton
--- Lim Hock-Chai <[EMAIL PROTECTED]> wrote: > is there a way to set a property of a java form bean > from struts-config.xml? > > I try to use set-property and it is not working. Which version of Struts (I'm assuming Struts 1, but which version?) What did you try already? d. __

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
Thanks "d!" I hope I didn't come off as too much of a jerk. I really do appreciate your help. Scott On 3/14/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- [EMAIL PROTECTED] wrote: > the ajax'd bits *do* show up, but not lined up with > all the other columns! At least now I can see the > bla

Re: Lazy loading actions in Struts 2

2007-03-14 Thread Dave Newton
--- Marco from Balboa <[EMAIL PROTECTED]> wrote: > Is there a way to prevent Struts 2 from instatiating > all the actions defined in the action configuration > file whe loading the application? I didn't know it did; I thought they were instantiated per-request. d. __

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > the ajax'd bits *do* show up, but not lined up with > all the other columns! At least now I can see the > blasted fields You may be able to tweak the JSP you are returning to make it do the right thing, say with theme="simple" etc. Heck, making the into mi

Re: initialize java form bean

2007-03-14 Thread Harring Figueiredo
Try Value you want Make sure your action has the method that match accessors for the attribute. In the case above, you need public String setNameOfAttribute(String va){ } Hope this helps. Harring On 3/14/07, Lim Hock-Chai <[EMAIL PROTECTED]> wrote: is there a way to set a pr

Lazy loading actions in Struts 2

2007-03-14 Thread Marco from Balboa
Hi, Is there a way to prevent Struts 2 from instatiating all the actions defined in the action configuration file whe loading the application? I am using Spring for object factory. Thanks Marco -- View this message in context: http://www.nabble.com/Lazy-loading-actions-in-Struts-2-tf3404803.

initialize java form bean

2007-03-14 Thread Lim Hock-Chai
is there a way to set a property of a java form bean from struts-config.xml? I try to use set-property and it is not working.

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
This is what should be rendering *but* is not! Dave, you about had it when you said to wrap the DIV in tags. When I do this, the ajax'd bits *do* show up, but not lined up with all the other columns! At least now I can see the blasted fields This generated HTML is whacky with a DIV in a F

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
Wait, now I've totally forgotten what the original problem was. If below is the generated HTML then what is rendering incorrectly? http://localhost:8080/dsms/ZipCode.action"; formId="registerForm" autoStart="false" dojoType="struts:BindDiv"> Is there no starting TR/TD? Ci

Re: Need Help -Urgent

2007-03-14 Thread Sachin
Guys, Here is my problem description . I have a text area field in my application which has to allow only 2 chars.User may copy paste some content in to textarea field. I used the below code to construct the textfield I am able to limit the maximum size of the textarea using following jav

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
I have requested %{zipUrl} directly: http://localhost:8080/dsms/ZipCode.action and the resulting response is EXACTLY what I'd like included in that DIV!!! On 3/14/07, Adam Ruggles <[EMAIL PROTECTED]> wrote: I don't think there is anything about the XmlHttpObject that is not allowed by s2, howe

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
IE 6.0! It's my work laptop don't ask. Let me port this to my home desktop running the new FireFox and I'll let you know how it turns out! This is really going to suck if this has been the problem all along!!! Maybe Bruce Eckel is right? Scott On 3/14/07, Dave Newton <[EMAIL PROTECTED]>

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Adam Ruggles
I don't think there is anything about the XmlHttpObject that is not allowed by s2, however what you are expecting to happen might change. Based on your code snippet as soon as you load the page, the s2 div tag is going to request whatever %{zipUrl} is pointing to. It will render the complete

Re: Need Help -Urgent

2007-03-14 Thread Dave Newton
--- Sachin <[EMAIL PROTECTED]> wrote: > Currently i am using Tag Library 1.1 > Will latest version of *struts-html.tld* help ? No. Text areas don't have a maxlength, no matter what TLD you use. d. Be a PS3 g

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > d. Can you show me what your action mapping looks > like for */stan1.action?* /WEB-INF/jsp/stan/stan1.jsp > As far as the missing quotes go, the only way I can > view generated source > *and* have the > content dynamically added to the DOM inc

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
/pages/ajaxGoods.jsp ===

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > This issue is obviously not a good match for your > skills. The *issue* is a great match for my skills. *You* are not. Verbatim, although I added the surrounding HTML and taglib directive: > value="http://localhost:8080/dsms/ZipCode.action"; /> > > method="post

Re: Need Help -Urgent

2007-03-14 Thread Sachin
Currently i am using Tag Library 1.1 Will latest version of *struts-html.tld* help ? On 3/14/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- Sachin <[EMAIL PROTECTED]> wrote: > But i need to limit text area content. > Do i need to use rows ? You'll probably need to use JavaScript; I don't know

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
Hey Adam! You might be onto something here! When a zip code is entered, the "ajax" portion %{zipUrl} is fetching the zip info from a database and populating the fields that the DIV is supposed to include in the form. I have programmed a bunch of JSP's using this technique with XmlHttpObject! D

Re: Cross site scripting issue

2007-03-14 Thread Leon Rosenberg
Jason Britain (author of Tomcat, the definitive guide) has a ready-to-run filter/valve solution for that. You could talk to him on the #tomcat channel on irc. Besides, best XSS prevention is imo not filtering the input, but the output. if you write everything out with you'll be fine. regards Le

Re: Need Help -Urgent

2007-03-14 Thread Dave Newton
--- Sachin <[EMAIL PROTECTED]> wrote: > But i need to limit text area content. > Do i need to use rows ? You'll probably need to use JavaScript; I don't know of a way to limit the number of characters in a textarea without it. d. __

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
d. Can you show me what your action mapping looks like for */stan1.action?* As far as the missing quotes go, the only way I can view generated source *and* have the content dynamically added to the DOM included, is to use the IE plug in that builds the HTML directly from the DOM tree. This is li

Re: Need Help -Urgent

2007-03-14 Thread Sachin
Thanks guys. But i need to limit text area content. Do i need to use rows ? On 3/14/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- Sachin <[EMAIL PROTECTED]> wrote: > property="cpDesc" *maxlength=** > "2"* /> Textareas don't have a "maxlength" attribute. d. ___

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
Just as a followup, I am still not convinced that it's legal HTML to embed a div inside a table, between table rows. Which browser you're using to retrieve the generated source would also be useful information. d. --- Dave Newton <[EMAIL PROTECTED]> wrote: > --- [EMAIL PROTECTED] wrote: > > Thi

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
--- Adam Ruggles <[EMAIL PROTECTED]> wrote: > I think I know whats going on here. Whatever > %{zipUrl} in the DIV's > href property is pointing to is generating the bad > HTML. Possibly, but whether I use %{zipUrl} or %{#zipUrl} I still get correct HTML; my renders as: http://localhost

Re: Need Help -Urgent

2007-03-14 Thread Ed Griebel
Textarea doesn't support the maxlength attribute: http://www.w3.org/TR/html4/interact/forms.html#h-17.7 On 3/14/07, Sachin <[EMAIL PROTECTED]> wrote: > > Hi , i am using below snippet and i am getting the following error : CP Description Error: [3/14/07 14:57:52:094 EST] 715b61a

Re: Need Help -Urgent

2007-03-14 Thread Dave Newton
--- Sachin <[EMAIL PROTECTED]> wrote: > property="cpDesc" *maxlength=** > "2"* /> Textareas don't have a "maxlength" attribute. d. Expecting? Get great news right away with email Auto-Check. Try the Ya

RE: Cross site scripting issue

2007-03-14 Thread Asthana, Rahul
Check for a predefined pattern of characters in a filter,as you have suggested, (probably read from xml) and forward to an error page if you find any. -Original Message- From: rapsy [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 14, 2007 3:50 PM To: user@struts.apache.org Subject: Cross

Need Help -Urgent

2007-03-14 Thread Sachin
Hi , i am using below snippet and i am getting the following error : CP Description Error: [3/14/07 14:57:52:094 EST] 715b61a9 WebGroup E SRVE0026E: [Servlet Error]-[/Pages/adjustReporting.jsp(139,8) *Attribute maxlength invalid according to the specified TLD]: org.apache.jasper

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Adam Ruggles
Hi Stanlick, I think I know whats going on here. Whatever %{zipUrl} in the DIV's href property is pointing to is generating the bad HTML. This part: City: State: Is what is being pulled in from your %{zipUrl}. [EMAIL PROTECTED] wrote: Hey Dave, how about *you* disregard this thread

Passing a bean (out of an iteration) to an action

2007-03-14 Thread Balsi
hi all, Wonder if you can help me on that one: I have an iteration over a collection of beans in my jsp site. I itererate on the list and generate a table with a row for each bean. The first attribute of the table is an index (its the primary key of the record in a database) now id like to do th

Re: DataSources

2007-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel, Daniel Blumenthal wrote: > I'm using Tomcat 5.5.x. The documentation for this looks pretty good, now > that I know where to look for it. Thanks! Feel free to cruise on over to the Tomcat list if you have any questions about configuration. T

Cross site scripting issue

2007-03-14 Thread rapsy
Hi All, I am trying to find a best solution to prevent Cross site scripting attacks. I wrote a method to filter out all the bad characters. But my questions is where should I call this method? AT the form level, in setters method r action level or use a filter. I think filter is a good option bu

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread Dave Newton
--- [EMAIL PROTECTED] wrote: > I'm using 2.0.6. Hopefully results aren't > "radically" different between dot releases! At some point things switched to FreeMarker; I don't recall when. It's a new project--things will change, although it seems to settle down. I'm not convinced you really want hel

Re: Parsing error processing resource path

2007-03-14 Thread stevo_ugs
The issue is parsing. In my experience, this is due to using backslashes (\) where you should use two backslashes (\\) or a forward slash (/). To debug: It is not necessarily true that the file that defines the servlet "action" is the culprit. What you need to do is go through that file and ve

Re: Need more comprehensive AJAX Implementation Instructions

2007-03-14 Thread stanlick
I'm using 2.0.6. Hopefully results aren't "radically" different between dot releases! On 3/12/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- [EMAIL PROTECTED] wrote: > As you can see, this DIV is not well-formed, and > naturally does not rended correctly. Any help would > be appreciated. Wh

Re: LazyLists

2007-03-14 Thread maestro
Apologies for taking so long to post. I was side tracked with other stuff. It does mention in the Wiki: http://wiki.apache.org/struts/StrutsCatalogLazyList In a small line: If you define the following types of getter/setter methods for your indexed property, in JDK 1.3 you shouldn't have any prob

Re: DataSources

2007-03-14 Thread Martin Gainty
Hi Dansorry..forgot the codepublic class JdbcCorporateEventDao implements CorporateEventDao { private JdbcTemplate jdbcTemplate; public void setDataSource(DataSource dataSource) { this.jdbcTemplate = new JdbcTemplate(dataSource); } // JDBC-backed implementations of the m

Re: DataSources

2007-03-14 Thread Martin Gainty
I think this is where Spring really shines e.g. ApplicationContext.xml http://www.springframework.org/schema/beans"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://www.springframework.org/schema/beans/spring-beans-2.0.xsd";>

RE: [S2] Result Type Dispatcher problem

2007-03-14 Thread Inamdar, Anil
This is how 1. One action class and multiple methods in it (insert, Doinsert, update, DoUpdate, list, search etc) 2. All the action mappings use this class and call the different methods based on what is required. 3. The action mappings have additional parameters defined such as DAO, Bean class et

Re: [s1] Filters: distinguishing between user-requests and redirects

2007-03-14 Thread Pierre Thibaudeau
2007/3/13, Michael Jouravlev <[EMAIL PROTECTED]>: On 3/13/07, Christopher Schultz <[EMAIL PROTECTED]> wrote: > > I am trying to implement a flood control mechanism to prevent robots > > requesting pages after pages at an "inhuman" rate. > > I know you've gotten lots of feedback already, but ther

[S2] Going nuts with

2007-03-14 Thread Roger Varley
Hi I have this fragment of .jsp code When this runs I see the text "Index" and the value of #status.index followed by the text "variable" but the value of #indexValue is no

RE: DataSources

2007-03-14 Thread Daniel Blumenthal
Chris, Thanks for the reply - this sounds like just what I need. > For instance, Apache Tomcat makes this pretty darned easy. > You can define a JNDI datasource at the server level, or per > webapp. The configuration is (roughly) the same; it just goes > in a different place in your config fil

Missing Message Key

2007-03-14 Thread Syed Ibrahim
Hi I am new to this forum and started using Struts 1.3.5. Am getting below exception while running my program. Missing message for key "userRegistration.firstName" in bundle "(default bundle)" Thanks in Advance. -- Original Message --- From: "Guillaume Carré" <[EMAIL PROTEC

Re: Struts 2.0.6 and Validation

2007-03-14 Thread Dave Newton
--- Hardy Ferentschik wrote: > @Validations( > expressions = { > @ExpressionValidator( > expression = > "searchParam.keywords ne null and > searchParam.location ne null" message > = "Wrong search parameters") > } Btw, I haven't tested this yet, but I suspect you wouldn'

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread Guillaume Carré
2007/3/14, mraible <[EMAIL PROTECTED]>: What if you remove the for Struts' filter in your web.xml? ?? If I remove the Struts' filter nothing works anymore :-) I have a staticFilter in my application that forwards to static resources and doesn't hit the Struts FilterDispatcher when one is fou

Re: Validation on java.util.List

2007-03-14 Thread cilquirm
I don't know if this helps, but when I validate a list or array , i use OGNL's selection/projection facility : i.e. : customers.{ ? #this.age gt 0 and #this.username neq null }.size() eq customers.size creates a list of all customers whose age is greater than zero and who have a username and

Re: Struts 2.0.6 and Validation

2007-03-14 Thread Dave Newton
--- Hardy Ferentschik wrote: > Currently I get the following error: > No result defined for action SearchAction and result > input If validation fails the framework will try to bring you back to the "input" result. You don't appear to have one; this will cause a problem. > validation on 'complex

Re: {S2] Newbie: Sharing a POJO between two or more actions

2007-03-14 Thread cilquirm
If your actions occur in sequence, ( i.e. submit to an action -> display action ), it's possible to use action chaining to share objects. http://struts.apache.org/2.x/docs/action-chaining.html Roger Varley wrote: > > Hi > > I need to share an object between two actions. As I'm famili

Re: DataSources

2007-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Daniel, Daniel Blumenthal wrote: > I'm looking into upgrading from 1.2.9 to 1.3.8, and I'm having a hard time > figuring out how to get DataSources for my application. > > I understand that this was removed in 1.3, but it's unclear how to make the > s

Struts 2.0.6 and Validation

2007-03-14 Thread Hardy Ferentschik
Hi there, I am trying to get validation going for my application and so far nothing works. I would like to use annotations. Here is what I try to do: package ... import ... @Results({ @Result(name = "success", value = "/jsp/hitlist.jsp"), // value = "hitlist.action", type = ServletAct

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread mraible
Guillaume Carré wrote: > > 2007/3/14, mraible <[EMAIL PROTECTED]>: >> What if you use foo - does that >> work >> for you as well? > > yes it does work as well, as advertized. > > And if I remove the ActionContextCleanUp filter, it doesn't work > anymore, I have the following exception: > >

Re: [s2] How to pass param to actions from Struts.xml

2007-03-14 Thread cilquirm
Create a setter with the same name as your param. ex : for : This value in MyAction : public class MyAction implements Action { private String myValue; public void setMyValue( String value) { this.myValue = value; } } Type conversion's done on this param value just like any other par

DataSources

2007-03-14 Thread Daniel Blumenthal
I'm looking into upgrading from 1.2.9 to 1.3.8, and I'm having a hard time figuring out how to get DataSources for my application. In the old version, I did the configuration in the struts-config.xml file, and could say the following in the action: DataSource ds = getDataSource(request,"datasourc

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread Guillaume Carré
2007/3/14, mraible <[EMAIL PROTECTED]>: What if you use foo - does that work for you as well? yes it does work as well, as advertized. And if I remove the ActionContextCleanUp filter, it doesn't work anymore, I have the following exception: java.lang.NullPointerException at org.apa

Re: Revising user input

2007-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris, Christopher Becker wrote: > A simple javascript:back() approach is not feasible (nor desirable) > [...] [snip] > Could someone provide insight on the best approach to allow for > re-display (and re-validation) of form content? Any guidance wo

fmt:setLocale

2007-03-14 Thread Vinicius Carvalho
Hello there! I'm struggling with this for the last couple of hours, I'm pretty sure is a dumb thing I forgot. I'm setting the locale for my JSPs (not using struts yet, this is for a presentation) and refuses to override the default locale. I'm using jakarta standards 1.1.2 apache 5.5.17 and nothi

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread mraible
Guillaume Carré wrote: > > 2007/3/14, mraible <[EMAIL PROTECTED]>: >> That's the problem, I *do* have the ActionContextCleanUp filter in my >> web.xml: > > It's working here for me, I've included a test.jsp in my sitemesh > decorator with a in it, and it's able to > access the test object fro

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread Guillaume Carré
2007/3/14, mraible <[EMAIL PROTECTED]>: That's the problem, I *do* have the ActionContextCleanUp filter in my web.xml: It's working here for me, I've included a test.jsp in my sitemesh decorator with a in it, and it's able to access the test object from the value stack. But I still have my JS

[s2] How to pass param to actions from Struts.xml

2007-03-14 Thread Harring Figueiredo
Folks, Is there a way to pass parameter to an Action using the struts.xml config file. 1 ) I see that the has a param attribute. How can I access its value from within the action? My action already implements the ParameterAwre interface. However, I am unable to see the value on the Map provide

Revising user input

2007-03-14 Thread Christopher Becker
Hi; I am using Struts 1.2.7, and am developing a user form that employs the validator framework. Once validation is successful, I display the results back to the user on a JSP page, before final submission to the business layer for database update. At this point I would like to give the user the

Re: Global messages.jsp file included in a SiteMesh decorator

2007-03-14 Thread mraible
Guillaume Carré wrote: > > 2007/3/14, mraible <[EMAIL PROTECTED]>: >> >> I have a messages.jsp[1] that's included (using <%@ include >> file="/common/messages.jsp" %>) in my default decorator. This file has a >> couple of calls to the valueStack - namely hasActionErrors() and >> hasFieldErrors(

[s1] Struts / Netbeans Hands On Lab

2007-03-14 Thread Niall Pemberton
Theres a "Hands on Lab" for Struts (1.2.9) / Netbeans by Sang Shin availbale here: http://www.javapassion.com/handsonlabs/strutsbasics/ Niall - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL P

Re: Bean access from several pages in request scope

2007-03-14 Thread Dave Newton
--- Balazs Michnay <[EMAIL PROTECTED]> wrote: > Could you please provide a concrete example? > I don't really understand what an "'edit' CRUD-type > action" is. Your "modify" button is basically a link to the form that allows you to edit an instance of the bean. As a URL it might look like: /edit

RE: [S2] Result Type Dispatcher problem

2007-03-14 Thread Dave Newton
--- "Inamdar, Anil" <[EMAIL PROTECTED]> wrote: > Yes I tried with "redirect-action" and it works. But > I don't want a redirect as I lose my messages and > other data from the previous action Oh, I didn't notice that you said that in your original post. The default result type is "redirect". I d

Re: {S2] Newbie: Sharing a POJO between two or more actions

2007-03-14 Thread Alex Wibowo
with SessionAware, you have to implement: void *setSession *(Map session) so during testing you can e

Re: Validation on java.util.List

2007-03-14 Thread Dave Newton
--- Alex Wibowo <[EMAIL PROTECTED]> wrote: > But that will tie up the hibernate objects to Struts, > wouldnt it? XWork, technically, but yes. The other issue (I think; haven't explored it yet) is that you'd lose the ability to validate differently based on the Action method (which I need). So I'

Re: How to submit multiple selection?

2007-03-14 Thread Alex Wibowo
are you using struts 1 ? if so, have a look at html:multibox. basically you will need a collection in your action form (something like List selectedIds = new ArrayList()). for struts 2, i havent had time to check it yet.. just migrated to Struts 2 a couple days ago :P On 3/14/07, xushaoxun <[EMA

Re: Bean access from several pages in request scope

2007-03-14 Thread Balazs Michnay
Sure; use the id to retrieve the bean (just like you would for a normal 'edit' CRUD-type action) and pre-populate the form. Could you please provide a concrete example? I don't really understand what an "'edit' CRUD-type action" is. > use the id to retrieve the bean How do I retrieve it? Should I

RE: [S2] Result Type Dispatcher problem

2007-03-14 Thread Inamdar, Anil
Yes I tried with "redirect-action" and it works. But I don't want a redirect as I lose my messages and other data from the previous action Thanks Anil -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 14, 2007 09:56 AM To: Struts Users Mailing List Su

Re: Validation on java.util.List

2007-03-14 Thread Alex Wibowo
Hi Dave, Thanks for that.. I will have a look at the VisitorValidator tomorrow (its 1 AM here :P ) I am sort of in the same position as you (using Hibernate objects at the web layer)... I have given that a thought before (annotating the hibernate objects with validation annotation). But that wil

Re: Bean access from several pages in request scope

2007-03-14 Thread Dave Newton
--- Balazs Michnay <[EMAIL PROTECTED]> wrote: > Is there a way to access all the data from the form > page when someon pushes the "Modify" button without > setting the bean scope to session? Sure; use the id to retrieve the bean (just like you would for a normal 'edit' CRUD-type action) and pre-po

Re: [S2] Result Type Dispatcher problem

2007-03-14 Thread Dave Newton
--- "Inamdar, Anil" <[EMAIL PROTECTED]> wrote: > TaskInsert.action >

Re: ResourceBundle in Javascript?

2007-03-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nitin, Dave Newton wrote: > Message bundles are server-side. You want to access it on the client. [snip] > If you just need to access a single message out of a bundle, maybe > this is okay, although I'd probably just put the message into scope > v

  1   2   >