Hello,
i am new in Struts and to develop simple tests to rise my skill. I use
Struts in combination with IBM RAD 6.0 (patched to 6.1.1.2). When i try to
use struts variables in my simple JSP i got compile failures with the
information of unknown variables. I define the vars by the following way
i.
Scott Van Wart ha scritto:
Hello,
I have a tiles-defs.xml similar to the following (layout page with
banner on top, content on bottom):
So let's say my layout.jsp looks something like this:
It's not quite enough to do w
Srrry!!! For a mistake I pressed "Send" button without writing
anything...
Scott Van Wart ha scritto:
So in the above, I want to change the ... depending on
whether it's an add or edit operation. Can I do this?
Change "edit" definition to:
And then layout.jsp to
Hi,
am still not able to recieve any error messages in the jsp. Is there any way
to print those messages in the action form with system. out.printlns so that i
will check in the console. I dont understand whether its checking or not, coz
its not entering into the form even i run in debug
Still nobody knows?
Shervin Asgari wrote:
request.setAttribute("websiteModel", new
DomainAdminAction.DomainAdminEditPageModel(
"domainWebsiteAdminEdit.title", request, response,
mapping, dd));
if (request.getAttribute("websiteModel") == null) {
request
Hi,
I am using in the jsp page and using
date validator plugin ,and it is showing error message
as mentioned in the MessageResources.properties
file.My question is I want to show ,hide some fields
in the jsp page if error is occured.How to check in
the jsp page if there is any error occured.
any h
Shervin Asgari ha scritto:
request.setAttribute("websiteModel", new
DomainAdminAction.DomainAdminEditPageModel(
"domainWebsiteAdminEdit.title", request, response,
mapping, dd));
if (request.getAttribute("domainWebsiteModel") == null) {
request.setAtt
Paste the complete code for action form, snippet in JSP where you are
fetching the messages.
~madhav
On 6/21/06, Medicherla Lakshmi <[EMAIL PROTECTED]> wrote:
Hi,
am still not able to recieve any error messages in the jsp. Is there
any way to print those messages in the action form with sy
Consider a scenario of a clustered environment where there are multiple
servers handling requests from an application. On each of these servers
session object will be replicated. This means that the same request can go
more than once.
Shouldn't this solution fail then?
~madhav
On 6/21/06, Paul
I don't think you either read the whole mail or understood what my
question was. Of course those are my classes, but it is extended by
Basemodel which is used by Struts.
I wanted help on how to access another Basemodel in another Actionclass,
because the way I am doing it gives me compile erro
Sorry, I could not get you. Can u please be more clear with the information.
Madhav Bhargava <[EMAIL PROTECTED]> wrote: Paste the complete code for action
form, snippet in JSP where you are
fetching the messages.
~madhav
On 6/21/06, Medicherla Lakshmi wrote:
>
> Hi,
>
> am still not able to r
Shervin Asgari ha scritto:
I don't think you either read the whole mail or understood what my
question was. Of course those are my classes, but it is extended by
Basemodel which is used by Struts.
Do you mean this?
http://rollerweblogger.org/javadoc/org/roller/presentation/BasePageModel.html
I
Provide the following:
1. Action form code - complete
2. JSP snippet that you are using to print the messages
Alternatively postpone the validation till the action class. In the action
class check for user name and password and if there is a problem then set
the errors as:
ActionErrors errMessag
Hm. You are right. I am sorry :)
I will ask them instead. Again, terribly sorry...
Shervin
Antonio Petrelli wrote:
Shervin Asgari ha scritto:
I don't think you either read the whole mail or understood what my
question was. Of course those are my classes, but it is extended by
Basemodel which
hi,
i am trying to recieve the status of all checkboxes in my JSP file using
form bean . I am using tag in my JSP . Can anybdy
suggest me how to get the status of all checkboxes .
presently, the form bean just returns me the selected checkbox's value
array ..
Thanks
Kavita
Thanks for the respone..:) i got the solution , that is the Fix for
Bugzilla #2233..single quote escape charcter is \' with formatKey.
Monkeyden
yes, I had set contentType="text/html; charset=UTF-8" but there's no effect
:(
- Original Message -
From: "Truong Xuan Tinh" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Wednesday, June 21, 2006 1:56 PM
Subject: Re: [HELP] I use struts + Velocity, I couldn't submit 1 form
how can i set the maximum number of chars in a textarea. i can only set columns
and rows.
Regards,
Abhimanyu Koul
FinEng Solutions (P) Ltd.
Mobile : +91 9819510090
Darren,
In your code, instead of using
"protected static Log log = LogFactory.getLog(ControllerServlet.class);"
You should have used
"import org.apache.log4j.Logger;"
"private static Logger log = Logger.getLogger(ControllerServlet.class);"
And then use following for logging
"log.info("Your
You are right Dave. I'm sorry for writing so. It doesn't give the desired
result :(
-Original Message-
From: Dave Newton [mailto:[EMAIL PROTECTED]
Sent: Monday, June 19, 2006 5:14 PM
To: Struts Users Mailing List
Subject: Re: Default value for text field
Mukta wrote:
> You can use
> /
Hi,
Call a javascript method onKeyPressDown to validate the length.
--CODE--
function checkLength(obj,max){
if(obj.value.length>max){
alert(obj.name+" feild cannot be more than "+max);
}
}
/// some HTML
/// some HTML
--CODE-
You must set both attributes like this:<%@ page pageEncoding="UTF-8"
contentType="text/html; charset=UTF-8"%>
By the way, which version of Tomcat are you using? You can search the
JIRA database of Tomcat to check whether it's a bug ot Tomcat.
Pham Anh Tuan wrote:
> yes, I had set contentType="text/
You have to write a javascript function to check in the following event:
onFocus, onChange and onKeyUp of the textarea.
Regards,
Abhimanyu Koul wrote:
> how can i set the maximum number of chars in a textarea. i can only set
> columns and rows.
>
> Regards,
> Abhimanyu Koul
> FinEng Solutions (P)
Abhimanyu Koul wrote:
how can i set the maximum number of chars in a textarea. i can only set columns
and rows.
Regards,
Abhimanyu Koul
FinEng Solutions (P) Ltd.
Mobile : +91 9819510090
The only way to do this would be with JavaScript. You'd do something
like this:
function checkLeng
Hi Abhimanyu,
Wouldn't you do the validation the "struts" way? Do the validation, chop
and warn.
-Original Message-
From: Truong Xuan Tinh [mailto:[EMAIL PROTECTED]
Sent: 21 June 2006 12:47 PM
To: Struts Users Mailing List
Subject: Re: textarea
You have to write a javascript function to
hello
I'm a newbie to struts framework
if anybody knows of a quick start easy tutorial that can get me on the road
links ? pdf ?
Thank you
hicham
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAI
Dear all,
How can I validate at least any one should be selected in the select
tag.
Using validator framework in client side validation. By default it
contains "--Select--" on page load.
Eg:
--Select--
Admin
You can use an org.apache.struts.action.ActionRedirect
ActionForward forward = mapping.findForward("reload");
ActionRedirect redirect = new ActionRedirect(forward);
redirect.addParameter("id", idValue);
return redirect;
Antonis Lebesis wrote:
Hi,
I do have a SelectFooAction (actually it's cal
Yes - of course it would. The solution is only for one JVM. You will need
another approach for a clustered environment.
Madhav Bhargava <[EMAIL PROTECTED]> wrote: Consider a scenario of a clustered
environment where there are multiple
servers handling requests from an application. On each of the
For a single JVM this is a nice way to handle multipel submits. But then a
solution should never be limited to one JVM and if it has problems when
multiple JVM;s come into the picture then it should re-thought upon. I would
rather not go for such a solution even though it is a good solution for a
There's too many to mention; here are some of my favorites:
http://struts.apache.org/struts-action/index.html
http://struts.apache.org/struts-action/userGuide/index.html
http://www.learntechnology.net/ Look at Struts Lessons in left menu
http://courses.coreservlets.com/Course-Materials/struts.htm
Hi all,
I need to open a popup screen from a main window (on click of a button),
with the same data as the main window. (The purpose is that the popup
will serve a print preview screen for the data to be printed.)
I cannot go to the server back and fetch the data. (This needs to be
implemented
in my form have
.
.
in jsp
...
...
styleId="copyImgID" onclick="setMethodName();"/>
JS is
function setMethodName() {
document.forms[0].method.value="Copy";
This is a quick a thought from me.
>From within the servlet's output stream save the content as a file of
your choice in temp folder, that you can access later.
If creating a folder is not permissible then saving as in-memory-data
into session object will be a good choice, that can also be acces
Antonio Petrelli wrote:
Anyway I don't think it is a good way of doing this kind of things.
I'd write two definitions (one for create and one for edit) sharing
the same layout page
The original method you proposed (two different puts in the same
definition) wouldn't work, as it's layout.jsp tha
Kavita Mehta wrote:
i am trying to recieve the status of all checkboxes in my JSP file
using form bean . I am using tag in my JSP . Can
anybdy suggest me how to get the status of all checkboxes .
presently, the form bean just returns me the selected checkbox's value
array ..
That's how checkbo
Hi,
I have a form which has 3 submit buttons .
which is a gud ides ...
1) having seperate 3 action classes for each
2) having a single action class which manages the submit action based on
the button which has called this action class.
Thanks,
Kavita
---
Hi
I have two text boxes with the same name .
Only one of them is a 'required' field.
how should i do this.
thanks.
--
View this message in context:
http://www.nabble.com/Validation-a-specific-element-in-an-Stringt1824259.html#a4975395
Sent from the Struts - User forum at Nabble.com.
How can I use the Struts Validator to enforce the above rule? Neither
of the fields are required, but if both are given, they must adhere to
the given rule.
Thanks for any help,
_
Jeremy Nix
Senior Application Developer
Southwest Financial Services, Ltd.
(513)
Kavita Mehta wrote:
Hi,
I have a form which has 3 submit buttons .
which is a gud ides ...
1) having seperate 3 action classes for each
2) having a single action class which manages the submit action based
on the button which has called this action class.
It's up to you ;). I typically divide
If your implementation is similar to what Scott has mentioned (i.e.
different operations on the same type of object), then I consider this a
classic example of a DispatchAction, where type of business entity doesn't
change...just the selected operation on the business entity, thus it makes
sense t
I had thought about that. I like this idea, but just having mutex is
not enough. Consider following scenario:
* A user submits a request, say this is a checkout process
* Server locks the session
* The user is impatient and submits another request, but it waits on the mutex
* First request finish
On 6/21/06, Ed Griebel <[EMAIL PROTECTED]> wrote:
There's too many to mention; here are some of my favorites:
http://struts.apache.org/struts-action/index.html
http://struts.apache.org/struts-action/userGuide/index.html
http://www.learntechnology.net/ Look at Struts Lessons in left menu
http://c
I'm as forward-thinking as the next guy but let's not lose sight of the fact
that, despite how pragmatic we engineers like to be, many more than half of
the applications developed and deployed are done so on a single JVM. An
overwhelming majority of those applications originally deployed on a sin
Monkeyden, I'd be careful with that assumption... clustering is pretty
common in mid to large organizations based on my experience... I think
any design that doesn't take it into consideration is a bad design.
Even if your in a 5-person shop now running on a single server, do you
want to deal w
Monkeyden wrote:
If your implementation is similar to what Scott has mentioned (i.e.
different operations on the same type of object), then I consider this a
classic example of a DispatchAction, where type of business entity
doesn't
change...just the selected operation on the business entity, th
If you are using Struts 1.2.9, then lookup EventActionDispatcher.
-Original Message-
From: Scott Van Wart [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 21, 2006 1:39 PM
To: Struts Users Mailing List
Subject: Re: Struts Design question
Monkeyden wrote:
> If your implementation is simila
I'd be surprised if that data was out there but logic tells me that there
are far more small-med applications than there are med-large. Of course the
underlying point is that every feature should be considered with it's
probability of being used. We do this all the time when we determine scope
f
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
But on the other hand if you had a client who wanted a cluster you
could make one, but not if because of the underlying classes you had
to rewrite the complete system.
And as I experienced it, cluster/redundancy seem to get more and more
important and
Anjishnu Bandyopadhyay wrote:
Hi all,
I need to open a popup screen from a main window (on click of a button),
with the same data as the main window. (The purpose is that the popup
will serve a print preview screen for the data to be printed.)
I cannot go to the server back and fetch the data.
Let's also not exagerate here. Rewrite the complete system? Come on. It's
a request interceptor that manages a webflow stack for each user. If
anything, you're just adding a module with some minor GUI mods. Dr. Z
apparently thinks that an application, once released, may not have
subsequent re
Hi,
How do I get the "ActionErrors" object which have been saved in the
request.
Here is the code below .. I have hard coded for the time being to populate
the "ActionErrors" object.
Once a page populates this "ActionErrors" object how do I get a reference of
this object in one of my JSP
I am using
and getting the question marks and en_US prepended with all the error
messages .. as below.
Why is that .. How can I avoid "???en_US."
???en_US.TEST ERROR1??? ???en_US.TEST ERROR2??? ???en_US.TEST ERROR3???
???en_US.TEST ERROR4???
Thanks For your Help.
-Sanjeeb
--
View this messag
On 6/21/06, Sanjeeb Patel <[EMAIL PROTECTED]> wrote:
I am using
and getting the question marks and en_US prepended with all the error
messages .. as below.
Why is that .. How can I avoid "???en_US."
That usually means the key is not present in your application's resource bundle.
From your
Sanjeeb Patel wrote:
How do I get the "ActionErrors" object which have been saved in the
request.
http://struts.apache.org/struts-action/struts-core/apidocs/org/apache/struts/Globals.html
-Dave
-
To unsubscribe, e-mail: [EMA
Thanks Lance. This the solution I was looking for...
Antonis
On 6/21/06, Lance Semmens <[EMAIL PROTECTED]> wrote:
You can use an org.apache.struts.action.ActionRedirect
ActionForward forward = mapping.findForward("reload");
ActionRedirect redirect = new ActionRedirect(forward);
redirect.addPar
Hi,
I am trying to validate a field declared as String[] in the form bean.
I think you should have solved this earlier.
can u help me ??
thanks.
--
View this message in context:
http://www.nabble.com/how-to-validate-when-the-form-property-is-of-type%3D%22java.lang.String--%22-t9.html#a4983501
Hi,
I am trying to upload a file using File upload. I get the
AccessControlException (access denied). We are using Sun One App
Server 7.0and Struts
1.2.9.
java.security.AccessControlException: access denied
(java.io.FilePermission
C:\Sun\AppServer7\domains\domain1\server1\generated\jsp\j2ee-apps\
I am able to display a List of object returned from
the database using the Struts tags:
[code]
.
<%@ page import=".common.pojo.user.User" %>
<%
List user =
(List)request.getAttribute("Users");
pageContext.setAttribute("Users", user);
%>
.
.
Hi there,
You can write a custom validator in Struts to do that, it's rather easy,
both client-side and server-side. Open the jar of commons-validator to
see some script for existed validation rule should help.
Regards.
Tinh
Jeremy Nix wrote:
> How can I use the Struts Validator to enforce the abov
.
<% User user = (User)pageContext.getAttribute(
"user" ); %>
I don't use this method at all (I prefer jsp:useBean), but maybe the
"user" in getAttribute() should be capitalized as "User"?
- Scott
-
To u
You may refer
http://struts.apache.org/struts-doc-1.2.4/userGuide/dev_validator.html
-Original Message-
From: Dhanasekaran Vivekanandhan [mailto:[EMAIL PROTECTED]
Sent: Tuesday, June 20, 2006 12:28 PM
To: user@struts.apache.org
Subject: passing input form value to error message
Hi All
I need some help!
I'm using the validation framework to validate on client side.
I'm seeking a way to change the field validation order on client side.
I want to validate in field order.
F.ex. in the case below
I want username to be validated OK for both required and maxleng
Use following javascript function to limit the number of characters to 255
in a textbox:
function checkLength(name)
{
var textBox = document.getElementsByName(name)[0].value;
if (textBox.length>255)
{
document.getElementsByName(name)[0].value =
textBox.subst
Validation occurs in order of the properties specified, with the specific
validators (required, maxcheck) occuring in the order listed.
[EMAIL PROTECTED] wrote: I need some help!
I'm using the validation framework to validate on client side.
I'm seeking a way to change the field validation order
Sorry I mean "textarea". I have mistakenly written "textbox" for "textarea".
Anyways, its just a variable name. Doesn't affect the functionality.
-Original Message-
From: Mukta [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 22, 2006 10:12 AM
To: 'Struts Users Mailing List'
Subject: RE: t
Dear all,
How can I validate atleast one checkbox should be selected b4 form
submited. I am using html:multibox.
regards,
Mansoor
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
67 matches
Mail list logo