the only way to do this with the 1.0 release is to embed your image and anchor
tags in your application resources file. you could also consider placing the
error message directly beside or on top of the fields which generated the errors
by using html:errors property=.../. if you're willing to
try this:
html:submit property=submit value=%=
Integer.toString(ButtonNames.SEARCH) %
it's expecting a string as the value.
Tony Li wrote:
In my jsp, I have this line:
html:submit property=submit value=search/
Instead of the string search, I would like to use something like:
i have found that my global forwards almost always contain my menu items, and
thus it would be convenient to have an extra attribute on the forward element
like text or menu, the value of which could be presented in a jsp and would
allow direct iteration through the forwards collection to
ActionErrors object.
-jc
storck wrote:
How can I use global forwards for menu-generation?
What is the main task if global forwards?
For what is the input-property in the action-tag under action-mappings in
the struts-config.xml?
-Ursprungliche Nachricht-
Von: Jonathan M Crater [mailto
bean:write name=someAttribute property=someProperty/
storck wrote:
Hi,
how can I ONLY write out the content of formbeans property on a JSP as a
simple text (not a textfield)??
Thanks!
i'm not exactly sure what you're asking, but in your ActionForm's
validate method, if you return a populated ActionErrors object, the
action servlet does a forward to the resource you've defined by the
input attribute in the mapping element. otherwise, it calls perform on
your action class.
define it first:
bean:define id=variable1 value=34/
bean:write name=variable1/
if you're trying to peel a value off an object in some scope, you'll have to
use the approprate syntax. all of this is covered in excellent detail by the
documentation:
paul--
i don't know what version of struts you're running, but if you're running one of
the later nightly builds (i don't know when exactly this feature became
available), you have access to the ActionMessages class, which ActionErrors now
extends. so you comment: html:errors/ActionErrors would
you can expose variables through tags by using a TagExtraInfo (TEI) class. check out
the source code
for the bean:define tag and its TEI class.
[EMAIL PROTECTED] wrote:
I found the following advice in the struts archive regarding a tag within
a tag problem:
sounds like a classpath issue to me. make sure your struts.jar is in your
weblogic classpath when the server is started.
ALAMI Ahmed - BOR wrote:
Hello everyone
Does anyone knows the steps to deploy a WAR application using struts under
Weblogic please
When compiling to create the web.xml
create a logout action. in it you can simply call session.invalidate()
on the user's session. this will invalidate the session and remove all
attributes bound to it.
Anish Acharya wrote:
Hello everyone. Just a quick question for you. I want to free
certain resources and clear certain
i'm trying to use the ActionMessages class and the corresponding html:messages
tag, but the ActionMessages class is not part of the struts1.0 jar. has it been
added later? where do i find it?
the idea is not to have your JSPs available for bookmarking. if all your links point
to action mappings (e.g., *.do URIs) and you do forwards to all your JSPs, then a JSP
will never be visible in the URL pane of the user's browser. that way, s/he can never
bookmark a JSP which could
one workaround would be to create an actual JSP that just forwards to the
proper action. make that jsp the target of the welcome file mapping, and in
that jsp just call one of your global forwards that maps to your viewHome.do
action:
logic:forward name=viewHome/
Jin S. Voon wrote:
Hi all,
are you declaring the html tag library before you try to use the errors tag?
%@ taglib uri=/WEB-INF/struts-html.tld prefix=html %
Anna Englund wrote:
Hi,
I'm new with Struts and have a question on how to
display error messages.
In my Action I detect an error and take the following
is not defined
-Message d'origine-
De: Jonathan M Crater [mailto:[EMAIL PROTECTED]]
Date: mercredi 26 septembre 2001 15:58
À: [EMAIL PROTECTED]
Objet: Re: Using html:errors/
are you declaring the html tag library before you try to use the errors tag?
%@ taglib uri=/WEB-INF/struts-html.tld
i'm using weblogic 5.1, which does not allow RequestDispatching to JSPs underneath
WEB-INF. so i'm stuck keeping my JSPs outside WEB-INF. as a result,
i have to secure requests to both JSPs and actions. securing the actions is just a
matter of sub-classing ActionServlet and providing logic
the user guide and java docs are always a good place to start:
http://jakarta.apache.org/struts/userGuide/building_model.html#actionform
http://jakarta.apache.org/struts/api/index.html
Eydelman, Andriy wrote:
Hi,All
sorry for stupid question, I'm just a novice in Struts
What is a
to tell your container to load a servlet on startup, use this block in
your web.xml file:
servlet
servlet-nameSomeServlet/servlet-name
servlet-classfully.qualified.package.SomeServlet/servlet-class
load-on-startup1/load-on-startup
/servlet
in your startup servlet:
public void init() {
)application.getAttribute(menu); %
% int m1=1,m2=2,m3=2; %
.
.
% out.println(menu.moschreib(m1,m2,m3));%
Thanks a lot!! It works fine!!!
-Ursprüngliche Nachricht-
Von: Jonathan M Crater [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 12. September 2001 13:25
An: [EMAIL PROTECTED]
Betreff
http://jakarta.apache.org/struts/userGuide/building_model.html#javabeans
Venkat Jonnalagadda wrote:
what are different scope(s) available to define for a bean in
struts-config.xml and how do it define themany examples...please...
--Venkat.
HttpSessionBindingEvents occur when an attribute is removed from the session. since
invalidate() first invalidates the session, then removes any bound objects, the call
would happen in both cases, so you don't need the removeAttribute() calls so long as
the invalidate() call remains.
Nocera,
matt--
i think the reason you lose your request attributes is because the action servlet
performs a HttpServletResponse.sendRedirect instead of a RequestDispatcher.forward when
you have redirect=true in your action mapping. thus, unless you add values to the
end of the querystring as you're
give the form a name and refer to it like document.formName.submit(), or
refer to it by its index like document.forms[0].submit()
this would be cleaner:
script language=javascript
function submitForm(f) {
if confirm(...) {
f.submit();
}
}
/script
!-- other code --
a
this type of processing is better placed in the controller. i would suggest
either subclassing ActionServlet or providing a generic base class for each of
your Action classes which performs a check similar to:
HttpSession session = request.getSession();
if(session == null) {
rey--
that seems like a reasonable approach, but i've read in more than one post on
this board that subclassing the ActionServlet should be avoided. wouldn't it be
better to put this code directly into the action servlet and rebuild struts?
i'd also be interested in hearing the rationale behind
i would prefer not to put the authentication code in the action because
it opens the possibility of having authentication logic in each and
every action, which would essentially defeat one of the main purposes of
having a controller in the first place--one point of access for security
reasons.
all--
i'm in the process of designing an exception handling scheme with which
struts will interact, and i wanted to solicit any ideas and best
practices out there, especially from those of you who might have done
this already.
i have a base exception with relevant methods to chain additional
28 matches
Mail list logo