There are two approaches to correcting this.
1. If you are using Sessions, Place the datalist into the session instead of the request. This will insure the datalist is available, but can does add overhead to the application. Additionally, if you do not clean up the data, this can use up memory
So long as the Action class is performing a truly generic function then I see no problem with this. Additionally, the name of the Action should reflect the function that is being performed. For example, if the action is forwarding a bean embedded in the form to a web service, the Action should
I would name the actual action based on the functionallity:
This would indicate that you are running two seperate web pages that both attempt to post data to a web service. The process for posting these requests are identical an therefor redundant to create two independent action class
In 1.2.7 you simply change the ActionErrors to ActionMessages. you still save the errors with the saveErrors method and it works the same in the tags.
">"Gaet" <[EMAIL PROTECTED]>
"Gaet" <[EMAIL PROTECTED]>
06/30/2005 04:54 AM
Please respond to
"Struts Users Mailing List"
To
Yes, the validate method is going with the ActionMessages as well. However, the Validator Plug-in is something that should be looked at. It is a little more object based in nature so you do not end up repeating the same validations on multiple forms. It returns errors in the same mannor as the
From the javabean spec this is acceptable. However, it is not good coding standards to have a property in all upper case. The java standard naming convention has constance as all upper case, properties as camel case. Struts would have a problem with this because it is looking for the first lett
Hopefully, this will trigger this to be an OT topic from this point forward.
I have been ignoring this thread for the most part, but with all the postings figured I would glance over it.
There are dozens of large Struts sites out there. I have worked on a lot of Enterprise Class websites that
You cannot embed a taglib within a taglib, you will have to create a variable, then use a scriptlet in the tag.
>
%>" />
Vijay K Anand <[EMAIL PROTECTED]>
Vijay K Anand <[EMAIL PROTECTED]>
07/06/2005 09:09 AM
Please respond to
"Struts Users Mailing List"
To
Struts Users M
_javascript_:location.href=''
Vijay K Anand <[EMAIL PROTECTED]>
Vijay K Anand <[EMAIL PROTECTED]>
07/06/2005 10:11 AM
Please respond to
"Struts Users Mailing List"
To
Struts Users Mailing List
cc
Subject
Re: _javascript_
Hi All
I used the same way you have sai
Depending on the level of usage to the database, I would recommend implementing a connection-pool and requesting a connection each time you need to query the database. If you hold a single connection for your application, you will limit your scalability and hurt performance based on the user load
All,
I am using Struts Tiles to layout my site. I have a vboxmenu design which
contains 4 menu levels:
I am wanting to control when the Authenticated menu and the Admin Menu are
displayed. For example, only display the admin menu if the user is in the
Admin Role.
This is dependent on how you have structured you database query. There are multiple solutions to what you are attempting to do.
1. Create a query that will return the entire resultset and store that resultset in the session as you metion. If you are returning an extremely large result set, run
Typically, I will create a SearchBean with all of the search parameters on it. Included in this bean is a collection to store the results in.
On the ActionForm, I will include the SearchBean as a parameter on the search bean. On the JSP, I use nested tags or the . notation (
">"Mitchell, Stev
maps.google.com uses AJAX to update their maps "on the fly" This allows you to display on the portion of the image that is required on the page. As you zoom in, out, of move around the map, they use a XML connection to update the map.
http://en.wikipedia.org/wiki/AJAX
Tony Smith <[EMAIL PROTE
To get the error appear next to the field add the following :
to change the text of the field label
(if your form is a table)
...
class="error">
Field label
...
">"Scott Purcell" <[EMAIL PROTECTED]>
"Scott Purcell" <[EMAIL PROTECTED]>
07/08/2005 02:58
you have the html:options set correctly in the first example
in the second example you changed to:
try:
EROL TEZCAN <[EMAIL PROTECTED]>
EROL TEZCAN <[EMAIL PROTECTED]>
07/12/2005 09:38 AM
Please respond to
"Struts Users Mailing List"
To
sturts_apache_user s
This is how I have handled it in the past.
">xyz
">"Senthilrajan VS" <[EMAIL PROTECTED]>
"Senthilrajan VS" <[EMAIL PROTECTED]>
07/13/2005 10:53 AM
Please respond to
"Struts Users Mailing List"
To
"Sturt
If you are using Validator, you can create a DynaForm. then based on the action that you are calling, the validations can be different. This will work for either client side or server side supposedly. I have only used server side with it.
Marc Demlenne <[EMAIL PROTECTED]>
Marc Demlenne
Instead of calling the return validateForm(this) function in the on submit, you could wrapper the check based on a _javascript_ variable.
<_javascript_>
var validate = true
validate
don't validate
Marc Demlenne <[EMAIL PROTECTED]>
Marc Demlenne <[EMAIL PROTECTED]>
07/13/200
There could be several poteintal problems.
1) make sure the JSP does not have the session=false page directive set.
2) Make sure you are referencing the form using the same name as you have it defined in the struts config (remember capitalization does count).
3) Make sure you are accessing the
In the case you outlined, wizardForm should be placed into the session scope when leaving the Funds action. You are not required to use the struts tags to access the data, but if you are using the struts html tags for input etc, you will need to use the html:form tag. If you are not using the st
the problem is that row is a generic object until you cast it i think. I have used this in then past by using syntax like " > Looks ugly but it works.
Note: I have not used it with a HashMap, but have with custom objects like ((com.app.Customer) cust).getName() so i am guessing you would have
I am currently working on my first tiles / struts module program myself. One thing that I had to do was to add the module aware option to the plug-in in struts-config.xml.
I have not had a problem with the request processor running twice. Not sure if this has anything t
Sorry for the off topic,
I am starting a new project that will be struts based and will require a
content management system. I have looked at OpenCMS but was wondering what
others have used.
Basic requirements
Java 1.5
Tomcat 5.5
Struts 1.2.7 / with tiles
Any Suggestions?
0 PM
Please respond to
"Struts Users Mailing List"
To
Struts Users Mailing List
cc
Subject
Re: [OT] Struts and Content Management
Hi BHansard,
Do you really have to stick to Java for a CMS?
If, and only if, java is not mandatory for your project, i'd go for
Zope
As always free is better :)
but not a requirement
">"Leon Rosenberg" <[EMAIL PROTECTED]>
"Leon Rosenberg" <[EMAIL PROTECTED]>
07/21/2005 04:20 PM
Please respond to
"Struts Users Mailing List"
To
"'Struts Users Mailing List'"
cc
Subject
AW: [OT] Struts and Content Manage
Thank you all for your input, we are evaluating several of the CMS apps that have been recommended. As always, I applaude the rapid feedback and knowledge that is available on this mailing list.
thank you again.
">"Leon Rosenberg" <[EMAIL PROTECTED]>
"Leon Rosenberg" <[EMAIL PROTECTED]>
I think you are re-inventing something here.
To do what you are wanting is already in struts to some degree.
you have your User Bean, You define an formbean which either contains UserBean or contains fields that match UserBean
on your jsp page you create something like
This
There are several possibilities to do what you are asking. You will still have to modify HTML code, it is just where. I would not typically create multiple jsp pages for Add, Update, Display. I would create a single page using a DynaValidatorForm. this way you can use the same form and based o
I use AJAX to kick off the process. For this case You can send an AJAX request to get the time, once recieved display a div that will contain the "progress bar" and submit a second request to run the actual process. On completion, you can forward the page to the next url.
If you use DWR and can
Unfortunately, any AJAX implementation will require _javascript_. You can replace this with a standard JSP implementation, but you will have a lot of "Flicker" as your page updates. You will also have to keep all information that is displayed on your page in the session or request which can chew
There are several ways that this can be accomplished.
1. Pure Struts. You can create an Initialization Action which holds you form as the input form. When you change select 1, in the onchange submit the page to the init.do. the page will retain all input values as the form will maintain your
I am the same way. I have a large collection of common libraries that I have developed over the past 5 years or so. Each iteration, they get a little more powerful. I can create a highly scalable and complex application very quickly using Struts because of this. Yes java may be overkill for a
Not always.
An Action should be created to perform a specific control instance. For Example, if you are going to insert a record, the Action class has all the required code to insert the record. However, as you get into more complex systems, you will often find that you are duplicating a lot of
I guess I am a little lost on this comment. There are hundreds / thousands of complex Java sites available on the internet. Examples include US Airways Reservation system, EBay, BlueCross BlueShield of South Carolina, CitiBank, etc.
All of these public sites support very large user bases.
">"J
Portlets are java mini applications that work within the Java Portlet Specification. They are ment to run using a Portal Server like Websphere Portal server, Metadot, or jetspeed. These 'applications' can share variables, etc via the Portlet container. The container manages the placement and lo
Hi All,
Seems this is a constant area of irritation. I am attempting to put an
error message into the ActionMessage in an Action Class and redisplay this
on a JSP page. This application is using tiles and is located in a Struts
Module. Seems simple enough, but I can't get the darn thing to dis
No luck.
I also added "test" inside the tag. The text was not displayed which indicates the save did not put any messages into the request, Yet, the ActionMessages does have a message in it and the saveMessage(request, errors) line is called.
">"Harland, David" <[EMAIL PROTECTED]>
"H
Sorry, it does work, I forgot to change the messages name from errors.
Thank you for the help...
">"Harland, David" <[EMAIL PROTECTED]>
"Harland, David" <[EMAIL PROTECTED]>
07/28/2005 08:52 AM
Please respond to
"Struts Users Mailing List"
To
"Struts Users Mailing List"
c
Has Anyone used the format attribute to format currency?
I have a property in an ActionForm which will hold a dollar figure and want
to format when displaying.
ie.
listPrice = 930
Need to Display $930.00
or
listPrice = 1299.9
Needs to Display $1,299.90
I have attempted the following
b
Never mind was using regular _expression_ formatting, Needed to use format="$###,000.00"
[EMAIL PROTECTED]
[EMAIL PROTECTED]
07/28/2005 03:58 PM
Please respond to
"Struts Users Mailing List"
To
user@struts.apache.org
cc
Subject
format
Has Anyone used the format a
Hi everyone,
I am having difficulty getting validator to work with my module based struts
application. I have tried serval approches to no avail.
My Struts Config and module config have:
My /module/validation.xml has:
If I use client
Example:
DataBean:
public class EmployeeBean(){
private String name = null;
Private String dept = null;
... Getters and setters
}
FormBean:
public class EmployeeForm extends ActionForm{
private Collection employees = new ArrayList();
... Getters and Setter
I would recommend changing the capital T to a lowercase t. This is standard. I have had problems in the past with having uppercase variable names. This is due to the reflection that Struts uses to find associated getters and setters.
">"Johnson, Kaerstin" <[EMAIL PROTECTED]>
"Johnson, K
I think the true answer to that question is it depends.
What is your tolerance for "new technology"?
What is your expectation for integration with older systems?
What is your developer experiance base?
etc
Personally, if I were starting a project from scratch with no chance of integration wi
I have used code generators in the past. True they can save initial development time, but many have serious short comings. (Not that this one does as I know nothing about it, but in general.)
1. The code is lowest common denominator code. Meaning that the generated code could typlically be op
VisualAge for Java, Remember it well. I went through the same senerio with it's EJB generator.
">"Frank W. Zammetti" <[EMAIL PROTECTED]>
"Frank W. Zammetti" <[EMAIL PROTECTED]>
08/10/2005 01:34 PM
Please respond to
"Struts Users Mailing List"
To
"Struts Users Mailing List"
WebSphere Application Developer has a Struts Diagraming tool that will let you create a skeleton struts application using drag and drop. It does very well. It will populate your struts-config.xml and create skeleton JSPs, ActionClasses, FormObjects, and the like. No actual "code" generation, ju
Yes, this can be done. The VBox example is a good example of this.
Basically it is laid out as follows.
/layout/layout
/layout/layout2
you can then substitute out different components of each section based on what you are doing.
Daniel Hannum <[EMAIL PROTECTED]>
OK, I see:
Your definition would need to extend .sublayout..
/layout/layout
/layout/layout2
Daniel Hannum <[EMAIL PROTECTED]>
Daniel Hannum <[EMAIL PROTECTED]>
08/15/2005 03:51 PM
Please respond to
"Struts Users Mailing List"
To
Struts
It can get a little difficult to keep up with.
Basically, you have to know the Hierarchy of your tile and call the top most one. In this case, you would call .base which would intern call myEndUserPage.page1 and finally myEndUserPage.jsp. to change to another.jsp you would call .anotherPage in
Sorry for the off topic post,
I have a case where I am generating a struts form and placing it into a
session. I am having to create a inputStream based on a URL of a JSP which
uses the form, but the JSP cannot find the form in any scope. Does the URL
use a different request/session than the ac
OK, Found an answer for anyone who is interested, If not delete :)
URL url = "" URL("http://localhost/helloworld.jsp");
URLConnection conn = target.openConnection();
conn.addRequestProperty("METHOD", "POST");
conn.addRequestProperty("Cookie", "JSESSIONID="+sessionId);
conn.connect();
I am not sure I follow what you are wanting to do. You can already return data in XML from struts. It is all in how you create your output. You can return XML in the response. As for presentation, Struts is primarily a controller framework. You can implement any model or view structure you wi
property="myobject.subobject" styleId="subobject" .../>
then get the field by using
document.getElementById("subobject");
Tony Smith <[EMAIL PROTECTED]>
Tony Smith <[EMAIL PROTECTED]>
08/18/2005 01:07 PM
Please respond to
"Struts Users Mailing List"
To
Struts Users Mailing
Be aware that document.all is IE specific.
[EMAIL PROTECTED]
[EMAIL PROTECTED]
08/18/2005 06:43 PM
Please respond to
"Struts Users Mailing List"
To
user@struts.apache.org
cc
Subject
RE: How can I refer a control in _javascript_ which hava a "." in i ts name
Try th
You can also use JSTL Notation.
Leon Rosenberg <[EMAIL PROTECTED]>
Leon Rosenberg <[EMAIL PROTECTED]>
08/29/2005 06:39 AM
Please respond to
"Struts Users Mailing List"
To
user@struts.apache.org
cc
Subject
RE: Passing variable to _javascript_ function
Unfortunat
For the most part you are correct. However, it is a little more straight forward than that.
Logic should be wrappered in a logic object. The Tag Library can bridge the presentation to this generic logic. This is so that the generic logic can be used universally from either a presentation scree
I am sure there is a slick way to do this, but it escapes me at the moment.
I have a Select Box that I am populating with the tag The
result is:
Group 1
Group 2
Group 3
...
I need the value for DAO actions performed from the search which will
return a detail bean for display o
On the result page I only need the Label for the selected option. Not the entire list. The problem is that when you submit the form, you only submit the value in the form object and loose the label. I need to pass the label as well so that I do not have to requery for it.
The way that i have i
if you store the request attribute in a hidden field on the screen, when the page is submitted the field will be put back into the request. Otherwise, you will need to move the field to the session where it will not be cleared when the request is invalidated after the JSP is displayed.
">"Rivka
I have handled this in two different ways.
1. Previously I had a preprocess action which populated the collection and that was all it did. In the struts-config, I set the preprocessAction.do as the input page. That way if the validation failed, struts will execute the preprocessAction which wi
Just to put in my 2 cent worth,
I am not sure your point is 100% valid. True, languages and technology is changing daily and what you learn today is worthless in 10 years from a coding language standpoint, but being a senior developer or architect is very different than being a coder. Some key
You can also use JMS to pass an object through a messaging queue. OpenJMS is an open source JMS Engine that works well for me. I have not played with to many of them to know if there is a better one out there (for free). All of the major Application servers (BEA, WebSphere, etc) support the JMS
64 matches
Mail list logo