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
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?
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.
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);
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
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
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
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?
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
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
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
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
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
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
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
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]
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~
-
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.
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
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)
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,
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
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
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
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
'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
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
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
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
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,
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
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
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-
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
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
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
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
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
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
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
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]
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;
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
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
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
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...
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
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
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,
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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:
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
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
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
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
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,
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-
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
72 matches
Mail list logo