Hi there,
does anybody know, how to access a database in an ActionForm
with a Connection from a pool stored in the ServletContext?
Or how can i access the ServletContext in my webapp from any class
(Not as a Servlet or JSP, lets say a bean) ?
thanks for your help
regards
Jürgen Leonhardt
--
Templates come to mind: one template for viewing, one for editing, and
then you'd only need one select.
Never worked with templates though, so I'm absolutely not sure about
this. Would love to hear about your solution though, as I am going to do
the same in the near future :-)
tomK
1) ActionForms have the method getServlet() which returns an instance of the
ActionServlet. From this you have access to the ServletContext.
2) The easiest way to access the ServletContext from your bean would be to
pass an instance of the ActionServlet to your bean. This somewhat goes
against
-Original Message-
From: Scriven, Marcos [mailto:[EMAIL PROTECTED]]
Sent: zondag 18 november 2001 18:32
To: 'Struts Users Mailing List'
Subject: Setting up a form in an action
I am trying to do this sequence of events:
1) setupProductForm.do?isin=abcd
2) This creates a
-Original Message-
From: Greg Callaghan [mailto:[EMAIL PROTECTED]]
Sent: maandag 19 november 2001 3:46
To: [EMAIL PROTECTED]
Subject: Struts servlet debug log entries - go to where??
Hi,
[A repost as I didn't get a reply as far as I'm aware]
Can anyone help our in terms
Hi Marcos,
I am handling the readonly field behaviors by javascript.
For example, based on the current CRUD mode, the action form must set a
property called readonlyFields with a comma-separated list of all fields
in the form that will be displayed as readonly on the client browser.
input
From: Dalibor Kezele [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Apache Tomcat/4.0.1 - HTTP Status 404 - /lead/basicdata.do
type Status report
message /lead/basicdata.do
description The requested resource (/lead/basicdata.do) is not available.
I have a form with 10 properties.
Problem solved:
You could also try the JSPTags.com Pager Tag Library at
http://JSPTags.com/tags/navigation/pager/
I am using this with Struts Iterator tags.
HTH
Malc
-Original Message-
From: Brian Cochran [mailto:[EMAIL PROTECTED]]
Sent: 16 November 2001 00:47
To: Struts Users Mailing List
Subject: RE:
A resultset has a cursor, and depending on how big it is, you might be
better off having a separate query to detemine the number of rows (using
SELECT COUNT(index) FROM table WHERE same_where_clause).
cheers
dim
On Mon, 19 Nov 2001, Dalibor Kezele wrote:
From: Bradley M. Handy [EMAIL
Hi All,
Will the ActionServlet populate an action form instance from a GET request
or does there have to be an HTML form that submitted the POST request?.
Thanks in adv
Jin
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
The idea of form based login is that the servlet container does the job
for you. so you dont write anything, apart from provide the look and feel
for the form.
what you are describing is essentially application managed security...
hth
dim
On Mon, 19 Nov 2001, Martin Farrell wrote:
Hi
How
Hi Tom
Thanks for that
Where is a good place to remove beans from the session scope? Do I have to
forward to an action that does this for me?
Also, I thought there was a difference between 'page' and 'request' scope.
Is there no such thing as page scope in struts?
Marcos
-Original
-Original Message-
From: Scriven, Marcos [mailto:[EMAIL PROTECTED]]
Sent: maandag 19 november 2001 11:39
To: 'Struts Users Mailing List'
Subject: RE: Setting up a form in an action
Hi Tom
Thanks for that
Where is a good place to remove beans from the session scope?
Do I
The HTMLErrors tag handles validation errors well and of course I can load
other text messages into an ActionError and present them via an HTML:errors
tag.
But I need to have at least one other category of error message.
Is there a built-in mechanism for doing this or do I have to write my
Hi there,
i would like to do something like:
template:insert template='%=application.getAttribute(tpldir)%'
but I don't know if this syntax is legal or recommended. Is there a better
idea?
thanks for any answers
Jürgen Leonhardt
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For
Hi,
if you need special formatting for the errors: have a look at the validator
error-tags. (in the nightly build or via ted's page
hope this helps
Alexander
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 12:04 PM
To: [EMAIL
Is there a way to specify a dynamic anchor using the html link tag?
I want to specify something like:
html:link href=http://someUrl; anchor=someAnchor
where someAnchor in dynamically generated.
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail:
% String anchor = // define anchor here ; %
html:link href='http://someUrl#%=anchor%'
should work AFAIK
jsp:useBean might also be useful for your purpose.
hth,
tomK
-Original Message-
From: Stefano Mancarella [mailto:[EMAIL PROTECTED]]
Sent: maandag 19 november 2001 13:59
To:
hi
thanks for the clarification
can you offer me some advice on application managed security? my requirement
is that i have both users and groups within my system
martin
-Original Message-
From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]
Sent: 19 November 2001 10:32
To: Struts
Hello all,
I am using bean:message tag for internationalizing my pages. My problem
is that some pages have too many tags (sometimes up to 50 just for bean:
message) :
1) for some jsp, the generated .class file may exceed the 64 K limit
allowed for a java method
2) even if pages do not reach
- Are you absolutely sure the i18n is the reason of the poor performance or
is it an assumption? Using some profiling tool could help pinpoint the
problem.
- Another solution to the size issue: decompose your pages into included
subcomponents that are of smaller size.
Fr.
-Original
Thanks for the help. I got it working.
Alex
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
When you call /view-calendar.do, Struts execute your action, and do a forward
to the jsp page you specified.
Unfortunately, JSP specification forbid a call to forward or sendRedirect once
you have already written something. So, you can't do what you try if you have
already written something
The delete and view are almost the same no? Maybe you
can use the if statements for these.
For the others - it is really security related. I
think you should put the logic in the perform() method
and then forward to mapping.readMode() or
mapping.editMode().
Maybe can use the same logic to
Hi,
I don't know if your poor performances come from bean:message tags, but there
is an alternative to it.
Another approach to i18n is having one page for each Locale. Each page contains
appropriate translation. Pages can be grouped in localized directories.
Tiles framework can help you
yes please
-Original Message-
From: Peter Georgiou [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 16, 2001 8:36 AM
To: Struts Users Mailing List
Subject: Re: If someone is interested
I think there are so many people interested you may as well publicly show
the code.
Peter
Help,
I have a page that is dynamically created. One of the fields is a date
field. I have a javascript calendar that allows the user to input the date
into that field. Now I have been told that they also need to select the
time. I need to create a select box with values of (12am-11pm) and have
Just use some javascript...
hava a hidden field that will be used to concat the two fields (date and
time) and on the onClick (or whatever!) of the fields run the javascript.
- Original Message -
From: Alex Colic [EMAIL PROTECTED]
To: Struts [EMAIL PROTECTED]
Sent: Monday, November 19,
Hello:
Every time I use the bean:cookie id=cookies name=.. multiple=true /
tag, my page fails to compile.
It looks like the source being generated is not syntactically correct.
Any help with this is appreciated.
Thanks
Error: 500
Location: /struts-juan/main.jsp
Internal Servlet Error:
try replacing the two dots with a real name...
tomK
-Original Message-
From: Juan Alvarado (Struts List) [mailto:[EMAIL PROTECTED]]
Sent: maandag 19 november 2001 16:14
To: Struts
Subject: Problem with bean:cookie id=cookies name=..
multiple=true /
Hello:
Every time I
And the server-side option, how about:
public class MyActionForm extends ActionForm {
private Calendar theDateAndTime;
...
public void reset(...) {
...
theDateAndTime = new GregorianCalendar(0,0,0,0,0,0);
}
...
public void setDate(String date) {
any chance of struts console being ported over to
Eclipse (http://www.eclipse.org)?
rjsjr
-Original Message-
From: James Holmes [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 05, 2001 9:01 PM
To: [EMAIL PROTECTED]
Subject: [ANNOUNCE] Struts Console v1.1 beta 2
Struts Console
I made a separate DateBean for this purpose.
allows in your main class to define public DateBean getDate(), and in
your jsp property=date.time
nesting javabeans can make things very easy :)
hth,
tomK
-Original Message-
From: Sean Owen [mailto:[EMAIL PROTECTED]]
Sent: maandag 19
I'm also interested in this, and may be able to lend a hand...
Sean.
-Original Message-
From: Robert J. Sanford, Jr. [mailto:[EMAIL PROTECTED]]
Sent: Monday, 19 November 2001 3:28 PM
To: Struts Users Mailing List
Subject: RE: [ANNOUNCE] Struts Console v1.1 beta 2
any chance of struts
Tom:
Thanks for your reply.
What I am trying to do is replace the following:
%
Cookie[] cookies = request.getCookies();
pageContext.setAttribute(cookies, cookies);
%
with bean:cookie id=cookies name=.. multiple=true /
Basically what I want to do is replace the above scriptlet
Actually, this is in progress. There is not a
scheduled completion date, but it is one of the
upcoming features. Right now I'm still working some
of the kinks out of the existing plugins for
Forte/NetBeans and JBuilder.
I'll send out an announcement as soon as this is
available. Thanks for
Hi all,
I have a problem with objects such a multibox, and select multiple :
I cannot un-select those objects after having set them in a prior action.
Let see somme details:
I go to a page named Fill to fill a form containing multibox and select
multiple struts tags.
I choose several values in
I'm afraid you'll have to do some coding. Just had a brief glance at the
CookieTag code, and it seems there is no way to get all cookies at once.
What you'll have to do at least:
(1) adapt the tld so that name is not required anymore
(2) a little editing of CookieTag (won't be much): if no name
It is a question of looking at the source code and merging I guess.
It is a classic __multiple inheritance__ of implementation
C++ problem.
S
/ \
/\
ET
\ /
\/
A
-help
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Hi,
Your select multiple if NONE of the values are selected is not getting
to your ActionForm.(same thing happens in case of a Checkbox)
You should set you String[] variable to null (or empty ??) in the reset
method.
Andras.
On Mon, 2001-11-19 at 17:49, Xavier Brunel wrote:
Hi all,
I
Hi,
You might try using LIMIT:
SELECT LastName FROM Students LIMIT 10,20
This works in MYSQL and Postgres but is not SQL standard as far as i
know.
Andras.
On Mon, 2001-11-19 at 19:11, John M. Corro wrote:
I'm trying to enhance performance on pages the produce listings from a given DB
I was thinking along those lines as well, but AFAIK there is not ANSI
standard way to limit the size of a result set. My preference is to not use
DB-specific functionality, but if push comes to shove it sounds like I'll
have to go down that route. Before I do that I'd like to explore
Hello there,
I'm starting to use Struts and was wondering If I'm correct in thinking
that it's a little inflexible when it comes to choosing datatypes for
form-bean properties.
Displaying a query-parameter based HREF link is annoying since, it only
accepts String types.
It would be nice to
I'm trying to work out a relatively simple way of implementing localized
html pages. I'm already using bean:message to localize labels and
messages in my app.
My first idea was to place my links in a localized properties file.
app.properties:
home=home.html
app_fr.properties
I've coded this time ago..
--- cut here - template
%@ page import=app.* %
%@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' %
%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean %
%! String output,link,ext; %
bean:header id=lang name=Accept-Language /
%
Hi,
I have the struts validator extension installed. When ever I start up my
app server, the details of all the different validations are displayed on
the server console.
Is there a way to suppress this?
Thanks,
Michelle
_
Get
Hello All,
You might have mentioned this before, but I am having
problems getting images to offer the same
functionality as the form buttons as well as getting
back to specific steps in the application process.
Using the struts.simple application wizard interface
(act1form), is there a way to
This is the initial question:
Any reasons why struts tags don't get processed? Here is the code placed in
a JSP:
html:form action=/commitcancel
html:hidden property=billOrderMaterial
value=%=request.getParameter(billOrderMaterial)%/
html:hidden property=useCurrent
someone has probably pointed this out: have you
defined the tag library at the top of the jsp and does
it exist where it should in the web.xml file etc.
Sandeep
--- Moree, Andrae [Contractor]
[EMAIL PROTECTED] wrote:
This is the initial question:
Any reasons why struts tags don't get
I can´t find the empty tag.
The documentation presents it but I could not find the class.
The problem i have is that I want to check if a bean is null. In that case i have to
print some data
Is there any tag that could help me with this problem?
Thanks a lot!
Ines Pederiva.
Use the logic:notPresent tag
-Original Message-
From: Ines [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 19, 2001 5:30 PM
To: [EMAIL PROTECTED]
Subject: Logic:empty
I can´t find the empty tag.
The documentation presents it but I could not find the class.
The problem i have is
Hi,
I've the following questions. Thanks in advance.
1. How can I build a chain of actions for a request ? Do I have to use
forward in action definition to do this ?
2. for register.do?action=edit, what does action=edit do with the action?
Does it override the default action ?
3. Can I chain
Martin,
With container managed security, you tell the container what urls are
proteected, and how the container ought to authenticate people requesting
access to those urls. see the servlet spec for details on this, it has a
relatively concise chapter on security.
With application managed
Hi All,
I know this question has been asked millions of times however i am using the
struts simple example and i have tried all methods in the struts thread and
none of them seem to work(for me!), if you will be kind enuff to point out
where i am going wrong I will grateful
Mapping an image
I have encountered this problem also, not with dates but with Integer and
other stuffs, the only way I know how to fix the problem is to change
everyhing to string, or at least change the getter and setter to work with
string.
On Monday 19 November 2001 11:35 pm, you wrote:
I want to create
The logic:empty and logic:notEmpty tags are not part of Struts 1.0. They
are currently available only in the nightly builds.
To just check for null, you can use logic:present and logic:notPresent.
The difference is that the 'empty' tags check for an empty string value as
well as null.
--
Martin
Subject: Re: -help
From: Jon Carnes [EMAIL PROTECTED]
===
Mark Ragan wrote:
-help
Perhaps a wee bit more detail is called for...
JC
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Take a look at the 'forward' attribute for action mappings in
struts-config.xml. I believe this is what you are looking for.
--
Martin Cooper
- Original Message -
From: Martin Samm [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 14, 2001 1:30 AM
Subject: static
There is a separate Jakarta project called 'Taglibs' which may be of
interest for what you are facing. Taglibs is a set of reusable tags. There
is a DateTime tag library which looks like it would take away most of the
pain in Date conversion . Your form classes could then be written to deal
My application requires that users log on, so created a tag to check if the
requester has already logged on. If not, this tag redirects him to a logon
page (/logon.jsp).
I have found that if the validate() method of the form bean returns errors
and the user's session is lost (e.g. timed out),
Hi,
I'm using struts select and options tag for creating a dropdown. I want to
submit the form on selecting from the dropdown.
I coded :
html:select property=organizationName onchange=this.form.submit()
html:options collection=orgTypes property=value /
Can someone help me on this.
Hi Folks
I am wanting to know what people think is better. To have all the jsp
files in the root directory of the web app or in a directory like
WEB-INF/jsp-pages
I have seen in a few places people putting all there jsp-pages in this
directory and I cannot see the advantages in doing so,
63 matches
Mail list logo