Hi
What is the best way to give image paths in JSP pages? I see that an image
path given in a certain way works for .jsp files, but the same path fails
for pages loaded through a .do and vice versa.
Is there a standard way that struts instructs by which images can be defined
in a resource
Hi guys,
I tried the following, and it seems to work good:
img src=%=request.getContextPath()%/images/leiste_oben.jpg width=430
height=80 border=0 alt=
Is this the right way? Is there a way to specify it as a Resource? Can you
give me a tutorial link of how to do that..
Thanks
Rajesh
Hi
Are you talking about something like this?
bean:define id=myImg
bean:message key=my.img/
/bean:define
html:img page=%=myImg%/
...where you have something like this in your .properties file
my.img = /images/logo.gif
--
James Mitchell
Software Engineer / Struts Evangelist
Make sure you do request.setAttribute
(FormName,dynaActionFormObjectInstance); for each of the forms you have
manually populated. Because, what you don't see struts do in the
background is that everyform you receive in your actions the form is
automatically added to the request object. Because
you may use following
request.setAttribute(Globals.ERROR_KEY, errors);
to set global parameter of errors..
set action error as usual...
Nate Drake wrote:
I have a Servlet Filter that checks that the user has permission to
access the requested page. If the user does not, I want to send them
You may use following to set bundleName defined in struts-config.xml...
request.setAttribute(Globals.MESSAGES_KEY, bundleName);
but bundleName is MessageResources object . and bundleName is key
attribute of message-resources in struts-config.xml...
OR
If above do not meet your
Struts has a tag that will put the context path on the front of the src URL
for you. Here's an example:
html:img page=/images/leiste_oben.jpg width=430 height=80 border=0
alt=/
If you want to reserve the option to internationalize what image gets
displayed, Struts has good support for that, too.
In addition to below reply:
you may set name in html:error and .
request.setAttribute(name, errors)
errors can be string, string[], ActionErrors, ErrorMesssages
Manish Singla wrote:
you may use following
request.setAttribute(Globals.ERROR_KEY, errors);
to set global parameter of errors..
Hi,
I am writing a small page based on struts guidelines for creating map-backed
forms. I am using struts 1.1. I have a jsp in which I have some dynamic
fields. I used a for loop for these,currently. In the ActionForm, I have
declared a HashMap for collecting values of these fields. However, when
Is it Krishna Mohan , previously with MTC India ??
sorry for botheration
-Original Message-
From: krishnamohan [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 27, 2003 3:56 PM
To: [EMAIL PROTECTED]
Subject: javax.servlet.ServletException: BeanUtils.populate
Hi,
I am writing a
An elegant solution by Amazon is to require a login everytime the user
switches into SSL - even if they are logged in already.
Session hijacking still worries me though because the app I am building
at the moment is quite data intensive, and the customers of the website
who will use it to
Hi,
do you mean you are getting IllegalStateExceptions because you are
trying to access an invalid session?
Have you tried session.isNew() ?
Adam
On 09/26/2003 01:06 AM Warren Chen wrote:
Hi All,
Is there any tool in Struts that can tell if an
invalid session is caused by timeout or simply no
Thats not. You use something like bean:message or an other tag that
uses message resources. But the Struts-Framework can't find the
resourceBundle..
Manfred
Gregory F. March wrote:
Make sure your getters and setters conform to the Java naming conventions - I
got burned by something similar
how to use the jaas framework with struts for Oracle9iAS. If anybody knows about that
please help. And also if u have any sample application please send me at [EMAIL
PROTECTED] . Its very urgent. Any suggestion are welcome.
Thank u in advance
Muthu Subramaniam
I find using a hidden field easier.
On 09/27/2003 03:25 AM Jan Van Stalle wrote:
Hello,
in IE disabled controls are not submitted (I don't know if this is browser
dependent); you might make a workaround by writing a small javascript which
enables you controls when the user submits the form.
Jan
Hi Denis,
sounds like a bizarre request to make - what is the difference between
the two authentication mechanisms that can't be reprogrammed on the
other site? I assume you are not using container-managed authentication
otherwise it wouldn't be a problem.
You could set up a filter to send a
Hey Matt,
do you use different types in your dynaforms or do you stick to just
strings? I was wondering about using dynaforms as transfer objects like
you mention, but I only use strings, since incorrect form entries for
non-string types don't make it back into the form after validation
Hmm well I do sometimes use different types in my DynaForms, but I think I
want to move away from this practice in the future. There was a fairly good
discussion of this in the post [repost] Special view information -
ActionForm or request? starting on 9/18.
To answer your real question about
Hi,
I use the cookie approach outlined here:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg63933.html
There is also another thread involving this issue starting here:
http://www.mail-archive.com/[EMAIL PROTECTED]/msg72578.html
Cheers,
-Steve
-Original Message-
From: Warren Chen
The value attribute of an HTML 'input type=image' tag (i.e., what the
Struts html:image tag is generating) is apparently ignored by all (most?)
browsers. See:
http://www.blooberry.com/indexdot/html/tagpages/i/inputimage.htm
One solution is to have a hidden variable in your HTML form associated
http://jakarta.apache.org/struts/userGuide/introduction.html
- Original Message -
From: Martin Gainty [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, September 27, 2003 12:53 AM
Subject: Reasons for using Struts
What are the reasons for using Struts?
That is what are the Reasons
Hi,
Can you help me with this..
I want to pass the record ids selected by the user using a checkbox, to the
Action Bean, when the page is submitted.
CheckUnique Rec Ids
X1000
X1001
X1002
X1003
The number of rows is dynamic, as
You can use the attached JSPs to display all the attributes in the request.
Just look for the attribute that stores the errors. In general when I was
starting with Struts I found the attached JSPs very helpful because you can
see the types of information Struts stores for you and where it is
I need to access the form from my jsp page, but I can't seem to find a
way to do this.. I need a name of the form to access but what is the
name of the form instance that Struts generate? If I have a form named
LoginForm does Struts make an instance called loginForm or does it
choose a random name
* Bjørn T Johansen ([EMAIL PROTECTED]) wrote:
I need to access the form from my jsp page, but I can't seem to find a
way to do this.. I need a name of the form to access but what is the
name of the form instance that Struts generate? If I have a form named
LoginForm does Struts make an
Yes, you are absolutely correct; it uses the name I defined in
struts-config, I should have known...
Thanks :)
BTJ
On Sat, 2003-09-27 at 19:11, Anders Hermansen wrote:
* Bjørn T Johansen ([EMAIL PROTECTED]) wrote:
I need to access the form from my jsp page, but I can't seem to find a
a) Get ServletContext of Globals.ERROR_KEY.
b) Typecast to ActionErrors
c) Use errors.get(property)
d) (c) wil return Iterator ..
Sgarlata Matt wrote:
You can use the attached JSPs to display all the attributes in the request.
Just look for the attribute that stores the errors. In
Hi Steve,
The value attribute of an HTML 'input type=image' tag (i.e., what
the Struts html:image tag is generating) is apparently ignored by
all (most?) browsers. See:
http://www.blooberry.com/indexdot/html/tagpages/i/inputimage.htm
wow, that's pretty lame.
One solution is to have a
--- Martin Gainty [EMAIL PROTECTED] wrote:
What are the reasons for using Struts?
That is what are the Reasons for which Struts would be a more suitable
choice than say plain JSP/Servlet?
This has been discussed many times on the list so you can find a lot of
reasons in the archives. You
Matthias:
I've been dinking with this workflow extension for awhile, amidst other
madness, and here's what I've come to observe. Please let me know if my
observations are correct, and if there's not a better/easier way to
achieve my goals:
I have a logical process flow for achieving the
Yes, it answers my question. I use the BeanUtils.copyProperties() to
move data back and forth between my transfer objects and my dynaforms
and I don't like doing that because
(a) it seems an unnecessary step since I'm already marshalling data into
out of resultsets
(b) I have to maintain the
You might want to check the Virtual Shopping Mall sample application
from Oracle. It uses JAAS.
http://otn.oracle.com/sample_code/tech/java/j2ee/vsm13/index.html
Aymeric.
[EMAIL PROTECTED] 09/27/03 07:59AM
how to use the jaas framework with struts for Oracle9iAS. If anybody
knows about that
Ted Husted wrote:
This is really a USER list question, but you may be looking for the
indexed properties how-to:
http://jakarta.apache.org/struts/faqs/indexedprops.html
I have gone through this howto, but its description of what to do is
very vague. Here is what I have tried so far:
I have a
Jason,
Thanks for your response.
Setting the filter worked for me. Re-submited forms now show proper
Japanese.
The link you provided is a good resource but point 3 is wrong. Instead
of UTF-8 the encoding there should be the encoding of the source file.
Thanks.
Amit.
-Original
Okay.. the back button going to the prior screen.. you'd think i've never
done webapps before.. my no-cache headers were missing. that's resolved.
I've begun to grok the workflow pattern a bit more, and here's what i've
come up with
I was picturing the overall task as a workflow. However, if
Hi,
I'm doing upgrade from 1.1 beta to 1.1 final and I found some problems with
validation.
In 1.1 final is not required to call explicitly validate when using
DynaValidatorActionForm. This is great.
But now when the page is not it sends a NullPointerException executing , and
not uses the
Sorry for the typo But now when the page is not. I wanted to say : But
when the page parameter is not present in request it sends...
Thanks
-Original Message-
From: João Luz [mailto:[EMAIL PROTECTED]
Sent: domingo, 28 de Setembro de 2003 3:58
To: [EMAIL PROTECTED]
Subject: Upgrading to
37 matches
Mail list logo