In Java, sometimes you would define an interface containg the constants:
public interface MyInterface {
public static final String YES = "yes";
}
To access the contants, there are two ways
public class WayOne {
public void myMethod(){
String yes = MyInterface.YES;
Thanks all for the hot discussion. However, the discussion has gone too far off
my original question. I suggest not to discuss whether or not we should have an
interface just for constants, instead
I have decieded to use the constant interface (no matter it is good or not, I
beleive it will n
I am using ActionMessage:
actionMessages.add(ActionMessages.GLOBAL_MESSAGE,
new ActionMessage("message.key",
parameter1,parameter1,parameter2,parameter3));
saveMessages(request,actionMessages);
parameter3="Thank you!"
However on my jsp I see Thank you!, html tag shows
I am designing a new class and wondering what class are a good candidates for
the class attribute. I know String, Date, Integer, int, fload, boolean, Boolean
all are good for instance variables, but classes/interfaces like Map,
InputStream, Iterator are also good instance variable cadidate? Why?
Our app's websphere log has a lot of errors lised below, this is not a class
path issue, but whatelse reasons? And also what does "us" in the message below
mean? Thanks in advace.
: [Servlet Error]-[us]: Failed to load servlet:
java.lang.ClassNotFoundException: us
at
com.ibm.ws.clas
I have a jsp containing an indexed test box field, and I need to validate the
user enter a value into all the text boxes when clicking on the save button.
Validation is done OK, but there is an issue. Let me give you an example
illustrating the issue: if there are three text boxes, the user ente
;ll need to see the relevant parts of your struts-config.xml too
(specifically, the form bean and action mapping definitions).
L.
Carl Smith wrote:
> I have a jsp containing an indexed test box field, and I need to validate the
> user enter a value into all the text boxes when clicking o
We are using struts framework in our J2EE web application. In struts there is a
LabelValueBean class, is it a good practice to use LabelValueBean in our
application? For example, DAO returns a list of LabelValueBean for html drop
down?
There was an argument saying that it is not good to use La
In my application I have two configuration file (1) struts-config.xml and (2)
struts-app1.xml. I have this entry in the web.xml
action
/*.app1
When using this approach, I have a strange issue: For almost all the form
submit, in the url the action will automatically apend .app1, example
I am trying to develop a waiting page when the submit button is clicked on. The
waiting page will be simply some dynamic images rotating indicating the process
on going. When the process behind the scene is done, the waiting page is done
too.
Do you folks have a J2EE solution? Thanks.
_
In sturts there is a valdation errors, I have a case that I need to add some
custom error message from other businsess object to the struts validation so
that these messages can be put into the same placeholder as other struts
validation errors and display on the same time.
Can you tell me wha
We are using struts date validator, for some reason we found that the struts
"date" validator let 04/02/05 pass, but we are hoping that the validation fails
since 04/02/05 is not of format MM/dd/.
Did you have the same issue? What is the correct way to validate the date?
Thanks.
Here is my configuration in validation.xml, I need to validate date entered by
user using MM/dd/ format. What is your suggestion? Thanks.
Erik Weber <[EMAIL PROTECTED]> wrote:I think you want datePatternStrict instead
of datePattern.
Erik
Carl Smith wrote:
>We
In my application, I need to get all the HTTP request parameter names and their
values, I am using HttpServletRequest.getParameterNames() and it works very
well. Then in one of my page, I have to submit the request as a type of
"multipart/form-data", and then I found out
HttpServletRequest.get
I am having issues to get the request parameters from a multipart request, le
me explain my problem first:
Our flow of process is:
(1) a multipart request is submitted to a struts action (let's say
updateTableAction.do) using POST
(2) the multipart request is processed by ActionServlet.proces
Struts privide strong C (of MVC) components, tyical of which are ActionServlet,
Actions and RequestProcessors, but I am wondering which part is the M (of MVC).
Thanks.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection ar
I have an attribute in my ActionForm (called myForm) called text, this text
have a value of
http://www.yahoo.com";>Click here to Yahoo.com, now I want this
attribute to be displayed on web page as a hyper link. I used , which prints http://www.yahoo.com";>Click here to Yahoo.com on the screen.
Thank you Leon Rosenberg and Raj Tilak, this works perfect by turning
filter="false".
Leon Rosenberg <[EMAIL PROTECTED]> wrote:
In this (and only this case) you can use bean:write with filter="false"
This will work
> -Ursprüngliche Nachricht-
>
in this RequestProcessor.process() method, there are some methods are place
holders for our specific application to over ride. Say in our application we
have a logic to be checked to see if user has access to the certain page. Which
method
(processPreprocess();processRoles();processPopulate();
In Java/J2EE community, it seems that a lot of experienced developers tend to
use a lot of interfaces, however, a lot of junior developers ignore using
interface. I am not sure why interfaces seem to be favorite to some experienced
developers. Can some one explain this?Can you give examples whe
I have two struts-config.xml files. One is Struts default struts-config.xml and
the other one is called
struts-my.xml. and I have configued these two xml files in web.xml so that
ActionServlet can take both struts-config.xml
and struts-my.xml. See following:
action
org.apache.struts.ac
For eg:
public void testDisplay() throws Exception {
setConfigFile("/WEB-INF/struts-config.xml,/WEB-INF/struts-my.xml");
setRequestPathInfo("/MyAction");
actionPerform();
verifyForward("Your_forwardTarget_Path");
verifyNoActionErrors();
}
On 9/15/05, Carl Smith wrote:
I am sorry for this a little long question, but you will be finding it
interesting... Simply put, I have (1),(2) and (3), then we I run struts
testing, I got error described as (4)
(1) item in struts-config.xml
(2) item in tiles-defs.xml
Is there any helps here? Thank you in advance.
Carl Smith <[EMAIL PROTECTED]> wrote:
I am sorry for this a little long question, but you will be finding it
interesting... Simply put, I have (1),(2) and (3), then we I run struts
testing, I got error described as (4)
(1) item in
ase 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 wrote:
> I am sorry for this a little long question, but
Can you describe in which case we should be using SwitchAction.java in struts?
Can you offer some sample code? Is this used for multiple submit buttons (save,
delete, update, cancle buttons for example) on one jsp page? Thanks.
-
Yahoo! for Good
I seem to have a issue using 's onclick. My value of onclick is a
javascript performing form.submit(), but I found out this is not working.
However if I chang my button to then the javascript is working.
Why this is the case? Thanks.
-
Yahoo! M
lass) is derived from same parent as html:form
(javax.servlet.jsp.tagext.TagSupport)
so the characteristic of a server side Tag class(dynamically) generating
JavaScript holds true
Does this answer your question?
Martin-
- Original Message -----
From: "Carl Smith"
To: "S
n fact
org.apache.struts.taglib.html.BaseHandlerTag which has an onClick event you
can use
then again why would your javascript function be calling
JavaScriptFunction()
{ form.submit(); }
when your submit logic is already processing the onClick event ?
M-
- Original Message -
From: "Carl
I need disallow a user from entering more than 2000 character in the
tag, however,struts disallow the maxlength attribute on this
tag, and suggestions or workaround?
-
Yahoo! FareChase - Search multiple travel sites in one click.
to handle re-display of the form. In either case,
to goal is to not trample the data in the form during re-display.
L.
Carl Smith wrote:
> First of all Thank you Laurie, you are the only one anwering my questions :):
>
> Here are my struts-config.xml entries for the actions and form
It is practical to share the same action form by different
actions, For example (I only listed two actions sharing the same form here,
but the questions apply for multiple actions sharing the same form):
Then the question is:is it a good practice to set up the sharedForm
Thank you Michael for the reply. I like the answer, which agree with what I
thought, but can you explain it in a little detail? The website you attached
doesn't clearly explain your answer "No".
Thanks.
Michael Jouravlev <[EMAIL PROTECTED]> wrote:
On 4/6/06, Carl
Hello folks, I got two replies, can someone else offer some more insights on
this topic?
Thanks.
It is practical to share the same action form by different
actions, For example (I only listed two actions sharing the same form here,
but the questions apply for multiple actions sha
I have a jsp containing three text fields which are indexed property, I needs
to validate all the text box contains a value other than null or empth string.
When I click on save I got the error (see the bottom). Your helps are highly
appreciated!
jsp:
(1) indexed property - text box
Interestingly if I change the config for testingForm to be of scope session,
then it works. However I can't use session scope so still need the answer for
my original question, can some one help? Thanks.
Carl Smith <[EMAIL PROTECTED]> wrote:
I have a jsp containing three text f
JavaBeans Specification doesn't allow more than one setter method (with
different argument signatures) for the same property, in other words, JavaBeans
specification doesn't allow the method overloading for property setters, does
this also apply for Struts ActionForms? Is so, why I did have an
I have an indexed property which is a tipical list of textboxes, I have a
requirement to validate that the user need to at least enter values into one
text box. How can you configure this using Struts "required" validator? Thanks
in advance.
Can you folks comment on the reason behind sharing the same form bean by
multiple actions:
(1) so that the receive action can see the data for submit action
(2) sharing the data across the page navigation?
more ?
Thanks.
-
Yahoo
Is there any response on this? Thanks.
Carl Smith <[EMAIL PROTECTED]> wrote: Can you folks comment on the reason
behind sharing the same form bean by multiple actions:
(1) so that the receive action can see the data for submit action
(2) sharing the data across the page navigation
Does struts have an intrisic validator for time entered using a format as
HH:mm:ss? Thanks.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
I am not sure if this is workable, but my requirement was that
Two Fields, startDate and endDate, I need to validate the endDate is
greater/older than the startDate. Is this something workable/configurable using
struts validator?
Thanks.
dar.
Harsh. Man I got a lot of free time today.
-----Original Message-
From: Carl Smith [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 25, 2006 2:20 PM
To: Struts Users Mailing List
Subject: Validation for second field must greater than the first field
I am not sure if this is workable, but
I recently have an issue with my J2EE apps. Some times when a lot of users use
our apps, we got the session overflow issue. Can some one let me know how to
start resolve the issue? Can some one direct me with starting information like
what a session is? Also if you open two IE browser window in
Is there anyway in J2EE to get how many active sessions are in the system?
Thanks in advance.
__
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Folks, I am working on some issues related to session. I would like to know
if the following are true:
(1) the number of the concurrent online user may or may not be the same as
the number of sessions
(2)simply put, when you open one browser and visit a website, the
server(Webspher
.
Thanks.
Wendy Smoak <[EMAIL PROTECTED]> wrote:
On 6/15/06, Carl Smith wrote:
> (2)simply put, when you open one browser and visit a website, the
> server(Websphere for example) creates one session, then if you open another
> browser in the same computer, the sever will create
I am trying to get the session size of our J2EE Struts based, and runing in
WebSphere environment, application. Can some one point me what is the good way
to get the session size? What tool is a good tool for using? WSAD Profiling?
-
Yahoo! Mess
48 matches
Mail list logo