Hi,
There is no difference.
All methods of an interface are abstract and public by default.
So, you could even type:
interface Test {
void test();
}
and it will have the same exact effect as your examples.
Tamas
On 3/22/07, temp temp [EMAIL PROTECTED] wrote:
What is the advantage of
request.
If you're interested in knowing whether the action is being called as a
forward, there are standard request attributes which the Container sets.
For a forward it is javax.servlet.forward.request_uri and for an
include it is javax.servlet.include.request_uri
Paul
Tamas Szabo wrote:
Have
Hi,
What servlet api are you using?
Is it at least 2.4?
Tamas
On 3/13/07, Pierre Thibaudeau [EMAIL PROTECTED] wrote:
I am trying to implement a flood control mechanism to prevent robots
requesting pages after pages at an inhuman rate.
My basic idea is this:
* A FirstInFirstOut List stored
redirects in your initial mail you mean
forwards. Is this true?
Hope this helps,
Tamas
On 3/13/07, Pierre Thibaudeau [EMAIL PROTECTED] wrote:
Yes, I believe it is 2.4.
Also:
Struts 1.3.5
Tomcat 6.0.9
2007/3/12, Tamas Szabo [EMAIL PROTECTED]:
Hi,
What servlet api are you using
Yes, cool stuff.
You might also be interested in:
http://www.vim.org/scripts/script.php?script_id=490 ;-)
Tamas
On 2/14/07, Mark Menard [EMAIL PROTECTED] wrote:
I've recently started using Groovy in my Struts 2 project to write my
actions. After some experience with it, I've written up a
Well, it isn't a global field is an instance variable of your class.
And there is another way to access it. Just rename either the instance
variable or the local variable.
Tamas
On 11/15/06, temp temp [EMAIL PROTECTED] wrote:
If I donot use this.aField implies that complier will never point
On 11/15/06, Christopher Goldman [EMAIL PROTECTED] wrote:
On Wed, 2006-11-15 at 06:33 +0800, Tamas Szabo wrote:
Well, it isn't a global field is an instance variable of your class.
And there is another way to access it. Just rename either the instance
variable or the local variable.
Tamas
Hi,
You can use SessionInactivityFilter from the JavaWebParts project if you
don't want to reinvent the wheel:
Doc:
http://javawebparts.sourceforge.net/javadocs/javawebparts/filter/SessionInactivityFilter.html
JWP Home Page:
http://javawebparts.sourceforge.net/
Good Luck,
Tamas
-constraint,
login-config, security-role, env-entry, ejb-ref, ejb-local-ref]'.
Tamas Szabo wrote:
Hi,
You can use SessionInactivityFilter from the JavaWebParts project if you
don't want to reinvent the wheel:
Doc:
http://javawebparts.sourceforge.net/javadocs/javawebparts/filter
param-value/sessionError.do/param-value
/init-param
/filter
filter-mapping
filter-nameSessionInactivityFilter/filter-name
url-pattern/*/url-pattern
/filter-mapping
Tamas Szabo wrote:
Did you also map the filter to /* with a filter-mapping?
Just after the filter element you
Hi Leon,
I doubt I have more experience :-) but as I know soft references are
collected when the GC decides to do so.
The only thing you can be sure of is that they will be collected _if_ the VM
is running out of memory.
But there is no guarantee that they will not be collected before.
You are
Hi!
But my code (shown above), would get the value from database anytime the
chargeFee==0.
So how do I distinguish between the two cases?
1. When the chargeFee came as 0 because the default is 0 and the
user had not entered any value.
2. When the chargeFee came as 0 because the
Hi,
On 4/21/06, M.Liang Liu [EMAIL PROTECTED] wrote:
I am a freshman to struts.
And now I got a problem to make my decision which data-source should I
choose.
The point is as following:
I created a project via myeclipse using Tomcat 5.5.X as the web
server.Asa result,I can use the
On 4/8/06, olonga henry [EMAIL PROTECTED] wrote:
Tamas,
I know JSTL exists, but I know that's not a good thing to do, that's why I
was looking for the options if anybody knew. Again, read my first email
closely ...I was looking for better alternatives which confirm to MVC
principles.
I
HI,
Do I understand it correctly?
Do you want to break it up just to ensure that is modular?
If it isn't a requirement then I wouldn't add some communication layer
between the modules.
Be happy that you have everything in one JVM and you don't have to deal with
the complexity resulting from ANY
in
turn, will slow down the entire app. Apart from that, I figured it's a
better, cleaner approach plus it's gonna me more stable (I hope), since
e.g. if the web services break the web gui will not be affected in any
way.
Regards,
Tom
Tamas Szabo wrote:
HI,
Do I understand
by firewalls).
And I would choose RMI over CORBA if there are only Java applications
involved.
This is only my preference list of course try to get as much oppinions as
you can ;-)
Tamas
Regards,
Tom
Tamas Szabo wrote:
Hi Tom,
Is there a reason you can't have all the business service layer
Hi,
for ArrayList it is.
But you should code to interfaces so you can change the implementation
without any problems.
Anf if your a is declared as a List then you won't know.
The for loop is faster for an ArrayList but it can't be faster for a linked
listed for example.
If you take it on step
Hi,
It's almost Friday here so I thought I could throw in an OT, hope you don't
mind ...
I'm sure that most of you already read the Effective Java of Joshua Bloch.
In the item discussing the equals method he talks about the imposibility to
write a valid equals method for a subclass that adds a
On 3/11/06, temp temp [EMAIL PROTECTED] wrote:
Can somebody help me with this?
Well, if I have a problem I usually remove all the stuff that works so I can
isolate the problem.
That way you would have only the code you posted in the JSP (the error would
not be at line 220) so you could post
Hi,
I think I saw this error a while ago and if I remember it right some jar
files were missing from WEB-INF/lib.
Check that you have all the jars that are in struts-blank.war for example in
WEB-INF\lib.
This might be the problem if not sorry,
Tamas
On 2/27/06, red phoenix [EMAIL PROTECTED]
On 1/26/06, Vidya (Suvarna) Mahavadi [EMAIL PROTECTED] wrote:
Is there a work around for this..
Can the user change the value of the checkboxes?
I mean they are always disabled or you enable/disable them dynamically?
Tamas
On 1/27/06, Frank W. Zammetti [EMAIL PROTECTED] wrote:
On 1/26/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
When struts takes the data from the request and populates your form,
does it automatically trim whitespace? I think this might be answered
from the particulars of HTML rather than
On 1/23/06, Rick Reumann [EMAIL PROTECTED] wrote:
I supposed I should reply to this on the dev list but since this
thread is so long now I figured I'd add a bit more on the topic here.
I see Paul/Frank what the concern is, but I think the 'problem' needs
to be clarified a bit more. The
But what do you guys mean by lookin for a canceled method in the Action.
I think that the best would be to implement a Cancelable interface if your
Action is cancelable.
You would have to do this in all kind of Actions (DispatchAction too) by the
way.
Or is having interfaces very unstrutsish?
Interestingly, the doc for the cancel tag *does* say that validate()
won't be called and that the Action will be called normally. I never
noticed this before. So, at least no one can claim this behavior isn't
documented :)
Yes, but if you don't want to use the cancel tag you probably
Hi!
Very interesting problem!
In my oppinion is clearly a bug!
On 1/22/06, Paul Benedict [EMAIL PROTECTED] wrote:
I can't think of a good reason it wouldn't call validate() too, like any
other request, just
because the action was canceled. Like I said, maybe someone can come up
with a
On 1/6/06, Michael Jouravlev [EMAIL PROTECTED] wrote:
On 1/5/06, Tamas Szabo [EMAIL PROTECTED] wrote:
I'm actually quite happy with what Struts has to offer except for the
deal with having to use ActionForms. I'd really like a Struts-like
framework but allows me to use POJOs
I'm actually quite happy with what Struts has to offer except for the
deal with having to use ActionForms. I'd really like a Struts-like
framework but allows me to use POJOs to capture my data and provides a
nice way to redisplay that data back to the user if validation fails (ie
a POJO that
Hi!
On 12/29/05, Rick Reumann [EMAIL PROTECTED] wrote:
I'm still stumped with the best way to handle cases where your nesting
goes a bit deeper than just into one list in your ActionForm (and you
want to use Request scope for your ActionForm). Yes, I know many of you
state that it means you
On 12/29/05, Rick R [EMAIL PROTECTED] wrote:
Tamas Szabo wrote:
public void reset(ActionMapping actionMapping, HttpServletRequest
httpServletRequest) {
employees = ListUtils.lazyList(new java.util.ArrayList(), new
Factory() {
public Object create
Hi!
On 12/29/05, Rivka Shisman [EMAIL PROTECTED] wrote:
Hello friends,
I have a ReportAction from which I'm streaming a pdf file to
AcrobatReader(The Action returns null).
When the Action ends - an empty I.E. browser opens and then Acrobat
opens my pdf file.
Is there a way to close the
Hi!
On 12/29/05, Priya Saloni [EMAIL PROTECTED] wrote:
Hi there,
I have a requirement like this where i need to remember the user names for
a
computer.Can some one suggest me how to implement this using struts based
framework..
Example:
*Username: * *Password: * Remember my BCP
Hi
On 12/29/05, Rivka Shisman [EMAIL PROTECTED] wrote:
Hi Tamas
In my jsp I do:
html:form action=/CreateMsvItemReports target=_new focus=item_no
I want to save the original jsp page - that's why I use target=_new.
When I remove the ' target=_new ' I still get an empty jsp page - so
On 12/30/05, Rick R [EMAIL PROTECTED] wrote:
Tamas Szabo wrote:
You will have to use a PhoneNumber object so you will have a reference
to
employee[idx1].phoneNumbers[idx2].number in your html:text.
Thanks Tamas! That was exactly the problem. Typically I do exactly that
and use lists
According to my knowledge cookie.setSecure(true) doesn't encrypt
anything. If you call it then the cookie will be sent over only over
a secure connection. So if you have an unsecure connection the cookie
will not be used.
Tamas
On 12/14/05, Deepa Khetan [EMAIL PROTECTED] wrote:
Thanks
Hi All,
First of all Wendy, sorry for convincing you to change your Wiki page.
You can change it back if you want to...
Actually I'm totaly confused about this bug I haven't replied earlier
because I
thought that I will set up an apache with ssl here at home so I can find out
what really causes
Hi,
I think somebody already explained you that you don't need the name.
In the Action to which you forward you can loop up the name based on the
code.
But if you stick to this then you can create a hidden field called name and
on the onChange of the dropdown list set the value of the hidden
Hi All,
I experience a strange problem, maybe somebody had the same issue before.
We have a webapp that generates PDF files on the fly and sends them back to
the browser.
When one accesses the app with https in IE and only in IE they get a message
box
Something like The page contains both secure
On 11/26/05, Wendy Smoak [EMAIL PROTECTED] wrote:
On 11/25/05, Tamas Szabo [EMAIL PROTECTED] wrote:
We have a webapp that generates PDF files on the fly and sends them back
to
the browser.
When one accesses the app with https in IE and only in IE they get a
message
box
Been
On 11/26/05, Wendy Smoak [EMAIL PROTECTED] wrote:
On 11/25/05, Tamas Szabo [EMAIL PROTECTED] wrote:
What do you mean by In short, you have to send IE some HTML before you
send it the bytes of the PDF, or it will complain.?
I'm not entirely sure you're seeing the same problem-- I never
On 11/26/05, Paul Benedict [EMAIL PROTECTED] wrote:
That message means you have page in HTTPS but links on that page reffering
to (at least one) HTTP.
This is a problem if you have hardcoded the scheme into any of your links.
I understand perfectly what the message means, but there are no
I still don't understand what do you mean by sending IE some text?
Your whole webapp consisted just from a pdf generator?
No, but this particular page was intended to be:
1. POST form over SSL
2. Display the PDF
And if not then why do you say that you sent some text
to IE
On 11/26/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:
Tamas, do you by chance have custom fonts or images in the PDF that
might be getting retrieved over a non-secure connection? A PDF works
just like HTML in that the document is returned, and then the browser
makes requests for embedded
Hi mate :-),
using the indexId property in the second logic:iterate and displaying
jsp:getProperty name=aFamily property=name/
only if indexId is 0 would do waht you want?
Tamas
On 10/17/05, Murray Collingwood [EMAIL PROTECTED] wrote:
Hi all
Bean 1 has a property, a list of Bean 2s.
I
Hi,
you should probably look at the methods of ServletContext.
I'd like to put them in the /img directory of my application, but I
cannot find a way to get a real path for this directory. Is there any
way to get it?
ServletContext.getRealPath(String path)
And then my other question is: how
Hi!
To show the record that has been edited I am making another trip to the
DB as I don't have a cache. To return back to the results the user
clicks on his button and is forwarded to the edit Action class. It is
from this action class that I want to call the search Action class
passing in
On 10/4/05, Preston CRAWFORD [EMAIL PROTECTED] wrote:
No. What information would be useful and relevant? Struts-config? The
form bean itself? The action, the JSP? I didn't want to overload the
list, obviously.
In the following code how do you populate and set the myArrayList property
of the
Well, if you don't send us the code it's hard to help with this one... :-)
You should try to narrow down things that could cause the behaviour.
For examle:
- Try to deploy to another server to be sure that it is not a Tomcat bug.
(if you just want to be sure that it's not cause by the 5.0.x bug
Hi,
But (this is OT): how do you stop Tomcat from doing so? I looked in the
Tomcat 5.0.x doc and just found nothing really helpful.
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/manager.html
If you want to stop Tomcat doing this for a webapp only
put a META-INF/context.xml in your
However, before you do that, have a look at this page:
http://struts.apache.org/faqs/indexedprops.html
In my oppinion this page contains an error.
In the List-Backed Indexed Properties the method
public java.util.List getStringIndexed(int index) {
return
On 9/30/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:
I'm not sure it is a stupid question... I guess this enters the realm of
generic Java question, but I can't say I've ever thought about this
before... what happens if you have a class that implements serializable,
and you then extend that
On 10/1/05, Preston CRAWFORD [EMAIL PROTECTED] wrote:
We have a problem. We're working on an application and we have some
forms in session scope. The strange thing is if someone changes state on
their form, users on other computers on other browsers hitting the same
exact page see the state
Hi Guys,
http://struts.apache.org/faqs/indexedprops.html
Subsection List-Backed Indexed Properties contains this code:
package org.apache.struts.webapp.exercise;
import org.apache.struts.action.ActionForm;
public class StringBean2 extends ActionForm {
private String strAry[] = { String 0,
I would say that the code that is yielded when you reference the form by
name is clearer and thus better regardless and I would throw away the
possibility of someone changing the name in the config file. It's more
important that the code be as explicit IMO.
I definitely like clean code
Hi!
You would normally populate the list in an action not in the jsp.
Tamas
On 9/13/05, starki78 [EMAIL PROTECTED] wrote:
Hi if have the following simple example.
A Hashtable is created and used for a options-list.
Is it possible with bean:define to create the
Hashtable without
If there is no name associated with your declared HTML form then use
document.forms[0] (basically the first form defined for the HTML document)
Personally I caution against using this convention as the caller does not
properly identify the form (by name)
Hi Martin!
Why do you caution
On 9/14/05, Frank W. Zammetti [EMAIL PROTECTED] wrote:
It's generally something to avoid because you may at some point change
the order of your forms and then find that your code no longer works.
Think of what happens if you put a form before this one later... now the
form you want is
Hi,
On 9/10/05, Tony Smith [EMAIL PROTECTED] wrote:
I have an attribute saved in session. In servlet, I
can access it by
request.getSession().getAttribute(my);
In jsp, how can I access it without write java code? I
am thinking about bean:page, but do not know how to
use it.
Thanks,
Hi,
Has anybody used the
org.springframework.web.stuts.SpringBindingActionForm class?
The class extends ActionForm and the typical use, according to the
javadoc is:
public ActionForward execute(ActionMapping actionMapping, ActionForm
actionForm, HttpServletRequest request, HttpServletResponse
Hi,
On Thu, 2005-08-11 at 21:12 -0500, Rafael Taboada wrote:
Hi folks. I live in Peru and I'm so interested to get java certification.
But here in Peru is a little difficult to have some courses in order to get
certification and because it's so expensive.
My question is u know some site
Hi Frank and Rick,
I've just subscribed to the JWP mailing list.
If it's ok with you I will post messages related to this filters there...
Tamas
Frank W. Zammetti wrote:
On Fri, July 29, 2005 12:34 am, Tamas Szabo said:
Did you made the modification I suggested?
I mean not continuing
Frank W. Zammetti wrote:
No problem at all, that's what the list is for :)
Woo-hoo, first subscriber (besides me)! :)
Too bad there's no prize :)
Oh wait, now that's embarassing... I wasn't subscribed to my own list! D'oh!
To tell you the true I was afraid of this... :-DDD
I thougth
Hi,
Pham Anh Tuan wrote:
Hi all :)
I use Tomcat and Struts framework to build my web app.
I lay jsp document file at web app root.Such as cart and user.
something like:
/cart
/user
/WEB-INF/
When I run my web app, I could access /webapp/cart folder and /webapp/user
folder from
Craig McClanahan wrote:
On 7/29/05, Varley, Roger [EMAIL PROTECTED] wrote:
I could be losing my mind, but, I swear that I tried this technique
once and by the time the sessionDestroyed() method was called, I was
not able to get any of the session attributes back anymore. For
various
Craig McClanahan wrote:
On 7/31/05, Tamas Szabo [EMAIL PROTECTED] wrote:
Craig McClanahan wrote:
One approach to consider is to make your listener implement
HttpSessionAttributeListener as well as HttpSessionListener. That
means you'll hear about session attributes being removed
Hi Frank,
Doesn't the sessionCount get decremented regardless of whether the
session is being destroyed as the result of a regular logoff or
timeout as well as if it was a rejected logon (i.e., max sessions
already in use)? I dealt with this problem in the code I'm adding to
Java Web Parts
Hi again,
Frank W. Zammetti wrote:
Yes, I think what you caught yourself is what I was driving towards :)
Just for comparisons' sake, here's the filter and listener I came up with
to deal with this (this is condensed for space, just showing the main bits
of the puzzle)... this is what's going
Hi Rick,
It's past midnight here so I'll check the code tomorrow. A few questions
though...
1) For one, the business requirement created a bit more complication
in the filter. For example a check for the session timing out has to
take place on all pages except for
Hi Rick,
That would probably be a good idea to use two filters vs doing it all
in one. Although it could also be nice to see all that happens for
each request by looking in just one filter vs two.
I like this idea because in my opinion filters should do small tasks.
This way they can be
Frank W. Zammetti wrote:
Tamas Szabo wrote:
For example Frank's JWP would be a great place to include these
filters, if he accepted to include
them in his project.
I would absolutely accept them, so long as they work :) And frankly,
right now I'm trying to figure out why my formerly
John Henry Xu wrote:
Here is Rick's original requirement,
I have an odd requirement where this internal application should
only be used by one valid user(one session) at a time. (The data
being worked with in the application would require so many locks
that's it just easier to restrict it
I wouldn't bet on PHP being more popular than Java webapps.
I think that there will be more smaller Java webapps if there were much
support for them at web hosting companies.
I know several cases when Java webapp programmers, had to use PHP to
make some smaller webapps for someone because most
Hi,
Do you say that the first person who dropped connection still doing data
access on data sources (and two person using data the same time)? Rick's
original objective was trying to limit one person use data sources.
I said that more than one session will be alive on a server.
Rick said
Hi Rick,
Rick Reumann wrote:
David G. Friedman wrote the following on 7/27/2005 12:35 AM:
When a session is created, have the SessionListener update a session
count.
If the count is 2 or more then call
SessionEvent.getSession().invalidate()
to cancel the session. Then the session
One more thing I forgot in my earlier mail.
I used [EMAIL PROTECTED] session=false % in appInUse.jsp
Tamas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
it seems to you ok that the
org.apache.commons.beanutils.PropertyUtils.describe(Object )
method puts the class property(coming from java.lang.Object) in the map?
I'm not sure about this, but it would be more logical for me if the
class was not in the Map(if it was not handled as a normal
Hi,
Are you saying that Bean should not extend Object?
No, I'm saying that that getClass() shouldn't be handled as a getter for
beans.
Actually I'm saying this but I'm not really sure of it that's why I
asked :-)
I had some code which get the properties of a bean, but I explicitly
Hi,
Frank W. Zammetti wrote:
Granted there is a bit of a general negative
feeling towards frames, most people will tell you not to use them starting
a new app, but you have an existing app with them, so that's fine.
What would you use in a new application?
Tables? Divs?
Thanks,
Tamas
Paul Moody wrote:
I think you will need to use the property attribute,
example:
html:submit property=docType value=pdf
alt=Create a pdf file/
You can put a String docType property in your form and
examine it in the action to see what the user pressed.
As an aside, in my experience this
Hi,
I've been writting applications with Struts 1.1 + Tomcat 5.5.9 + Eclipse for
a year. Until now, I've been using ActionForm. Now I want to move to
DynaActionForm. ?Is there any problem in using DynaActionForm and ActionForm
in the same application (in the same struts-config.xml file)?
Laurie Harper wrote:
Tamas Szabo wrote:
it seems to you ok that the
org.apache.commons.beanutils.PropertyUtils.describe(Object )
method puts the class property(coming from java.lang.Object) in the map?
I'm not sure about this, but it would be more logical for me if the
class
Hi,
The theory is to override the PersistentManager with your own class.
Theirs subclasses the PersistentManagerBase which subclasses ManagerBase.
Now inside ManagerBase it seems to create the sessions in the method
createSession(String). If you override that, you could count the sessions
and
You should note that PropertyUtils.describe() simply delegates to the
standard JavaBeans introspection functionality to determine what the
properties of the bean class are ... and, based on the property method
naming rules, every Java class does indeed have a readonly property
named class due
Hi!
1.
Parse Error at line 54 column 65: Element type
message-resources must be declared.
org.xml.sax.SAXParseException: Element type
message-resources must be declared.
2.
Parse Error at line 59 column 17: The content of
element type struts-config must match
.
--- Tamas Szabo [EMAIL PROTECTED] wrote:
Hi!
1.
Parse Error at line 54 column 65: Element type
message-resources must be declared.
org.xml.sax.SAXParseException: Element type
message-resources must be declared.
2.
Parse Error at line 59 column 17: The content of
element
On Wed, 2005-07-13 at 17:11 +0200, Leon Rosenberg wrote:
Actually using POST is the WORST solution.
In my opinion showing the same URL for all pages is a very bad solution.
Why is it needed?
Tamas
-
To unsubscribe, e-mail:
Hi,
I have a question regarding connection pools and DB user rights.
When you use connection pool objects you specify an user who will be the
owner of all the Connection objects in the pool.
I guess that the most usual case is to specify an user which has the DB
permissions to execute all the DB
using something
like proxool.
Larry
On 7/6/05, Tamas Szabo [EMAIL PROTECTED] wrote:
Hi,
I have a question regarding connection pools and DB user rights.
When you use connection pool objects you specify an user who will be the
owner of all the Connection objects in the pool.
I
89 matches
Mail list logo