Carl,
Thank you for the corrects, yes after you point it out it seems I did
read something very incorrectly. I appreciate you suggestion at the
bottom of the message, I will look into this.
Best,
Riyad
Carl-Eric Menzel wrote:
I was reading in the Hibernate forums that when you have a WebApp
own session associated with its ThreadLocal..
Have a look at hibernate website for patterns on how to use Session
Regards,marco
-Original Message-
From: Riyad Kalla [mailto:[EMAIL PROTECTED]
Sent: 08 June 2004 00:14
To: Struts Users Mailing List
Subject: OT: Hibernate Session
This may seem to simplistic, but you could do a search for whichever
method you call to open a connection and then do a search for
connection.close() (or whatever you named the variable) and see if the
numbers add up... if they don't, this might help you narrow down which
file the two aren't
I was reading in the Hibernate forums that when you have a WebApp DAO
Hibernate DB design, and you open/close each Hibernate session at
every single DAO method call (what I do now) its actually quite
expensive, and is suggested that you attempt to maintain a Hibernate
Session in conjunction
Great question, I solved this by checking if Globals.ERROR_KEY was null
or not, but I still wanted something more, because I set aside a small
margin in the top of my page for global errors, like System errors...
and I only wanted to display the margin IF there were some
Kunal,
You could add a 'state' property to the form, that the first action can
set to 'STARTED' and the last action can set to 'FINISHED' or something
like that, then in your reset() method you could do something like:
reset()
{
if(state == Constants.FINISHED)
{
// reset all vars
.
Thanks,
BAL
- Original Message -
From: Riyad Kalla [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent: Monday, June 07, 2004 7:13 PM
Subject: OT: Hibernate Session to User Session
I was reading in the Hibernate forums that when you have a WebApp DAO
Hibernate DB
.
Thanks for your suggestions!
Joe Germuska wrote:
At 5:15 PM -0700 6/5/04, Riyad Kalla wrote:
I'm trying to do something like:
logic:greaterThan name=userList property=size value=20
!-- Display paging controls --
/logic:greaterThan
but I'm obviously getting an exception on size because
This doesn't necessarily sound like a Struts question, so I'll answer it
in the general terms:
1) Create your ResourceBundle for that properties file containing all
your measurement information, then from that get the enumeration from
getKeys then cycle over the keys getting the values, doing
Model 2 / MVC / Front Controller are all the same thing. In Struts the
Front Controller is the ActionServlet, it
receives/handles/dispatches every single request that comes into your
web app. You write actions that are like units of functionality, then
specify in a mapping file the
I have a situation where my taglib is pretty expensive in that its
execution looks something like this:
startTag()
* get ID passed in as attribute to tag
* lookup object in App scope with that ID (Search list)
* look at object and get 2 dependency IDs from it (statusID and typeID)
* lookup
I'm trying to do something like:
logic:greaterThan name=userList property=size value=20
!-- Display paging controls --
/logic:greaterThan
but I'm obviously getting an exception on size because it doesn't follow
JB naming conventions. How do I call this method? Do I NEED to use EL
for this?
You can forcibly remove it as the last step in your last action before
sending the user to a success page:
request.getSession().setAttribute(formName, null);
where formName is the same name you gave the bean in your
struts-config.xml file in the form-beans section of the file. There is
no
* because of it, but they are certainly
worth it).
-Original Message-
From: Riyad Kalla [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 03, 2004 11:59 PM
To: Struts Users Mailing List
Subject: Semi-OT: Organizing WEB-INF/lib dir...
Quick question for the people more
1) Yes you can do it
2) Given each button a different value, like List Products and List
All Products
3) Add a buttonValue (or some other adequetly names) property to your
form for the respective action, it will capture the button clicked.
4) In your action:
if(form.getButtonValue().equals(List
Rick,
This is a great approach as well and I think we've giving good answers.
1 way you change the Form, and another way you change the Action.
I didn't know you could do it the way you described, thanks for the tip!
Rick Reumann wrote:
Riyad Kalla wrote:
1) Yes you can do it
2) Given each
Eric,
I have something exactly like this, and I get around it by setting the
action's validate attribute to false for the prepare method, and true
for the submission action... for example:
prepareEditUser: takes a user ID, loads all data up into request for JSP
page to show, action does
with the learning curve of ibatis.
Riyad Kalla wrote:
Mike,
Good suggestions. I was dealing with something like this recently and
decided that for me, adding caching at the DAO level:
e.g. List userList = UserDAO.getAllUsers();
would offer the biggest performance benefit since
Larry,
It depends on how you load the elements. If you are creating the smaller
objects by first loading the full objects, then just save the time and use
the full ones.
If however you are loading the DisplayObjects directly via a Hibernate query
of course that will be magnitudes smaller.
I second this especially if you are doing Struts. MyEclipse offers wizards,
visual flow navigation and manipulation for your Struts apps which is quite
nice and of course JSP autocomplete, debugging, taglib autocomplete, xml
autocomplete, etc. etc. all the bells and whistles.
** Disclaimer: I
Mike,
Give MyEclipse a try, what you described is what it does. The JSTL support
isn't fully there yet, but it should be by the next release. And its $30 a
year (that like 8 cents a day)
Best,
Riyad
On Thursday 27 May 2004 05:11 am, Mike Duffy wrote:
I would strongly suggest that you stay
Thanks Rick for the link.
I just got done installing J2EE 1.4 so I could copy out the files, talk about
overkill!
smashes a fruit fly on the counter with a 15lbs demolition sledge hammer
On Thursday 27 May 2004 11:59 am, Rick Reumann wrote:
Barnett, Brian W. wrote:
Does this mean I should
Ditto to this comment.
DB Tomcat JNDI Context Hibernate Struts
Tomcat JNDI will manage the connection pooling to the DB for you, then
hibernate will use the pooled connection to perform queries against, and then
in your struts app all you do is add/update/remove your objects directly
This may be a RTFM situation, but I didn't want to take a break and try it and
then after a hour find out it didn't work so I was hoping (while I was
coding) someone could let me know if the following is legal:
Situation:
I have an ApplicationResources_en.properties file that represents the
Do the reset method, it will avoid the new object creation.
On Wednesday 26 May 2004 11:42 am, Julio Cesar De Salvo wrote:
WhatÂ’s the best way to do so?
Redefine the reset() method in each ActionForm and call it from the
action?
Or hold the values and do: form = new ActionForm(); in the
the 'bundle=' attribute on the bean:write tag to
specify the additional bundle to use, if different than the default.
-Original Message-
From: Riyad Kalla [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 26, 2004 11:38 AM
To: Struts Users Mailing List
Subject: Q: Can I have multiple
Hey that's perfect, thanks Mick!
On Wednesday 26 May 2004 11:49 am, [EMAIL PROTECTED] wrote:
That is so if the key does not exist, you will get ???bundle.key.attr???
instead of a null string.
-Original Message-
From: Riyad Kalla [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 26
, if any, would be negligible in terms of speed.
--- Riyad Kalla [EMAIL PROTECTED] wrote:
I'm curious what the size of some of the verteran programmer's
struts-config.xml files are. Mine is approaching 2k lines right now, and
I'm
about 1/2 done with the project I'm working on.
I don't
I agree, it drove me nuts so I switched to using MappingDispatchAction and it
turned out to be exactly what I wanted. Same idea behind the DispatchActions,
but you specify the method name in the parameter field... can't get more
straight forward than that ;)
On Wednesday 26 May 2004 01:04 pm,
Brian,
This can definately get confusing if you are just thrown into the mix.
Tomcat 5 is definately the right way to go, its faster, more stable and
supports newer specs. Struts, IIRC, is designed to only need the Servlet 2.2
and JSP 1.0 or 1.1 spec, it was meant to be super-compatible, soyou
acceptable. And it wasn't a monstrous server either (Dual
P2-550's with 1G RAM and a SCSI array internally).
So, I wouldn't be too concerned with the size of your struts-config, unless
someone else has reason to disagree. A couple of K wouldn't concern me.
From: Riyad Kalla [EMAIL PROTECTED]
Reply
It is very cool, but expensive for server resources (like SSL). So if your
server spends most of its time sitting around, compression can be a nice
addition.
On Friday 21 May 2004 10:02 am, Irfandhy Franciscus wrote:
Hi,
I jsut found out this very neat way of compressing our struts pages
IDEA (Swing) currently performs better on Mac and Linux because (a) IBM
is dragging their feet getting the performance of SWT up to par on those
non-Windows platforms. There was a HUGE stink about Linux performance,
starting here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=37683, that
If your pool max is 4, then you will see 4 and your 5th user will wait
until someone returns their connection to the pool.
Lokanath wrote:
hi all
i have a doubt over connection pooling.When 5 users are using a project in
struts and if i have defined the maximumnumber of connection to 4 .Then
IIRC you should use the connection pool mechanism of your App Server and
not Struts... I believe its use was deprecated (someone please correct
me if I'm wrong).
Vishal Arora wrote:
Hi,
I want to connect to different Databases in my application using
the connection pooling of struts.How
IIRC this is your app server's job, not Struts.
Can someone correct me?
Nimmons, Buster wrote:
Is there a init parameter for the ActionServlet to have struts reload
changed Action classes if they have changed
-
To unsubscribe,
If you are using Tomcat, it should reload this automatically if you have
reload properties selected for your context (Atleast mine does while
I'm wokring on the ApplicationResource file), and if all else fails,
just use the Manager to restart the context (takes about 1 second).
-Riyad
I figured struts might
have done something similar
-Original Message-
From: Riyad Kalla [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 12, 2004 8:57 AM
To: Struts Users Mailing List
Subject: Re: reloading Actions
IIRC this is your app server's job, not Struts.
Can someone correct me
Samuel,
I've had this problem as well and what I ended up doing was to add 'hidden'
tags to the top of my html:form element that encapsulated the parameters that
I wanted to persist to the next page. Something like:
html:form action=/updateUser.do method=POST
html:hidden name=user
I swear I answered this question yesterday yes I did, but it was from
someone else:
--
You could subclass the ActionServlet with your own instance that in its init
method reads the properties file...
I think this should do the trick, please fix the path when necessary:
On Wednesday 12 May 2004 01:04 pm, None None wrote:
Thank you for that answer Riyad. I think I actually found another
(better?) way in my stumbling about trying to solve it on my own...
No you didn't, mine is the BEST :*D
All I did is in my Action, after all my real processing, is this:
I sure hope there is a nicer way around it than this... is this really what it
takes to use Tiles in this situation?
On Wednesday 12 May 2004 02:05 pm, Mark Lowe wrote:
Use an empty action.
action path=/myaction type=com.foo.struts.EmptyAction
forward name=success path=mytiledef
Miguel,
I had this problem alot when I was developing a management system. For
example, on my DeleteConfirmation pages, I wanted to show all the info
for the entity I was erasing (for example, a User). So how I set that up
was 2 actions in my struts-config:
action
input=whatever
the userForm OBJECT and then stuck it back into the
request with the userForm key, because in my struts-config, I had an
entry like this:
form-beans
...
form-bean name=userForm type=org.example.UserForm /
...
/form-beans
Hope this helped a little more ;)
-Riyad
Riyad Kalla wrote
logic:notEmpty name=myList
table ...
...
logic:iterate id=item name=myList type=java.lang.String
...
/logic:iterate
...
/table
/logic:notEmpty
On Tuesday 11 May 2004 10:03 am, None None wrote:
You could subclass the ActionServlet with your own instance that in its init
method reads the properties file...
I think this should do the trick, please fix the path when necessary:
Properties properties = new
Jingesh,
See my last post, you don't need to synchronize and it will just slow
down your app (NOTE: Do not make use of non-final class variables in
Actions and you will be fine)
Jignesh Patel wrote:
Hi All,
We are facing one strange problem, our server hangs after every 2-3 days. The
reason
You need to store 1GB files in a database? Yea, so good luck with that ;)
On Monday 10 May 2004 08:07 am, Ralf Alt wrote:
Hallo,
I'm using the struts file upload with Struts Version 1.1.
If I try to upload big files there is a performance problem. For a file of
40Mb the upload needs about
IIRC interning of Strings has been implied String behavior since the Java 1.2
VM.
For example:
String one = ham;
String two = ham;
if(one == two)
System.out.println(Same!);
will print 'Same'.
-Riyad
On Monday 10 May 2004 09:30 am, Michael McGrady wrote:
Anyone know whether
public
I've tried to use the 'collection' arg in the iterate tag and never had it
work (with array, collection, or anything) and always have to use 'name'. I'm
not sure why, but yes it seems to work fine.
On Monday 10 May 2004 09:31 am, Jimmy Coyne wrote:
Hi all ,
Seen an example like this in the
Enough to take it into consideration. SSL (encryption) is expensive especially
on heavy traffic sites.
On Monday 10 May 2004 01:04 pm, Nathan Maves wrote:
How much of a performance loss would this be?
On May 10, 2004, at 1:53 PM, Hookom, Jacob wrote:
Configure your server to only accept
That's OK, we had the same questions ;)
Freddy Villalba Arias wrote:
Sorry for the spam, everybody. Didn't mean to reply to all of you.
Regards,
Freddy.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional
If it needs to be cleared every time, why not just reset the form before
going back to the page? I had a problem similar to this w.r.t. to a
login page, it was unsafe because if someone logged out, their login
info was automatically populated back into the form. SO if they walked
away, another
Why not use Tomcat 5, and increase the memory that the server uses?
I don't know that many people that took Tomcat 4 seriously for production in
its early stages, usually preferring Resin. However as 4.1.x stabalized and 5
came out, it seems its a non-issue anymore... I don't see the holy-wars
Sam,
I do the same thing you are, and do what Hubert has suggested. It works
nicely. I always define atleast one throw-away dynaform to use for these
purposes, then you can use the form as a link, no problem.
On Tuesday 04 May 2004 02:37 pm, Hubert Rabago wrote:
You can use an empty dyna form:
Dana,
Yes Struts should and does do this. It actually does this so well, that
for login forms you need to manually clear the beans or else it
repopulates the values :)
1) Are you syncing up the names/properties of your fields on your JSP
page in the form with the property names of the Form?
..
Dana Hata wrote:
Answers to the questions below...
I spent 10 hours on it so far, so I've tried many things. Now I did see
Good god, I can understand your frustration now... I don't know why it
is not doing this for you. Have you tried setting a breakpoint in your
reset method and seeing
Bill this will depending totally on the browser how 'broken' or 'unbroken' the
text looks. Because of that, the only solution I can think of is to actually
fix the text before displaying it, or remove the HTML markup.
On Monday 03 May 2004 01:03 pm, Bill Siggelkow wrote:
This is somewhat of an
Ohhh hell. Chris thanks for the info, I have some serious code updates to
make ;)
Best,
Riyad
On Monday 03 May 2004 02:00 pm, Craig McClanahan wrote:
Riyad Kalla wrote:
Whats the diff between readonly and disabled=true, I've been using the
latter...
In the terminology of the HTML
Whats the diff between readonly and disabled=true, I've been using the
latter...
On Monday 03 May 2004 01:25 pm, John Moore wrote:
At 21:07 03/05/2004, John Moore wrote:
At 16:09 03/05/2004, Paul McCulloch wrote:
1) Use an html (rather than a jsp) tag:
input type=text name=licenceCount
Craig I really appreciate you taking the time to answer this. Now I have
my answer and can avoid any nastiness!
Best,
Riyad
Craig R. McClanahan wrote:
Riyad Kalla wrote:
Can anyone answer this? (DEVs) I'm very interested in the answer...
Most of the aspects in which you have to worry about
Hmmm I would think that html:reset would tie into the Form.reset()
method, but you said you are using a DynaForm so I'm not sure how that
would work (I hard code all my forms because I like wasting time :)
Michael Weaver wrote:
I am new to Struts and have tried to used a DynaActionForm to hold
Cool I'm glad it helped
Billy Ng wrote:
Thank you. It works perfectly.
Billy Ng
This mailbox protected from junk email by Matador
from MailFrontier, Inc. http://info.mailfrontier.com
- Original Message -
From: Riyad Kalla [EMAIL
I had a problem like this too... and if you check the taglib API docs
for checkbox, you actually NEED to set the checkbox to false in the
reset() method in the form in order for it to work... in my case my
default was checked, but I HAD to set it to unchecked in order for it to
work... seemed
I'm asking because I am now getting into MappingDispatchActions (MDA),
and almost all of my actions do some form of DB validation and error out
if something goes wrong. So I have stamped all over the place 4 lines of
code that look like:
ActionMessages actionMessages = new ActionMessages();
Hey guys,
I've been looking at this for a while as an indicator of a 1.2 release:
golden child that I haven't really
seen anyone use yet so we could figure out if it really was going to be
all that... I was just curious. Thank you for the feedback.
Niall
- Original Message -
From: Riyad Kalla [EMAIL PROTECTED]
To: Struts Users Mailing List [EMAIL PROTECTED]
Sent
Unfortunately you can't use tags inside of eachother like that, which is
why my code is still spackled with little expressions:
bean:message key=%= my_db_value % /
You can use an expression language to get around some cases like this
with JSTL, and I think Struts supports the EL as well... I
will be to deploy - but it won't be the same as today (even if
its still Struts) and your going to have to continually re-invest in the new
stuff that comes along - all you can do today is decided whats the best
solution now.
Niall
- Original Message -
From: Riyad Kalla [EMAIL PROTECTED]
To: Struts
Steve,
Thanks so much for the reply. I wanted to clarify that I READ day-in and
day-out those typical whats going on with this project? I HATE YOU
emails, and I really didn't intend mine to sound that way. I was really
just curious about what was going on because I was new to the list
(thanks
Hello,
I have a situation where my LookupDispatchAction (LDA) has all my
functionality for a particular entity defined in it (lets say
Product). So that includes adding, removing, listing, editing and
changing their order (moving them visually up/down in the table they are
listed in).
So far
UPDATE:
Upgraded my Struts install to nightly build and now the code snippet
below works. I'm still curious if anyone knows how one LDA can forward
to another (or the same) LDA, even if it takes manually setting the
parameter value (how?)
Thanks!
Riyad
Riyad Kalla wrote:
UPDATE:
I just tried
booya I really appreciate the code snippets and explination! I hadn't gotten
involved in ActionForwards and appreciate you shedding light on the situation
for me.
Best,
Riyad
On Friday 23 April 2004 09:34 am, bOOyah wrote:
Riyad Kalla wrote:
snip /
Does anyone know how I would be able
On Friday 23 April 2004 02:11 pm, bOOyah wrote:
It's Friday.
I need to buy a replacement for my borked Intellimouse Explorer. It's
starting to issue double-click events, which is pretty disconcerting.
At least, I _hope_ it's my mouse, otherwise my RSI has taken a nasty
turn for the worse.
You can't go wrong with an IntelliMouse Explorer 3.0
I personally don't like Logitec, but that's only cause I've had a series of
bad luck with their opticals (keep crapping out).
On Friday 23 April 2004 02:29 pm, Barett McGavock wrote:
I agree with you 100% and share your concerns about the
Oh that sucks... I thought there was a docking station, guess not!
6 weeks... that's kind of rediculous... common MS! Put a digital camera
battery in it or something and give us a recharger.
On Friday 23 April 2004 02:19 pm, Neale, Bennett wrote:
I have the wireless bluetooth mouse from M$.
On Friday 23 April 2004 02:21 pm, bOOyah wrote:
Barett McGavock wrote:
I agree with you 100% and share your concerns about the wireless mice. I
am shopping for a non-wireless mouse for myself, as well. I'm looking at
products in stores from both Microsoft and Logitech that are not
user ;).
B
-Original Message-
From: Riyad Kalla [mailto:[EMAIL PROTECTED]
Sent: Friday, April 23, 2004 2:20 PM
To: Struts Users Mailing List
Subject: Re: [VERY OT] Wireless Mice...what gives??
Oh that sucks... I thought there was a docking station, guess not!
6 weeks... that's
Hey guys,
After playing with the LookupDispatchAction most of the day and converting
over some existing functionality to using it, I've figured out that i love
the consolidation of functionality into 1 class, but the problems I've run
into (non stop) dealing with the parameter and making sure
for all your actions by
setting the type:
action-mappings type=myPackage.ParameterActionMapping
or on indivdual actions using the className
action className=myPackage.ParameterActionMapping ...
Niall
- Original Message -
From: Riyad Kalla [EMAIL PROTECTED]
To: Struts
If you are trying to print out the value:
bean:write name=nameOfForm property=somePropertyName /
where nameOfForm is the name of the form defined in your struts-config
and passed in via the 'name' argument in the action for this page.
And use bean:define to create a page-scoped bean if you just
81 matches
Mail list logo