Accessing nested properties

2005-06-21 Thread Fredrik Bostrom
Hi list, How do I access a nested property in an iterated object? I've got two classes like this (heavily simplified and stripped): class Foo { Bar bar = new Bar(); } class Bar { int test = 10; //any value } In my jsp-page, I'm iterating an array of foo-objects and I want to access the

Accessing message resource from in validate method

2005-06-21 Thread Arash Bijanzadeh
Hi, In the validate method of ActionForm, I need to access the resource messages to pass the message as arg to ActionMessage constructor. Could anybody help me?

Re: validwhen question, I'm getting crazy :'((

2005-06-21 Thread Kumar deepak
Hi, There is a nice tutorial at http://www.roseindia.net/struts/address_struts_validator.shtml This will help you Regards Andrey Grishin [EMAIL PROTECTED] wrote: Good morning/day/evening, All! I use Struts 1.2.6. 1. I took struts-blank.war application, deploy it under the Tomcat 4.1.29 2.

Acrobat 7.0 opens 2 windows for opening PDF as inline document.

2005-06-21 Thread Avjit Singh Jhajj
Hi, Presently I am having the following piece of code for opening the PDF in the new browser window. OutputStream out = response.getOutputStream(); String filename = AutoGlaserOutput.pdf; response.setContentType(application/pdf);

[HELP] I couldn't trim() 1 japanese String (charset UTF-8)

2005-06-21 Thread Pham Anh Tuan
Hi all, I got 1 problem when I trying to eliminate spaces at ride side and left side of 1 japanese String. In mySQL I set UTF-8 for both database and my Jsp pages. But in Action, I can't not trim() japanese string, so, when I insert that string to database, spaces are exist. Plz help me

Re: Accessing message resource from in validate method

2005-06-21 Thread Jana Parvanova
ActionMessage is constructed with message key, not with message text - so you don't have to access resources directly. Or, maybe I have not understood your question? - Original Message - From: Arash Bijanzadeh [EMAIL PROTECTED] To: user@struts.apache.org Sent: Tuesday, June 21, 2005

Re: [HELP] I couldn't trim() 1 japanese String (charset UTF-8)

2005-06-21 Thread matsuhashi
Do you want to remove leading/trailing double-bytes-whitespace chars? I mean the double-bytes-whitespace to be a UNICODE char of \u3000. The java.lang.String#trim() does not see the \u3000 as a whitespace which it should chop off. To remove the \u3000 char, I think you would need fair amount

Re: Accessing message resource from in validate method

2005-06-21 Thread Arash Bijanzadeh
My problem is creating a message with an argument for example: Date {0} is not valid. I create: msg.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(errors.badDate)); My Question : how can I add the argument for {0} from resource bundle to this statement, as validator framewoek does?

Re: Accessing message resource from in validate method

2005-06-21 Thread Jana Parvanova
Try this: MessageResources resources= (MessageResources) request.getAttribute(Globals.MESSAGES_KEY); Locale loc = getTheLocale(request); String value = resources.getMessage(loc, your_key_for_bert) ; You could get locale using RequestUtils.getUserLocale(...) - Original

Re: [OT] Ajax - generic processStateChange

2005-06-21 Thread Frank W. Zammetti
No, you cannot pass a paremter the way you are trying... req.onreadystatechange registers an event handler with the XMLHttpRequest object, and it just takes a reference to a function. The way to handle this is to set the span ID in a page-scope variable that your state change handler will

Re: [OT] Ajax - generic processStateChange

2005-06-21 Thread Jeff Beal
Event handlers have to be functions. When you write 'onreadystatechange = processStateChange(spanID);', the processStateChange() function is *immediately* executed, and the returned value is assigned to the event handler. This works great if your processStateChange returns a function, but if it

File shared among several project...

2005-06-21 Thread Gaet
Hello, I guess this is probably not the right place but I know also that there is also a lot of good developers here and I would like to have your advice on a simple problem. In fact, I am developping a web site with 4 distinct areas (public, member, admin, employee) on Websphere

Re: problem with removing form bean

2005-06-21 Thread Martin Gainty
You should ensure your mapping scope is indeed 'request' e.g. //Test for presence of attribute in Map if (mapping.getAttribute() != null) { //Test that mapping is indeed scoped as request if (request.equals(mapping.getScope())) { //remove the attribute from the request

Re: File shared among several project...

2005-06-21 Thread Aleksandar Matijaca
I like the idea of 4 separate spaces, and 'moving around' miscalenous files (such as CSS, GIF and others) should not hold you back. Presumably for such a large project, you are using ANT to facilitate builds etc. You should be able to modify your scripts so that it also copies these files

RE: problem with removing form bean

2005-06-21 Thread Durham David R Jr Ctr 805 CSPTS/SCE
The problem is that when I get the input form the second time - it still shows the data of the first Item that was created before, Perhaps simply call form.reset() before returning from your save action. - Dave - To

Strut Faces and Struts 1.2

2005-06-21 Thread Franz-Josef Herpers
Hi, just a short question: Does the latest nightly build of Struts Faces support Struts 1.2? Regards Franz - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Market Share / Best of Breed

2005-06-21 Thread Dakota Jack
Anyone have figures on the market share and best of breed analyses on J2EE, .NET, COBOL, etc.? Thanks for any assistance ahead of time. -- You can lead a horse to water but you cannot make it float on its back. ~Dakota Jack~ -

How to use multiple tiles definitions files for multi channel

2005-06-21 Thread Michael Mattox
In the tiles documentation webapp, it's stated: A mechanism similar to Java properties files is used for definitions files : you can have one definition file per key. The appropriate definition is loaded according to the key. I'd like to use this to have different tiles for web wap devices.

Newbie questions

2005-06-21 Thread C.F. Scheidecker Antunes
Hello all, I am very familiar with Servlets, JSPs and custom Tags however Struts is a new beast to me. Hence I am studying to learn it. What I would like to know is if anyone could point me to websites that would have recipes on how to code Struts such as phpbuilder.com for php. What I

TagHandlerPool

2005-06-21 Thread Alessandro Badin - Yahoo
I am using struts 1.2, Win XP and I am trying to upgrade the app/web server from jboss 3.2.3 with tomcat 4.1 to jboss 4.0.1 with tomcat 5.5 and I am getting this exception: java.lang.NullPointerException org.apache.jasper.runtime.TagHandlerPool.get(TagHandlerPool.java:108)

running tomcat on port 80

2005-06-21 Thread Tony Smith
Hi, Can I run Tomcat 5.0 on port 80? After setting 80 as port number in the server.xml and starting tomcat, I got the following error message: SEVERE: Error starting endpoint java.net.BindException:permission denied:80 Thanks,

Re: Accessing nested properties

2005-06-21 Thread Laurie Harper
Change property=bar.test to property=test; assuming foos_array is an array of Bar then, within the iterate tag body, 'foos' is bound to an instance of Bar on each iteration. L. Fredrik Bostrom wrote: Hi list, How do I access a nested property in an iterated object? I've got two classes

Re: running tomcat on port 80

2005-06-21 Thread Dave Newton
Tony Smith wrote: Hi, Can I run Tomcat 5.0 on port 80? After setting 80 as port number in the server.xml and starting tomcat, I got the following error message: SEVERE: Error starting endpoint java.net.BindException:permission denied:80 Sure, you can run it on any port you want, if you have

Re: running tomcat on port 80

2005-06-21 Thread Tony Smith
How can I set the permission? It is my box, viturally I can do whatever I want. Thanks, --- Dave Newton [EMAIL PROTECTED] wrote: Tony Smith wrote: Hi, Can I run Tomcat 5.0 on port 80? After setting 80 as port number in the server.xml and starting tomcat, I got the following error

Re: running tomcat on port 80

2005-06-21 Thread Leon Rosenberg
you are probably on linux/unix and probably not root, so configure tomcat to port 8080 and you would have no further problems. On Tue, 2005-06-21 at 09:44 -0700, Tony Smith wrote: Hi, Can I run Tomcat 5.0 on port 80? After setting 80 as port number in the server.xml and starting tomcat, I got

Re: How to pass Jstl param implicit Object to html:link

2005-06-21 Thread Laurie Harper
'params' is a JSTL implicit object; I don't think it's required to be bound to a bean in any scope. Also, the 'name' attribute is looking for the name of a bean, not a value. You'll need to bind the request parameter map to a name in some scope first I think, something like: bean:define

Re: running tomcat on port 80

2005-06-21 Thread mario nee
in Unix system you must have root permission to open a port under 1024. Mario Neè XMoon founder http://www.xmoon.org Tony Smith wrote: How can I set the permission? It is my box, viturally I can do whatever I want. Thanks, --- Dave Newton [EMAIL PROTECTED] wrote: Tony Smith

Re: Market Share / Best of Breed

2005-06-21 Thread Martin Gainty
From the numbers (sheer volume) shows Java gaining while all other languages are fighting to stay alive Take a look at http://www.cs.berkeley.edu/~flab/languages.html Martin- - Original Message - From: Dakota Jack [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org

Re: How to pass Jstl param implicit Object to html:link

2005-06-21 Thread Zarar Siddiqi
Make sure params is of type java.util.Map. - Original Message - From: Laurie Harper [EMAIL PROTECTED] To: user@struts.apache.org Sent: Tuesday, June 21, 2005 12:48 PM Subject: Re: How to pass Jstl param implicit Object to html:link 'params' is a JSTL implicit object; I don't think

Re: TagHandlerPool

2005-06-21 Thread Martin Gainty
Allesandro- I would have to see the generated code located at login_jsp.java specifically line 84 to find out which html tag is null Martin- - Original Message - From: Alessandro Badin - Yahoo [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, June 21,

Re: Newbie questions

2005-06-21 Thread Wendy Smoak
From: C.F. Scheidecker Antunes [EMAIL PROTECTED] What I would like to learn right now is how to get information from a Select statement from a database and display it on a HTML table. That is, first I have a search form and them a search result with records from a MySQL database. I know how

Re: How to use multiple tiles definitions files for multi channel

2005-06-21 Thread Laurie Harper
Michael Mattox wrote: In the tiles documentation webapp, it's stated: A mechanism similar to Java properties files is used for definitions files : you can have one definition file per key. The appropriate definition is loaded according to the key. I'd like to use this to have different tiles

Re: running tomcat on port 80

2005-06-21 Thread Laurie Harper
That would produce a bind exception (address already in use) rather than permission denied. Balasubramaniam, Sezhiyan wrote: Make sure that you don't have any other processes using port 80. This problem may come when other process already uses the same port. -Original Message-

Setting value at runtime in logic:equal

2005-06-21 Thread Brad Rhoads
How do I test statusCode for some other property in my orderObj, instead of hard coding On Hold as I'm doing now? logic:iterate id='orderObj' collection='%= request.getAttribute(orders) %' tr class=lstLine1 td logic:equal name=orderObj property=statusCode

Re: How to pass Jstl param implicit Object to html:link

2005-06-21 Thread Laurie Harper
It is, by definition (at least in a JSTL aware environment). L. Zarar Siddiqi wrote: Make sure params is of type java.util.Map. - Original Message - From: Laurie Harper [EMAIL PROTECTED] To: user@struts.apache.org Sent: Tuesday, June 21, 2005 12:48 PM Subject: Re: How to pass Jstl

Re: [OT] running tomcat on port 80

2005-06-21 Thread Laurie Harper
And on Windows Tomcat may need to run as Administrator (not sure on that). Running Tomcat as root (or Administrator) may not be the best idea, though. The best place to explore this further would be tomcat-users. L. mario nee wrote: in Unix system you must have root permission to open a

Re: Setting value at runtime in logic:equal

2005-06-21 Thread Wendy Smoak
From: Brad Rhoads [EMAIL PROTECTED] How do I test statusCode for some other property in my orderObj, instead of hard coding On Hold as I'm doing now? logic:equal name=orderObj property=statusCode value=On Hold Here's one option... %@ taglib uri=http://java.sun.com/jstl/core; prefix=c % c:if

Re: running tomcat on port 80

2005-06-21 Thread Aleksandar Matijaca
The easiest way to find out what is realy going on is -- telnet localhost 80 If you don't get an error, it means some other process on your machine is running on TCP 80. Do you have some kind of a 'personal web server' enabled by default? If some process does answer on TCP 80 try typing in (in

Re: running tomcat on port 80

2005-06-21 Thread Aleksandar Matijaca
If you are running on Unix/Linux, you must be root to open on TCP 80. If you are running on NT, you *can* run on TCP 80, however, if you allready have a web server that is listening on that port, then you will not be able to open on TCP 80... Regards, Alex. On 6/21/05, Tony Smith [EMAIL

Re: Re: running tomcat on port 80

2005-06-21 Thread John Henry Xu
These are two possibilities. 1. On Unix/Linux based box, if your account doesn't have root priority, you can not start applications on port 80. You need root to start tomcat on linux. 2. So as others point out, it also may be some other web erver running that port 80. regards, Jack H. Xu

How to set autocomplete attribute in html:form

2005-06-21 Thread Néstor Boscán
Hi How do I set the autocomplete attribute in the html:form tag. Regards, Néstor Boscán - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Accessing nested properties

2005-06-21 Thread Fredrik Boström
No, the foo_array is an array of Foo. Each Foo object holds a Bar object wich holds a test field (see sample code). I'm trying to access the test-field's value from within the iteration over Foo objects. Regards, Fredrik Laurie Harper wrote: Change property=bar.test to property=test;

Re: How to set autocomplete attribute in html:form

2005-06-21 Thread Ed Griebel
Hello! This question was asked about a month or two ago on this list. To summarize, it's dependant on a setting in the client browser and depends on a user's entries into a field with the same name on prior form submissions. It is not controllable on a HTML form nor field tag. Google does

Re: Accessing nested properties

2005-06-21 Thread rajiv verma
Try adding the type attribute to the logic:iterate tag. I always do something like this: logic:iterate name=adminAuthCompany id=adminAuthCompanyId type=com.ao.model.auth.IAuthorizationParameter and it works for me. -Rajiv On 6/21/05, Fredrik Boström [EMAIL PROTECTED] wrote: No, the foo_array

Re: Storing data in session scope

2005-06-21 Thread Wendy Smoak
From: Rafael Taboada [EMAIL PROTECTED] I need to store some objects in session scope in order to use around the application. If you need to use them across the entire webapp, then application/context scope might be more appropriate. But either way, what I do is have a Listener that is

Re: Storing data in session scope

2005-06-21 Thread Aleksandar Matijaca
What I would do is, create an index.html, and inside of that index.html, do redirect to a struts action... For example: META HTTP-EQUIV=Refresh CONTENT=0; URL=firstAction.do Then, in your struts, the action mapped through firstAction.do can load up the session with your TAX info...

Re: Storing data in session scope

2005-06-21 Thread Aleksandar Matijaca
Wendy, can you please give me the complete class name of that Listener object? Is it referenced in the web.xml?? Thanks, Alex. On 6/21/05, Wendy Smoak [EMAIL PROTECTED] wrote: From: Rafael Taboada [EMAIL PROTECTED] I need to store some objects in session scope in order to use around

Re: Storing data in session scope

2005-06-21 Thread Frank W. Zammetti
You beat me to punch Wendy, I was just in the middle of tying almost the same reply :) The only complication in such situations to be aware of is when you might need to periodically refresh the data, i.e., maybe the database could possibly be updated throughout the day, but not frequently

RE: Storing data in session scope

2005-06-21 Thread Abdullah Jibaly
in web.xml: listener listener-classcom.acme.web.listener.StartupListener/listener-class /listener StartupListener.java: public class StartupListener implements ServletContextListener { public void contextInitialized(ServletContextEvent event) { context.setAttribute(tax,

Re: Storing data in session scope

2005-06-21 Thread Frank W. Zammetti
If an example of a ContextListener would be helpful, and perhaps even something that will do the trick for you, depending on the requirements, take a look at the code I just checked in to CVS for JavaWebParts: http://sourceforge.net/projects/javawebparts/ It is available in HEAD. I added a

RE: Storing data in session scope

2005-06-21 Thread Abdullah Jibaly
It should be getServletContext().setAttribute(tax, 1.23); -Original Message- From: Abdullah Jibaly Sent: Tuesday, June 21, 2005 4:00 PM To: 'Struts Users Mailing List'; 'Rafael Taboada' Subject: RE: Storing data in session scope in web.xml: listener

Re: Storing data in session scope

2005-06-21 Thread Wendy Smoak
From: Aleksandar Matijaca [EMAIL PROTECTED] Wendy, can you please give me the complete class name of that Listener object? Is it referenced in the web.xml?? HttpSessionListener and ServletContextListener are interfaces that you implement. They require a Servlet 2.3 or better container (Tomcat

RE: Storing data in session scope

2005-06-21 Thread Abdullah Jibaly
ok, maybe I'll get it right today: event.getServletContext().setAttribute(tax, 1.23); -Original Message- From: Abdullah Jibaly Sent: Tuesday, June 21, 2005 4:05 PM To: Struts Users Mailing List Subject: RE: Storing data in session scope It should be

Re: Storing data in session scope

2005-06-21 Thread Ross Gibb
Hi, To get stuff in the application scope at startup we extended org.apache.struts.action.Plugin and overrode the init method put what we want in the application scope. We then load the plugin in struts-config.xml. The plugin gets loaded when struts starts. Since no one else mentioned

Re: Storing data in session scope

2005-06-21 Thread Rafael Taboada
I really appreciate ur help, thanks to everybody for ur reply. In my web.xml file I have: welcome-file-list welcome-file/index.jsp/welcome-file /welcome-file-list So when the user write the URL http://localhost:8084/SanCristobal... It calls the index.jsp file. This file has a frameset (I

Re: Storing data in session scope

2005-06-21 Thread Wendy Smoak
From: Frank W. Zammetti [EMAIL PROTECTED] The only complication in such situations to be aware of is when you might need to periodically refresh the data, i.e., maybe the database could possibly be updated throughout the day, but not frequently enough to hit it every time through. What he

Re: Accessing nested properties

2005-06-21 Thread Fredrik Boström
Thanks, but I couldn't wait any longer for a solution, so I rewrote the whole page with jstl instead. Works like a charm :) Regards, Fredrik rajiv verma wrote: Try adding the type attribute to the logic:iterate tag. I always do something like this: logic:iterate name=adminAuthCompany

Re: Storing data in session scope

2005-06-21 Thread Frank W. Zammetti
Do you truly need this information everywhere in the app? If not you might be able to quite easily get away with just reading it in every time you need it. Create a helper class with a single method that returns some Map or something (or a custom bean, whatever is appropriate) and use this

Re: Storing data in session scope

2005-06-21 Thread Michael Jouravlev
On 6/21/05, Rafael Taboada [EMAIL PROTECTED] wrote: Hi folks. I need to store some objects in session scope in order to use around the application. What is the best way to do that? I need to have TAX value in any place of the application. I thought about creating an Action class y call a

Re: JSTL tag libs

2005-06-21 Thread alan . sinclair
Thanks for the replies. -Original Message- From: [EMAIL PROTECTED] Sent: Jun 20, 2005 5:16 PM To: Struts Users Mailing List user@struts.apache.org, [EMAIL PROTECTED] Subject: Re: JSTL tag libs I'm not positive on this, but I think that the c-rt tags would take expressions in

Tiles exception

2005-06-21 Thread Croff
I have included the tile named search.jsp in a JSP page. App is running fine for an hour (sometime half an hour or sometimes 2 hours) or so, and after that it redirects to the app login page. In the view source, it is being shown as the following: [ServletException

Re: TagHandlerPool

2005-06-21 Thread javendo
Hello Martin, the line is this: org.apache.struts.taglib.html.HtmlTag _jspx_th_html_html_0 = (org.apache.struts.taglib.html.HtmlTag) _jspx_tagPool_html_html.get(org.apache.struts.taglib.html.HtmlTag.class); and the method is: private boolean

[ANN] CRUDAction is added to Struts Dialogs

2005-06-21 Thread Michael Jouravlev
CRUDAction defines all necessary handlers and mappings for basic CRUD operations like create, duplicate, edit, view and delete. Along with proven two-phase input processing (aka Post-Redirect-Get), which saves you and your users from implicit double submits and POSTDATA messages, this class makes

Re: Tiles exception

2005-06-21 Thread Liming Xu
In admin console, choose Applications Enterprise Applications Additional Properties Session Management. - Original Message - From: Croff [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, June 21, 2005 9:27 PM Subject: Tiles exception I have

Re: JSTL tag libs

2005-06-21 Thread Martin Gainty
Erik et al Yes c tag (prefix=c) (uri=http://java.sun.com/jstl/core) uses EL expression as in c:set var=browser value=${header['User-Agent']}/ check out http://java.sun.com/developer/technicalArticles/javaserverpages/faster/ Martin- - Original Message - From: [EMAIL PROTECTED] To:

RE: How to set autocomplete attribute in html:form

2005-06-21 Thread Néstor Boscán
Hi Thanks for the quick reply. If the client has the autocomplete turned on you can control with Internet Explorer which forms or input fields can apply the autocomplete feature with the autocomplete attribute (Check http://msdn.microsoft.com/library/default.asp?url=/workshop/author/forms/aut

Re: [HELP] I couldn't trim() 1 japanese String (charset UTF-8)

2005-06-21 Thread Pham Anh Tuan
Matsuhashi, thank you very very much, my problem is solved :) - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, June 21, 2005 7:02 PM Subject: Re: [HELP] I couldn't trim() 1 japanese String (charset UTF-8) Do you want

Re: running tomcat on port 80

2005-06-21 Thread Sarath PS
If you are using *nix, you will need root access to start a service on 80. On Tue, 2005-06-21 at 09:44 -0700, Tony Smith wrote: Hi, Can I run Tomcat 5.0 on port 80? After setting 80 as port number in the server.xml and starting tomcat, I got the following error message: SEVERE: Error

[HELP] I couldn't trim() 1 japanese String (charset UTF-8)

2005-06-21 Thread Pham Anh Tuan
Matsuhashi, thank you very very much, my problem is solved :) - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, June 21, 2005 7:02 PM Subject: Re: [HELP] I couldn't trim() 1 japanese String (charset UTF-8) Do you want

Re: Setting value at runtime in logic:equal

2005-06-21 Thread Nitesh
You could use logic:equal name=orderObj property=statusCode value=%= val % where you can set val depending on any conditions, input at runtime! HTH Nitesh - Original Message - From: Brad Rhoads [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday,

Re: Market Share / Best of Breed

2005-06-21 Thread Dakota Jack
Interesting, Martin. Thanks! Any more information out there? On 6/21/05, Martin Gainty [EMAIL PROTECTED] wrote: From the numbers (sheer volume) shows Java gaining while all other languages are fighting to stay alive Take a look at http://www.cs.berkeley.edu/~flab/languages.html Martin-

RE: problem with removing form bean

2005-06-21 Thread Rivka Shisman
Hi Martin Durham The mapping is definetly scoped as request, I checked it. The form.reset before leaving the SaveAction does not work, because it finds the bean somehow when arriving back to edit and that exactly the problem. Only reset() in the EditAction it self works, but I really like to