Re: Minimizing the code in JSP file......by removing the for loop
Assuming your List is a bean named list, use html:options name=list/ Please read the Tag Library Reference for html:options on http://jakarta.apache.org/struts/struts-html.html#options for details -- ...roland huss consol.de
Re: how to quote nested tags
Lacerda, Wellington (AFIS) [EMAIL PROTECTED] writes: In the current spec it is not allowed to use a tag inside another tag. If you need to use results from a tag processing in another tag, currently you must expose it as a bean in some scope and then access that bean in the other tag. Or you nest your tags like my:foo my:bar my:baz stuff /my:baz /my:bar /my:foo and let them evaluate their body (instead of attributes). -- ...roland huss consol.de
Re: how to quote nested tags
[EMAIL PROTECTED] (Felix von Delius) writes: I guess that would work, thanks. But that brings me to another idea - wouldn't it be easier to define a Bean to keep that temporary value? Like this: jsp:useBean id=tempBean class=some.strange.JavaBean jsp:setProperty name=tempBean property=str value=x:foo a='bar' / / /jsp:useBean x:baz b='jsp:getProperty name=tempBean property=str /' / That would be much less efford than introducing a new taglib just for keeping a value (and IMHO has the same unreadability-factor than the taglib solution ;-) Or am I something missing? I don't believe that you can use jsp-tags within custom tags' attributes (and vice versa). -- ...roland huss consol.de
Re: unable to programmatically perform a submit
Spencer Smith [EMAIL PROTECTED] writes: // Submit the form. a href=javascript: parent.window.content.document.forms[0].submit()Submit/a We use this bit of code to trigger the submit button in the body from the top frame. Sorry, I didn't follow the complete thread. We ran in the same problem and found that the default property submit for the name of the submit tag in org.apache.struts.taglib.html.SubmitTag doesn't by no means works well with javascript (since it is the same as the javascript method name submit()). The quick solution is, to set the property attribute in the submit tag to something else, e.g. html:submit property=foo. Or try strutsx. cu -- ...roland huss consol.de
Re: Extending ActionServlet
On Tue, 19 Jun 2001, TODD HARNEY wrote: Is there a way I can override the ActionServlet class to allow for multiple struts-config.xml files to be parsed for a single application? Our struts-config.xml file is getting rather large and it would be nice if we could split the struts-config.xml into multiple .xml files and have the ActionServlet, or a descendant, be able to parse all of the config files and store the action mappings. Thanks, Todd This should be possible with plain XML: ?xml version=1.0 encoding=ISO-8859-1 ? !DOCTYPE struts-config PUBLIC -//Apache Software Foundation//DTD Struts Configuration 1.0//EN http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd; [ !ENTITY formsSYSTEM etc/forms.xml !ENTITY formsSYSTEM etc/forwards.xml !ENTITY mappings SYSTEM etc/mappings.xml ] struts-config forms; forwards; mappings; /struts-config where forms.xml contains your form-beans declarations, forwards.xml your global-forwards and mappings.xml your action-mappings. -- ...roland huss consol.de
Re: Action before loading a page
Peter Alfors [EMAIL PROTECTED] writes: I don't think that you have control of when the frames are loading. The browser attempts to load both frames simultaneously. (Please correct me if I am wrong) Therefore, you would have to do something kinda funky (javascript) to instruct another frame to 'reload' after the current frame finishes. If you cannot gaurantee that your users have javascript enabled, you will probably want to avoid it. Right. To be more concrete, in your first frame your tag could create for example an 'onload'-handler, which updates your second frame with an request to an action (probably with extra parameters appended). However, I vote for Petes suggestion to put an action in front of your frameset. This action could fetch all your data, put it into the request and let your tags render the results. It seems to me always a good idea to use action for bussines logic (e.g. database lookups) and tags for visual rendering only (drop down list with the results from the action). cu... -- ...roland huss consol.de
Re: html:link with local forward
Greg Ritter [EMAIL PROTECTED] writes: ... html:link forward=closehtml:img border=0 page=/images/close.gif//html:link ... I would like to be able to specify a local forward for each action in struts-config.xml: How should the jsp-page know, from which action it comes from ? ... action path=/secure/viewUsers type=com.edifecs.thermonuclear.action.ViewUsersAction - rather long package name. Does anyone have any suggestions on an elegant way to do something similar to this? You build your own custom tag extending LinkTag which takes benefit from the request-attribute named Action.MAPPING_KEY to find the local forward. cu... -- ...roland huss consol.de
Re: rollover effects on html:link
"Matthew O'Haire" [EMAIL PROTECTED] writes: The comment on the second line illustrates what I'm trying to achieve with the html:link, but if I add the onMouseOver/Out to the html:link I get an "Attribute invalid according to TLD" error... Try 'onmouseover' or 'onmouseout' as attribute names, since they are case sensitive cu -- ...roland huss consol.de
struts, tomcat and own JNDI service provider
Ahoi, I have a problem with tomcat 3.2.1, stuts, Jdk 1.3 and JNDI. In our struts application we are using an own JNDI provider for looking up plugins. However, since we are using JDK 1.3, which includes the javax.naming packages itself, they are always loaded by the system classloader. Hence, our very own JNDI-SP residing below WEB-INF/classes is not found and an ClassNotFound exception is thrown. Putting jndi.jar from sun into WEB-INF/lib doesn't work, either. The only solution we came up so far was to put all out application classes and struts.jar into tomcat's CLASSPATH, which is really a bad idea. Are there any other, better ways to get tomcat to load the javax.naming packages with the webapp-class loader ? thanx, cu... -- ...roland huss consol.de [ The subject might be slightly off-topic. But since there has been already some extensive discussion on classloaders in this list and the problem also concerns any struts app using own JNDI-provider with tomcat, I hope I'm not too far away from the list. ]