Re: Showing image beside fields with errors

2001-10-24 Thread Jonathan M Crater
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

Re: Using static ints as values in html:submit

2001-10-23 Thread Jonathan M Crater
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:

global forwards for menu generation

2001-10-19 Thread Jonathan M Crater
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

Re: AW: global forwards for menu generation

2001-10-19 Thread Jonathan M Crater
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

Re: Properties of a FormBean

2001-10-19 Thread Jonathan M Crater
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!

Re: How to stop form submit on javascript error?

2001-10-19 Thread Jonathan M Crater
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.

Re: porb:

2001-10-19 Thread Jonathan M Crater
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:

Re: where should validation happen?

2001-10-18 Thread Jonathan M Crater
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

Re: handy evaluation tag for nested tags

2001-10-18 Thread Jonathan M Crater
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:

Re: Problem with weblogic

2001-10-04 Thread Jonathan M Crater
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

Re: freeing resources

2001-10-03 Thread Jonathan M Crater
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

where is ActionMessages--it's not in struts.jar

2001-10-03 Thread Jonathan M Crater
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?

Re: Struts action populate a list then display the jsp

2001-10-01 Thread Jonathan M Crater
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

Re: Trying to call an action on entry to web page

2001-09-30 Thread Jonathan M Crater
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,

Re: Using html:errors/

2001-09-26 Thread Jonathan M Crater
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

Re: Using html:errors/

2001-09-26 Thread Jonathan M Crater
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

security question

2001-09-24 Thread Jonathan M Crater
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

Re: ActionForm

2001-09-20 Thread Jonathan M Crater
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

Re: Initalizing at startup and make global usable

2001-09-12 Thread Jonathan M Crater
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() {

Re: AW: Initalizing at startup and make global usable

2001-09-12 Thread Jonathan M Crater
)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

Re: what are different scope(s) available to define for a beaninstr uts-config.xml

2001-09-05 Thread Jonathan M Crater
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.

Re: LogoffAction example

2001-09-05 Thread Jonathan M Crater
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,

Re: Changing the path of a mapping's foward (code review)

2001-08-30 Thread Jonathan M Crater
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

Re: html:image and javascript incompatibility ???

2001-08-30 Thread Jonathan M Crater
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

Re: How to catch the Session Time Out event ??

2001-08-29 Thread Jonathan M Crater
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) {

Re: Security, authentication and authorisation with Struts

2001-08-24 Thread Jonathan M Crater
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

Re: Security, authentication and authorisation with Struts

2001-08-24 Thread Jonathan M Crater
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.

exception handling design

2001-08-23 Thread Jonathan M Crater
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