.
Regards,
-
On Sun, Aug 10, 2008 at 9:55 PM, Richard Yee [EMAIL PROTECTED] wrote:
You are using == to test string equality instead of equals()
-R
Sent from my iPhone
On Aug 8, 2008, at 11:52 PM, Narasimha Raju Naidu [EMAIL PROTECTED]
wrote:
hi to all,
im sending my
You are using == to test string equality instead of equals()
-R
Sent from my iPhone
On Aug 8, 2008, at 11:52 PM, Narasimha Raju Naidu
[EMAIL PROTECTED] wrote:
hi to all,
im sending my code please check where i am doing mistake
form.jsp
---
%@ taglib
Why don't you post your code. It seems that it might have a threading issue.
-R
Arun M wrote:
We are using struts 2.0.11
We have lots of action class. Say one of them is CustomerRegisterAction
(which extends ActionSupport ) . When a say user X registers himself on
the website; this
You might try changing the attributes and setters to Strings and see if
that works.
-Richard
Phil404 wrote:
I would like to draw a Pie Chart using JFreeChart. I call the action from a
JSP like so:
s:url id='chartUrl' action='piechart'
s:param name='visual'10/s:param
Well that is a bit of a broad question. What type of frameworks are you
looking for? If you are a developer, then you should be able to
integrate almost any framework with Struts.
-Richard
puchacz wrote:
Hi
I have a question.
If anyone could list me all frameworks that I can intagrate with
Don't forget that DateFormat and any of its subclasses (ie
SimpleDateFormat) are NOT thread-safe. This means that you can't create
a static class instance of a SimpleDateFormat object that can be used by
different threads without creating a threading issue. If you need to use
a date formatter,
Fea,
You need to add this javascript function to your form jsp files (or
template)
function noenter() {
return !(window.event window.event.keyCode == 13); }
and then add an onkeypress attribute to your text input fields that
looks like this:
onkeypress=return noenter();
-R
fea jabi
Pankaj,
You shouldn't be setting both the value and the property attributes of
html:hidden
-Richard
Pankaj Gupta wrote:
Hi,
In a JSP, I am iterating over a collection and want to set a hidden field
with the value of one of the properties of the objects contained in
hashtable. I am using
Bhay,
Before you spend much time on the current design, I suggest that you try
sending a page with dummy data to a browser that has 1000 rows and 10
columns. You might be able to demonstrate the lack of usability to the
customer and also uncover browser rendering issues with the design.
Tom,
Try this for your options tag instead:
html:options collection=expenseTypes
property=typeCode labelProperty=typeDescription/
This will work if your have an attribute called expenseTypes in some
scope (ie. session, request).
The options tag collection attribute expects the name of
Make sure you don't have any old versions of your form bean in your
classpath or in old jar files from previous builds. From what you have
sent, things look correct and it should work. What tool are you using to
build? Are you using JDeveloper?
-Richard
Daoud Abdelmonem Faleh wrote:
Hello
Use the Boolean wrapper object.
-Richard
Emmanouil Batsis wrote:
Just wondering what people use as a best practice to handle/validate
boolean values in form beans:
* Do you use boolean or string objects in your form beans?
* What do you use instead of @struts.validator type=boolean ?
According to the documentation if you use href, the value passed will be
unchanged. It looks like you should use action=userlogin_display
and the property and name attributes to set the action parameter.
-Richard
Mon Cab wrote:
I have a jsp page called link test (included below), However, the
My appologies. Please disregard. user@struts.apache.org is correct.
-Richard
Yee, Richard K CTR DMDC wrote:
Pankaj,
You are sending this to the wrong address. You should be sending it to
struts-user@jakarta.apache.org
-Richard
-Original Message-
From: [EMAIL PROTECTED] [mailto
I'd suggest doing it in a filter or a base Action class.
-Richard
chamal desilva wrote:
Hi,
How should we test wether a user has permission for an
action. Can we do it in action class or do we have to
do it in EJB tier.
Thanking You,
Chamal.
Look at the Set interface in java.lang.util
-Richard
Nikita Desai wrote:
Hi,
I have one problem in displaying value of form bean in jsp page. In my
action class i am getting collection of formbean from database. Form bean
contains division, heading, date as property. From database I can
Asif,
Do you have a name attribute set in your action definition? The name
attribute should be set to a form-bean name. Why don't you send your
struts-config.xml file?
-Richard
Asif Saleem wrote:
Hi,
I am starting to use struts for my project. I have a proble that the
action
servlet is
Anil,
Is validation-rules.xml located in your /WEB-INF directory and is this
in your struts-config.xml?
plug-in className=org.apache.struts.validator.ValidatorPlugIn
set-property property=pathnames
value=/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml/
-Richard
Jakub,
Why can't you reset the page attribute to the appropriate value in your
Action classes when validation fails.
-Richard
Richard Yee wrote:
Jakub,
I think the more elegant solution is to do the validations in the
ActionForm validate method and also use a hidden static 'page'
variable
and validation process fails
again...
If validation fails i do not enter any action's execute() method.
2006/5/7, Richard Yee [EMAIL PROTECTED]:
Jakub,
Why can't you reset the page attribute to the appropriate value in your
Action classes when validation fails.
-Richard
Richard Yee wrote:
Jakub,
I
Rizwan,
Have you tried using a source level debugger to watch the value of the
boolean in the reset method?
You should also view the source of your page to make sure the checkbox
has the right name.
-Richard
Rizwan Merchant wrote:
Thanks Rick.
I have 6 checkboxes in that session scope
Sandeep,
You can do complex validations in your ActionForm validate method. You
can also still invoke Validator validations by calling super.validate()
in your validation method if you are extending
|org.apache.struts.validator.action.ValidatorForm
I have found that there are many situations
Jakub,
I think the more elegant solution is to do the validations in the
ActionForm validate method and also use a hidden static 'page' variable
in the JSP. Your Action.execute method should be fairly small and mainly
have code that calls business delegates and that necessary for
determining
I know this is supposed to work, but I'm getting an error starting up my
Struts 1.2.8 application on Tomcat 5.5.15 when I unplug my computer from
the Internet.
The stack trace is:
java.net.UnknownHostException: jakarta.apache.org
at
Martin,
Did you subscribe? I was going to point that out to you but since the
last time I used the site, they've started charging $15/yr. to subscribe.
-Richard
Martin Gainty wrote:
Guys-
I found this site extremely helpful
http://www.jarhoo.com/jarhoo/jarfinder.jsp
Sorry for the bother!
What is the form definition for privacyPrefForm? Where is the tag for
your strFirstName field in your form?
Are you using a debugger at all?
-Richard
Karthik Manimaran wrote:
Hi,
I am using the validator framework for form validation. Validation doesnt
seem to happen and no error messages
Karthik,
I don't think you will be able to access your query parameter when you
post your form. Your action attribute in your html:form tag should just
be /Control
Have you looked at the struts-example application?
-Richard
Karthik Manimaran wrote:
Hi,
I am using the validator framework
Does the JSP have a html:form tag in it that has the action attribute
set to an action mapping that has the action form as the value of the
'name' parameter? Otherwise, what scope is the action form in?
-Richard
[EMAIL PROTECTED] wrote:
HI,
I have an action form, an action and a couple of
/data_match/
Quoting Richard Yee [EMAIL PROTECTED]:
Does the JSP have a html:form tag in it that has the action attribute
set to an action mapping that has the action form as the value of the
'name' parameter? Otherwise, what scope is the action form in?
-Richard
[EMAIL PROTECTED] wrote
This error occurs when you are running an earlier JVM with code that was
compiled with a newer JDK. In your case, I think you might be running a
1.4.2 JVM with code that was compiled with the 1.5 JDK.
-Richard
e-denton Java Programmer wrote:
Hi,
I recently uploaded an updated Struts
Jerry,
Are you trying to output HTML? If so, you should consider:
1) using CSS instead of the font tags
2) use an XSLT transform or transform the text as you output it rather
than doing it in memory.
-Richard
Jason Lea wrote:
What is textFormat?
It isn't a StringBuilder is it?
Fea,
To initialize a dynaform staticly, do as Niall
suggested. To dynamically pre-populate a dynaform, you
need code to do it as follows:
ModuleConfig moduleConfig =
RequestUtils.getModuleConfig(request,
getServlet().getServletContext());
FormBeanConfig formConfig =
Vineesh,
You are nesting the bean:write tag within a html:img tag. You can't nest
the tags. Either don't use the html:img tag or replace the bean:write
with a scriptlet %= %
-Richard
vineesh . kumar wrote:
Hi all,
I am trying to create a page, so that based on some crieterial the
You should be aware that when using a java.text.DateFormat class or its
subclass as a static variable in a bean that can be accessed via
multiple threads simultaneously, you need to synchronize access to it
because DateFormat is not thread-safe. So you should change the code
below to:
Mick,
You could write a wrapper object that wraps (extends)
the generated object and implements the interface. If
the extended object does not have all of the methods
defined in the interface, you will get a compile
error.
-Richard
--- Mick Knutson [EMAIL PROTECTED] wrote:
I have some
Has anyone used the StrutsPleaseWait solution from the
Struts Wiki with DynaForms? It seems that the code in
the example doesn't handle DynaActionForms correctly
because
org.apache.commons.beanutils.BeanUtils.cloneBean() is
used to clone the form. Has anyone else arrived at the
same conclusion? I
.
-Richard
--- Dakota Jack [EMAIL PROTECTED] wrote:
Actually this won't work either. The problem is
that the request
object has been purloined and given another wrapper
name. You might
want to look at the code before giving these ideas.
On 10/10/05, Richard Yee [EMAIL PROTECTED] wrote
Try getParameter() instead of getAttribute().
-Richard
C.F. Scheidecker Antunes wrote:
Hello all,
I have two submit buttons, one with a value of Continue and the other
Back.
How do I check their values?
I've tried request.getAttribute(submit).toString() but I do not get
anything.
My
My suggestion is to use an IDE that has source level debugging
(JDeveloper, Eclipse, NetBeans). If you start your appserver in
debugging mode, you can connect remotely with your IDE and step through
the code and observe variable values.
-Richard
Bryon Lape wrote:
Bryon Lape wrote:
Carl,
Check the CactusStrutsTestCase javadoc. You should use
verifyTilesForward instead of verifyForward(). There is also a
verifyInputTilesForward() too.
-Richard
Carl Smith wrote:
Is there any helps here? Thank you in advance.
Carl Smith [EMAIL PROTECTED] wrote:
I am sorry for this a
Does anyone know if StrutsTestCase works with the Struts Validator? ie.
If I make a test case and set up the request parameters for a FormBean,
will the FormBean be validated using the Validator Configuration in my
struts-config.xml file.
Thanks,
Richard
Is the ampersand part of the XML message being sent
back to the browser from the servlet? If so, you need
to escape the ampersand in the servlet before it is
sent in the servlet response. The ampersand is a
special character in XML.
-Richard
--- Frank W. Zammetti [EMAIL PROTECTED] wrote:
Can you set the listIndex as an attribute of your form
in the EditStudentAction? You can then retrieve it as
part of your formBean.
-Richard
--- Rivka Shisman [EMAIL PROTECTED] wrote:
Hello friends
I have an EditStudent.jsp page in which I have a
form. Before the form
tag I get a
have thought the amp; entity would have
worked frankly, but he
said it didn't).
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
On Tue, September 6, 2005 12:09 pm, Richard Yee
said:
Is the ampersand part of the XML message being
http://www.omnytex.com
On Tue, September 6, 2005 12:09 pm, Richard Yee
said:
Is the ampersand part of the XML message being
sent
back to the browser from the servlet? If so, you
need
to escape the ampersand in the servlet before it
is
sent in the servlet response. The ampersand
David,
The escape() JavaScript function can't be used to
solve this problem b/c it occurs when the response is
being retrieved in the JavaScript callback function if
req.responseXML is used.
-Richard
--- David Durham [EMAIL PROTECTED] wrote:
Richard Yee wrote:
You should be using
Has anyone used an ImageButtonBean in a
DynaActionForm? I'm getting the following error:
org.apache.commons.beanutils.ConversionException:
Cannot assign value of type 'java.lang.String' to
property 'submitButton' of type
'org.apache.struts.util.ImageButtonBean'
My jsp page has this in it:
Does anyone know how to determine the versions of the
commons libraries that are included as part of Struts?
Specifically, I need to find out the versions of the
commons libraries that are part of the Struts 1.1
distribution. I am using the display tag library
(www.displaytag.org) and found that
Does anyone on the list have any recommendations
regarding putting the commons-XXX jar files that are
deployed with struts at the application server
container level instead of at the application level in
the WEB-INF/lib directory? I'm interested in doing
this in order to save on the memory
Kevin,
Use attributes in the request or session scope.
-Richard
At 07:28 AM 8/14/2005, you wrote:
Hi
I want to trasnfer data from One action to another
using a form bean.
How can i access the form bean data in the second
action.
I have attached my struts config and action class.
The
Balkan,
The values retrieved from the database don't need to be put into an
ActionForm. Just put the collection or bean as a session or request
attribute in your Action class, forward to your second page, and then
retrieve the values and display them. There is no need to have an
ActionForm
Anyone on the list going to JavaOne?
-Richard
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
What is the entry in your struts-config.xml file for your form. It doesn't
appear that it is a DynaForm. If it isn't then you can just do a new
formDataCopy().
-Richard
At 04:43 AM 2/23/2005, you wrote:
Does anyone have an idea on this? I am trying to create a
LazyValidatorForm object in code
Tim,
Without seeing the entire sqlMapConfig.xml it's going to be hard for anyone
to figure out exactly what the problem is. You can get more direct help by
posting at [EMAIL PROTECTED]
I think you also need a DataSource property in your transactionManager.
This is what I use. I don't set
with that name in the configuration files.
Tim Christopher
On Mon, 21 Feb 2005 08:23:55 -0800, Richard Yee [EMAIL PROTECTED] wrote:
Tim,
Without seeing the entire sqlMapConfig.xml it's going to be hard for anyone
to figure out exactly what the problem is. You can get more direct help by
posting
back to the pet store example it refers to the
datasource in the web.xml file as jdbc/jpetstore1 but I can't find any
element with that name in the configuration files.
Tim Christopher
On Mon, 21 Feb 2005 08:23:55 -0800, Richard Yee [EMAIL PROTECTED] wrote:
Tim,
Without seeing the entire
What other methods do you want it to handle? Get and post are the one ones
that handle form input.
Regards,
Richard
At 04:07 PM 2/11/2005, you wrote:
Hi folks,
Would anybody please tell me if Struts handles any methods other than get
and post?
Thanks!
Billy Ng
Why don't you send the code in your reset() method so we can see if it is
correct.
-Richard
At 05:51 PM 1/15/2005, you wrote:
I am initializing ArrayList fields in reset(), but code is ommited.
I wish it was that easy :)
On Sat, 15 Jan 2005 19:17:09 -0600, Kishore Senji [EMAIL PROTECTED] wrote:
There is also a feature in JDeveloper 10g that lets you monitor TCP/IP
traffic using a proxy. If you use the Apache SOAP library, there is another
utility available inside it called TcpTunnelGUI in the
org.apache.soap.util.net package.
-Richard
At 02:47 PM 1/10/2005, you wrote:
Jim Barrows
If the hidden field is not part of the form, then you don't want to use the
html:hidden tag in your JSP page, you want to use the plain input
type=hidden name=regularPlan value=xxx/ and then use
request.getParameter(regularPlan in your Action class to get it.
-Richard
At 10:57 PM 1/6/2005, you
It is because the action class execute method is only executed when the
form is submitted, not when it is displayed. If you want to pre-load the
form, you need to create an action and either forward or redirect to the
action which then forwards to the page that displays the form.
-Richard
At
David,
Put the commons-logging.jar in your E:\Program Files\Apache Group\Tomcat
4.1\common\lib
directory.
-Richard
At 08:42 PM 1/1/2005, you wrote:
(i tried sending this a few times from the wrong mail account - hope it
only gets through once)
Hi all,
Apologies for this question. It is
Sudheer,
Check your web.xml file. It appears that you are missing the servlet and
servlet-mapping entries
for the ActionServlet.
servlet
servlet-nameaction/servlet-name
servlet-classorg.apache.struts.action.ActionServlet/servlet-class
init-param
param-nameconfig/param-name
Zsolt,
The selected item in a html:select input is typically a String property. It
is separate from the collection that is used to populate a dropdown list.
You should have a getter and setter for a string property and use that
property as the value of the property attribute of the html:select
What URL are you using to access the web application?
What does your config file look like? How did you
deploy your application?
-R
--- Nishant [EMAIL PROTECTED] wrote:
hi to all,
i am using tomcat apache server
i am getting following error..
error There is no web application
Dennis,
Are you closing the connection in a finally clause? If you don't, you are
going to leak connections when an exception gets thrown.
-Richard
At 04:51 PM 10/3/2004, you wrote:
I open an httpsURLConnection in my struts application. And I am getting
orphaned sessions. I think this may be due
Chris,
There are several reasons to use a forward instead of a redirect.
1) Forwards are faster b/c they do not result in another request being
generated from the browser.
2) Forwards allow information to be passed in the request object rather
than as strings in the query parameters on a URL or
I believe that a period is not allowed in an identifier. You should pick
another name for your form.
-Richard
At 09:59 PM 8/31/2004, you wrote:
Hi!
I have some forms with dots in their names.
The problem is that the JS validation code being generated is not quite
right
Is there a
Muhammad,
The JSP is evaluated on the server and then sent to the browser. When you
change a value on the web page, you submit the form to an Action class
which then takes the form properties and should update your collection and
then persist it or put it in request or session scope. You can
user clicks
submit, the values will be updated in the scope. Weird, my application
should break in that case..I must be doing something wrong but somehow
it still works..
Sebastian Ho
On Wed, 2004-08-25 at 14:54, Richard Yee wrote:
Muhammad,
The JSP is evaluated on the server and then sent
Mike,
What does the generated HTML look like?
-Richard
__
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
-
To unsubscribe,
Ricardo,
If you are going to use the html:link tag, then you
need to have it trigger a call to a JavaScript
function that will submit the form for you. Otherwise,
jjust clicking the link will not submit the form.
Regards,
Richard
--- Ricardo Cortes [EMAIL PROTECTED] wrote:
Hi there,
I am
Andy,
You are mixing JSP scriptlets and JSTL expressions.
You can:
1) use the JSTL forEach tag which is in the core library
2) use the struts logic:iterate tag
3) (least preferable) use scriptlets and access productData.someCount
directly rather than throug a JSTL expression.
Regards,
Richard
At
Tom,
The form bean is created both in the JSP page and when
the page is submitted back to the server.
Regards,
Richard
--- Thomas T. Veldhouse [EMAIL PROTECTED] wrote:
Thomas T. Veldhouse wrote:
I am having a problem using Action forms because I
do not know what
to call the attributes
Duncan,
Is there a switch or something on oc4j that will cause the
ServletContextListener.contextInitialized() method to be called before the
init methods of the servlets that are configured to load on startup? I
think the behavior I have seen on OAS 9.0.3 is that contextInitialized()
happens
The error indicates that the input attribute for your
action whose path is /tb_alarmeDataAction is invalid.
This is most likely caused by specifying a
non-existent formBean as the action's input
Regards,
Richard
--- Teixeira, Jorge (Informaker)
[EMAIL PROTECTED] wrote:
Help me pleash.
I
With the information you provided, it is hard to tell what the problem is.
Send the contents of your struts-config.xml and which action you are invoking.
Regards,
Richard
At 07:16 AM 5/16/2004, you wrote:
Hi,
I am writing a web application based on Struts and encountered a problem.
When I ran
pls,
If the form exists in session scope, then you need to
remove it from session using the
request.getSession.removeAttribute(formName) method
call. Otherwise, when the JSP page is executed, struts
will use the form from the session.
Regards,
Richard
--- pls [EMAIL PROTECTED] wrote:
that
.. the values still
reappear (except for the multiboxes whcih are
cleared in the reset() method)
after
request.getSession().removeAttribute(MBForm); and
a forward to the
next action.
Richard Yee [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
pls,
If the form exists
Ralf,
What is the speed of your connection? What is the
speed of the client's connection? How fast is your
server? What is the load on the server? You need to
consider those questions before pinning the problem on
the Struts file upload.
Regards,
Richard
--- Ralf Alt [EMAIL PROTECTED] wrote:
darn! I knew I should have answered this one!
-R
Dude, send me your address and I will fed-ex you a cold beer
!!
I should have thought of that before. Thanks for your help I've
just wasted 24 hours
on this If I was running linux I could have ran a
Craig,
When I put logging statements in the ServletContextInitializer class, I see
that the ServletContextInitializer.contextInitialized() method is actually
called after the servlet init() methods for servlets that load at startup.
Is this correct? You say that the contextInitialized() gets
Hi,
Did you set the logging level to DEBUG? Try putting validate=true in your
action element in struts-config.xml. Can you see if your execute method in
your Action class is getting executed in your debugger.
-Richard
At 06:50 PM 4/24/2004, you wrote:
Hi neil:
Niall Pemberton wrote:
OK, so
No, an iframe cannot access resources under WEB-INF.
Note that 'WEB-INF' is case-sensitive. You will
eventually encounter problems if you don't use
'WEB-INF' in your paths.
Files located under the WEB-INF directory are only
accessible from within the web application (ie. from
servlets).
Regards,
Shahak,
Why won't a filter work in you Servlet 2.3
environment? Filters exist in the Servlet 2.3 spec.
They don't exist in the Servlet 2.2 spec.
Regards,
Richard
--- [EMAIL PROTECTED] wrote:
I'm trying to use a custom tag to gzip (compress)
pages (filter won't work because I'm in a servlet
Paul,
You shouldn't keep an instance of SimpleDateFormat as
an instance variable even though you are only using
the parse method. The reason is that the
SimpleDateFormat class is not thread-safe. This is
caused by the fact that the DateFormat class isn't
threadsafe due to the fact that a value
Andy,
Put this in your jsp page. If you create a JSP
template file that includes this code and then use it
as a basis for developing new JSP pages, you will be
able to see what is in your request, session and
ActionMessages. I found it in this article on
javaboutique by Keld H. Hanson:
Panchasheel,
Use the Logic: testing tags (equal, notEqual,
lessEqual, etc.) or the JSTL if tag.
Regards,
Richard
--- Gandle, Panchasheel [EMAIL PROTECTED] wrote:
How do I say continue In the
Logic:iterator tag
Thanks
Panchasheel
This logic isn't going to help the problem.
logic:iterate index=indexId
input type=hidden value=c:out
var=indexId//
All it is going to do is create a bunch of input
parameters with type=hidden and having values of
0,1,2,3
What does your form really look like? Do you have
multiple
89 matches
Mail list logo