chaining struts jsp tags
I have some custom JSP tags that I am using, and I want them to output text that is this processed by the standard struts tags. Is this possible? For instance, I have a custom tag that will output something like: this is the path html:rewrite path='/'/ and the image is, etc and then that would proceed to be parsed by html:rewrite to do the right thing. Can this be done? Thanks! -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
validation working for login page but not others
I've got validation working fine for the login page that users see when they first hit my webapp, but it doesn't work for a change password form later on in the webapp and I don't have a clue why. I'm using the latest nightly of struts on tomcat on solaris (not that that seems to matter much) Relevant info: struts-config bean declarations: form-bean name=logonForm type=org.apache.struts.validator.DynaValidatorForm form-property name=uname type=java.lang.String/ form-property name=pass type=java.lang.String/ /form-bean form-bean name=changePasswordForm type=org.apache.struts.validator.DynaValidatorForm form-property name=old type=java.lang.String/ form-property name=new1 type=java.lang.String/ form-property name=new2 type=java.lang.String/ /form-bean action maps: // the form that works actionpath=/logon type=actions.LogonAction name=logonForm scope=request validate=true input=/logonForward.do forward name=success redirect=true path=/secure/summaryPage.do/ /action // the form that doesn't actionpath=/secure/util/changePasswordSubmit type=org.apache.struts.scaffold.ProcessAction parameter=collab.beans.secure.util.ChangePassword input=/secure/util/changePassword.do name=changePasswordForm scope=request validate=true forward name=success path=/secure/summaryPage.do / forward name=failure path=/secure/util/changePassword.do / /action validation.xml (trimmed to only show one field per form): -- form name=logonForm field property=uname depends=minlength,maxlength arg0 key=loginpage.usernameprompt/ arg1 key=${var:minlength} name=minlength resource=false/ arg2 key=${var:maxlength} name=maxlength resource=false/ var var-namemaxlength/var-name var-value16/var-value /var var var-nameminlength/var-name var-value1/var-value /var /field /form !-- add more forms here -- form name=changePasswordForm field property=old depends=minlength,maxlength arg0 key=changePassword.oldText/ arg1 key=${var:minlength} name=minlength resource=false/ arg2 key=${var:maxlength} name=maxlength resource=false/ var var-namemaxlength/var-name var-value16/var-value /var var var-nameminlength/var-name var-value1/var-value /var /field -- Since validation occurs before the Action bean is called, scaffolding shouldn't be getting in the way. Other than that, I'm just not seeing what the problem could be. It works for logon, but not for changePassword. Any help would be appreciated. Thanks, Kirby -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: messages into struts 1.1
I was just running across this in something i was working on.. In the html tag, try html:messages id=messages message=true and see if that helps. On Wed, Apr 02, 2003 at 12:25:52PM +0100, [EMAIL PROTECTED] wrote: Hi everyone, Is anybody knows how to use messages system of struts. I just want to print some information on the user screen, so I use an ActionMessages object, then i fill it with ActionMessage, I save it, and in my jsp, I use the tag html:messages id=messages in which messages is the name of my svaed object, but nothing is printed out? So perhaps I do not use correctly this? Cheers Pierre Accédez au courrier électronique de La Poste : www.laposte.net ; 3615 LAPOSTENET (0,34/mn) ; tél : 08 92 68 13 50 (0,34/mn) -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
scaffold ProcessBean returning errors
Hello, I'm using a recent nightly build of struts along with scaffolding and the struts/contrib scaffolding code. I've got a process bean that is responsible for updating a user's password and if the user doesn't enter the same new password twice, I want to return an error and go back to the same page. I've tried ProcessResult.addMessage() but that doesn't add an error.. Just a message. From looking at the code for BaseAction and ProcessAction, the only way that I'm seeing to actually add an error message is for it to be struts 1.0 and the saveErrors() method being called. What's the proper procedure for saving an error message for struts 1.1? Basically, I'm wanting BaseAction.isErrors() to get called in the execute() method after executeLogic, but I'm not clear on the proper way to do this via scaffolding. Thanks in advance, -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: scaffold ProcessBaseBean and sessions
Steve et al, Thanks. After sending this email yesterday I had started looking at ProcessAction and came across the same things that you mentioned. I actually changed the code a bit more dramatically than you. I revised executeLogic so that it looked for the USER_KEY and just added it to the parameters Map. So, it just adds an Object. it doesn't have to be a baseform or anything. It just adds the Object. Now.. My next problem.. Getting data into the bean.. Not user session data.. data from forms.. Artimus seems to take the approach of inheriting everything from a 'Bean' that has all of the form members defined. I'm more interested in using the DynaForm Beans, though, so that I won't necessarily have to create a Bean java file for all of these. Before, these came into the Action as an ActionForm, and they could be accessed by just saying something like: PropertyUtils.getSimpleProperty(form, name); but, of course, the ActionForm isn't exposed to the ProcessBean, at least as far as I can tell (which makes sense from a standpoint of seperating out the business from the controller Right now, I'm considering dropping this complete bean approach and going back to something that is closer to just using BaseAction and making Action classes that hang off of that.. (discussed around section 8.3.2 of Struts in Action) I'd be happy to be convinced otherwise, though. Kirby On Wed, Mar 26, 2003 at 10:03:45AM +1100, [EMAIL PROTECTED] wrote: If you set up a userProfile form object in your struts config and store your user info in it, Scaffold will merge information coming from the request form and the userProfile form and pass them to the execute method. If you want to see how it works, have a look at the source for ProcessAction in the executeLogic method. In particular the following code: SNIP I'm using this for a few projects here but there is one restriction. The merge method expects all the properties of the userProfile form to be Strings so you can't have nested objects. I've overcome this by altering the code so that it treats the properties in the userProfile as Objects and not Strings. This seems to be working fine. See the code below from the merge method: SNIP Original Message: I'm trying to write a webapp using scaffold, where I set my action to point to: type=org.apache.struts.scaffold.ProcessAction parameter=my.class.that.extends.ProcessBaseBean and I'm wondering how, in the execute() method of the ProcessBaseBean that I can get session information. In particular, I have a user object stored in the session that I need for the execute(). It seems as though I probably wouldn't want to tighten the connection between the controller and the bean by making the session info available directly, but I'm not sure how to make the jump. From looking at the cvs code, it looks like ProcessAction has the ability to expose the session, but it is still a bit nebulous as to how everything works together. Thanks, -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
scaffold ProcessBaseBean and sessions
I'm trying to write a webapp using scaffold, where I set my action to point to: type=org.apache.struts.scaffold.ProcessAction parameter=my.class.that.extends.ProcessBaseBean and I'm wondering how, in the execute() method of the ProcessBaseBean that I can get session information. In particular, I have a user object stored in the session that I need for the execute(). It seems as though I probably wouldn't want to tighten the connection between the controller and the bean by making the session info available directly, but I'm not sure how to make the jump. From looking at the cvs code, it looks like ProcessAction has the ability to expose the session, but it is still a bit nebulous as to how everything works together. Thanks, -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
archive not updating since 3/19
The latest update on the apache archives for the struts mail list seems to be from march 19. Anyone know why that might be? http://nagoya.apache.org/eyebrowse/SummarizeList?listId=42 -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Design philosophy, beans, model to view
I'm in the process of converting a webapp to using struts, am trying to use best practices to make sure that I keep presentation split from business, and I was wondering what all of you experts do to handle the data transition from model business logic beans to the presentation. As I see it, I can make what amounts to a bean for every single page that is going to be presenting data to the user. The bean contains the data and the JSP then displays the values in the bean. That seems like a real pain to have XXX beans. It's just a pain to have to make hundreds of bean classes. I suspect that I'm missing something here, but this is what i'm seeing. Most of the struts documentation that i can find doesn't really address the simple case of wanting to print data to the user. Lots of discussion of making forms in struts, but I'm just wanting to send data back to the presentation... The struts-example seems to basically use a single uber bean that contains all the data and doesn't ever really do much business prep of return data; Artimus uses scaffolding to wrap everything in; struts-polls seems to use Collection and jsp knowledge of class names to get the data out.. So, I guess my question is... is there a consensus of any sort on how this should be done or, how do you do it, etc? Thanks, -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Design philosophy, beans, model to view
On Wed, Mar 19, 2003 at 04:48:13PM -0500, Rick Reumann wrote: On Wed, 19 Mar 2003 14:46:41 -0600 Kirby Vandivort [EMAIL PROTECTED] wrote: So, I guess my question is... is there a consensus of any sort on how this should be done or, how do you do it, etc? Unfortunately, I'm starting to find out more and more that there isn't a consensus:) I'm also leaning towards doing things differently now based on Vic's basicPortal approach that does not copy formBeans into Data Transfer Objects which is what I have been doing (just because I've been told that's the way it should it be done for so long). There are some things, though, that there seems to be consensus on: 1) Your JSPs should go through a controller (Action servlet or a subclass of ActionServlet). done 2) Your persistence layer, that talks to the database or storage, should remain separated from any Struts classes. and done.. You might find some of the threads here very helpful http://groups.yahoo.com/group/model_struts/ Thanks for the pointer. I've just joined the group and will take a look at it. -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
struts, tomcat, and log4j
So, I'm running 1.1rc of struts, tomcat 4.1.18, and I just downloaded log4j 1.2.8. I have a struts webapp in development, and I currently have all of the struts-required commons-*.jar files in WEB-INF/lib, and I dropped log4j-1.2.8.jar there also. After deployment, at random times, tomcat now hangs on me and won't let me connect. The only error of note is in catalina.out and is: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Class org.apache.commons.logging.impl.Log4JCategoryLog does not implement Log at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:555) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:289) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:409) at org.apache.tomcat.util.log.CommonLogHandler.log(CommonLogHandler.java:97) at org.apache.tomcat.util.log.Log.log(Log.java:198) at org.apache.tomcat.util.log.Log.log(Log.java:192) at org.apache.tomcat.util.log.Log.log(Log.java:174) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533) at java.lang.Thread.run(Thread.java:484) So, from digging around, I now have a copy of commons-logging at: ${TOMCAT_HOME}/server/lib _and_ at webapps/myapp/WEB-INF/lib and, I suspect that the commons-logging stuff that tomcat is using is seeing log4j that i wanted my struts webapp to use, and problems are being caused. What do I need to do to fix this? I want to keep my struts webapp self contained and not rely on jar files in tomcat if I can help it. Can I do that? -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[OT] database access philosophy
Hello, I'm in the process of converting an old webapp over to using struts and, in the process, I decide to clean up the database access. Old Way: I had written a connection pool and instantiated an instance of this that was passed to all methods that needed the db, and they they had the sql code embedded in the methods. New Way that I'm working on: I've set up a DataSource for my jdbc connection, and I'm partitioning off all of the database access code into it's own package. If my business logic needs database info, it calls a method from the database access package to get it. My problem: Many methods from the database access return simple data. However, I currently have it written so that some of the more complex ones return a ResultSet, which I'm not really happy with. This exposes the DB layer to the business logic, but I'm not totally sure what the best way to avoid this is. In addition, this doesn't work :( because the underlying connection gets closed when the database access method exists, and the ResultSet is no longer valid. SO, I am wondering what people do when they need to return all of the data in a ResultSet to their business layer. Do you have to go to the hassle of copying everything to some sort of data structure, or is there a better, cleaner, faster way to handle this? (I'm kind of assuming that the ResultSet will be small enough to fit in memory and there won't be issues with pulling it in in pieces; how would that be handled, though?) Thanks, -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [OT] database access philosophy
I've been looking into ResultSetDynaClass as well as something that Ted posted a while back: http://www.mail-archive.com/[EMAIL PROTECTED]/msg14919.html where he makes a collection out of a result set. My problem, though, is that some code that we've got that accesses result sets uses the column name, and some uses the id. I'm not sure that either method works with both names and id's. That's a relatively minor thing, though, because I guess the code can be converted to either entirely names or entirely id's. At any rate, it looks like the ResultSetDynaClass code given in the API example converts to an ArrayList, which is going to be ID based. The example that Ted gave seems to use the ResultSet metadata to probably return the collection via the name, although I haven't yet totally figured his code out. There seems to be some missing methods that I haven't yet tracked down. The JavaWorld example that was mentioned in another reply sounds like it would work _except_ I don't want to have to make a bean for every piece of data that can be sent back from the database. I'm looking for a way to somewhat dynamically create the necessary data structure and send it back. Kirby On Wed, Feb 26, 2003 at 11:12:01AM -0700, Wendy Smoak wrote: Kirby wrote: SO, I am wondering what people do when they need to return all of the data in a ResultSet to their business layer. Do you have to go to the hassle of copying everything to some sort of data structure, or is there a better, cleaner, faster way to handle this? Does this look useful? Implementation of DynaClass for DynaBeans that wrap the java.sql.Row objects of a java.sql.ResultSet http://jakarta.apache.org/commons/beanutils/api/org/apache/commons/beanutils /ResultSetDynaClass.html I haven't gotten to use it yet since my database doesn't speak JDBC, but it looks interesting! -- Wendy Smoak Applications Systems Analyst, Sr. Arizona State University PA Information Resources Management -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: struts book
Does anyone think after reading this post that Vic isn't a standup guy? Not only does he recommend some else's book over his because it is newer, he also gives a website location where you can get the text of his book for free; all of which mean no revenue for him. Anyway, nice to see honest opinions on this stuff while disregarding personal gain. On Mon, Feb 24, 2003 at 01:21:13PM -0500, Vic Cekvenich wrote: I would recommend you get his: http://www.manning.com/ebook_buy.html?project=husted My book is almost 18 months old and included in Doco of basicPortal.com. .V Griemens, Guenter wrote: Does anybody knows about to get Vik Cekvenich's basebeans-book about struts (2001) in Germany by another (quicker) way than amazon? Günter Griemens D-60261 Frankfurt mailto:[EMAIL PROTECTED] -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
configuring logging in struts
OK.. I'm going to ask what I'm sure is a brain dead question to most of you, but after spending way-too-long looking for a reasonable answer on the web, I turn to you... I have struts-nightly, java 1.4, tomcat 4.1.18. I haven't done anything with Log4j, etc. I'm assuming based on what I've read that struts uses commons-logging, and commons-logging will default to using the java 1.4 logging mechanism in my case. And, from the messages it is giving, it appears to be doing that. I'm seeing INFO, WARNING, and SEVERE notes.. (the SEVERE doesn't appear in commons-logging, but does in jdk1.4 logging, so I'm assuming that 1.4 logging is in effect for me) So, where can I set up the default log level and how do I use all the spiffy features of commons-logging where I can selectively have one area of code set to trace and another set to fatal? From adding logging statements, I've determined that the default level seems to be 'info'. I have the need to add some debugging statements, though, and while I could put them in at log.info so that i'll see them for now, I thought that I would be a good little boy and use 'debug' as it is meant to be, but for the life of me I can't figure out how to change the log level so that I can actually see them! TIA, -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
automated way to pass args to bean:message
Hello, This might not strictly be a struts question... but maybe it is.. I have a string: XXX YYY that appears very often in the web pages generated by the struts application. The YY part is constant; the XXX part is read in from a database and can change. I'm specifying the string in my resource.properties file, and I'm currently doing something like: my.message=Welcome to {0} YYY. I can then pass arg0 to the bean:message and it prints as it should. But, I suspect that there is an easier way to do this than to have to pass arg0 to all of the strings that need it. This is prone to user error in the future (people not remember the arg0s, not making the bean properly, etc. Is there a way in struts (or otherwise?) that I can automate this somehow? It would be nice to be able to make some sort of macro where I could just say something like: my.message=Welcome to {$YY} everywhere and have it automatically replaced with XXX YY because of soemthing that I had done earlier in the jsp, properties file, or code. Thanks! -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: automated way to pass args to bean:message
Thanks! This is what I ended up doing: I have made my own .tld file. I have made a tag class that extends the struts MessageTag and all it does is add an automatic arg4 to all the calls. Then, I changed my bean:message calls to myapp:message and everything seems to work. K On Mon, Feb 03, 2003 at 04:43:42PM +0100, Nicolas De Loof wrote: What you call a macro is simply a JSP custom Tag. You can create tag for your application to add the behaviour you need, such as searching some scope for XXX and adding it to the message that you can get the way MessageTag does (you can grab struts MessageTag code for this !) Nico. Is there a way in struts (or otherwise?) that I can automate this somehow? It would be nice to be able to make some sort of macro where I could just say something like: my.message=Welcome to {$YY} everywhere and have it automatically replaced with XXX YY because of soemthing that I had done earlier in the jsp, properties file, or code. Thanks! -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
problems with tag libraries
Per the documentation section 5.4.3.1: All that's required to install the struts tag libraries is to copy struts.jar into your /WEB-INF/lib directory and reference the tags in your code like this: %@ taglib uri=http://jakarta.apache.org/struts/tags-html-1.0; prefix=html % I know that this isn't quite correct, as a few weeks ago the -number was dropped from the URI and it is just something like: uri=http://jakarta.apache.org/struts/tags-html; I've confirmed via the .tld file that this is in fact the URI that should be used, but I started noticing yesterday that this isn't working. I hadn't gotten back to that section of code for a little while, so the problem might be a little older than that. Anyway, the exact top from the jsp file is: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-bean; prefix=bean % %@ taglib uri=http://jakarta.apache.org/struts/tags-logic; prefix=logic % and when I try to access this page, I'm getting the exception: 2003-01-30 14:25:43 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: This absolute uri (http://jakarta.apache.org/struts/tags-html) cannot be resolved in either web.xml or the jar files deployed with this application I'm using the nightly build from last night, and it was also happening with the build from night before last. Any ideas? Thanks! -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: problems with tag libraries
I don't know what you mean by this. I'm using the nightly build and I've looked through all of the samples and non of them seem to be using the http://jakarta URI (maybe that should tell me something) even though the docs clearly say that this can be done to 'simplify deployment'. To the other response, yes, I could install the TLDs in WEB-INF, but this is supposed to be a way to do this that simplifies deployment. It was working a week or so back, and it quit working for some reason. On Thu, Jan 30, 2003 at 09:41:01PM +0100, alexj wrote: struts b3 use the WEB uri look at the sample include with your version - Original Message - From: Kirby Vandivort [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 30, 2003 9:32 PM Subject: problems with tag libraries Per the documentation section 5.4.3.1: All that's required to install the struts tag libraries is to copy struts.jar into your /WEB-INF/lib directory and reference the tags in your code like this: %@ taglib uri=http://jakarta.apache.org/struts/tags-html-1.0; prefix=html % I know that this isn't quite correct, as a few weeks ago the -number was dropped from the URI and it is just something like: uri=http://jakarta.apache.org/struts/tags-html; I've confirmed via the .tld file that this is in fact the URI that should be used, but I started noticing yesterday that this isn't working. I hadn't gotten back to that section of code for a little while, so the problem might be a little older than that. Anyway, the exact top from the jsp file is: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-bean; prefix=bean % %@ taglib uri=http://jakarta.apache.org/struts/tags-logic; prefix=logic % and when I try to access this page, I'm getting the exception: 2003-01-30 14:25:43 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: This absolute uri (http://jakarta.apache.org/struts/tags-html) cannot be resolved in either web.xml or the jar files deployed with this application I'm using the nightly build from last night, and it was also happening with the build from night before last. Any ideas? Thanks! -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
modules use questions
Hello, I'm new to modules and have a few questions about how to use them most effectively. my web app the general look and feel of having an html menu bar along the left side of the screen and a work area that takes up the rest. The work area can be handled by modules. This is a pretty straight forward thing. All the different modules would then need to share the same left menu bar. From what I'm seeing about modules, they are really totally self contained. Where would I put the information (jsp's, beans, etc) that service the left menu bar so that it isn't specific to a particular module? (I'm also thinking I should be using tiles here, but to be frank, I'm having trouble seeing what makes tiles all that much more useful than doing includes in the jsp files) On a related note, all of the web app depends on the user being identified as a user. How does this relate to modules? Can all of the modules access common code somewhere to accomplish things like user authentication? Thanks in advance for the help on what are undoubtably dumb questions. -- Kirby Vandivort Theoretical and Computational Biophysics Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
problems getting new taglib instructions working with tomcat 4.1.x
Hello, Referring to: http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_taglib_23 I am running struts 1.1 beta 3, tomcat 4.1.18, and I have a simple JSP page that starts out like: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=http://jakarta.apache.org/struts/tags-html-1.0; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-bean-1.0; prefix=bean % %@ taglib uri=http://jakarta.apache.org/struts/tags-logic-1.0; prefix=logic % When I try access the page, I get the following exception: 2003-01-02 12:18:03 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: This absolute uri (http://jakarta.apache.org/struts/tags-html-1.0) cannot be resolved in either web.xml or the jar files deployed with this application I suspect that I'm just doing something stupid, but I'm not sure what it is. If you try to go to that URL you get a 404. Not really understanding what is going on, I'm not sure if that is expected or not. Thanks! --- (also a note for whoever maintains that documentation.. In the very next section (5.5) it says to look in section 4.5.3.1 for info on doing the TLDs in a servlet 2.3 container. It should be section 5.4.3.1 (the four and the five are reversed.) -- Kirby Vandivort Theoretical Biophysics Group Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: problems getting new taglib instructions working with tomcat 4.1.x
I'll answer my own question (from finding the right subject line in some of the list archives) Apparently from beta 3 on, the -version.number is no longer in the URI. So, I changed it to: %@ taglib uri=http://jakarta.apache.org/struts/tags-html; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-bean; prefix=bean % %@ taglib uri=http://jakarta.apache.org/struts/tags-logic; prefix=logic and it now works. --- (also a note for whoever maintains that documentation.. In the very next section (5.5) it says to look in section 4.5.3.1 for info on doing the TLDs in a servlet 2.3 container. It should be section 5.4.3.1 (the four and the five are reversed.) On Thu, Jan 02, 2003 at 12:30:55PM -0600, Kirby Vandivort wrote: Hello, Referring to: http://jakarta.apache.org/struts/userGuide/configuration.html#dd_config_taglib_23 I am running struts 1.1 beta 3, tomcat 4.1.18, and I have a simple JSP page that starts out like: %@ page contentType=text/html;charset=UTF-8 language=java % %@ taglib uri=http://jakarta.apache.org/struts/tags-html-1.0; prefix=html % %@ taglib uri=http://jakarta.apache.org/struts/tags-bean-1.0; prefix=bean % %@ taglib uri=http://jakarta.apache.org/struts/tags-logic-1.0; prefix=logic % When I try access the page, I get the following exception: 2003-01-02 12:18:03 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception org.apache.jasper.JasperException: This absolute uri (http://jakarta.apache.org/struts/tags-html-1.0) cannot be resolved in either web.xml or the jar files deployed with this application I suspect that I'm just doing something stupid, but I'm not sure what it is. If you try to go to that URL you get a 404. Not really understanding what is going on, I'm not sure if that is expected or not. Thanks! -- Kirby Vandivort Theoretical Biophysics Group Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Database access deployment question
Hello, I have been reading up on accessing databases from within the struts framework, and I'm not totally sure of the best way to approach the issue of deployment. We package up a WAR file for distribution to end users, and I would like to be able to tell them to drop the WAR file in webapps and be done with it. (ie., not have to uncompress it). However, from what I can tell, setting up clean database access includes doing something like making a data-source entry and placing it in the web.xml in the WEB-INF directory of the deployed application. Since the properties for the database (username, password, etc) will be different for each end user, I can't apriori set values for this. So, what does everyone out there that has been down this road before do to solve this problem? I guess, really, this goes beyond simple database access. We also have a few other settings for our application that need to be set. CURRENTLY, we aren't using struts (pure servlets) and we have properties files that contain this information. But, we are currently requiring the user to unpack the WAR file and I would love to get away from this. Thanks for your help! -- Kirby Vandivort Theoretical Biophysics Group Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Database access deployment question
The Craig has spoken. Thus shall it be. On Thu, Sep 19, 2002 at 09:31:07AM -0700, Craig R. McClanahan wrote: If you're running on a container that supports it (which means any J2EE container plus Tomcat 4), using JNDI resources is the right way to deal with this. Essentially, you declare a resource reference to a data source in your web.xml file, and then configure the database access details in your server's configuration file. The configuration process is container-specific -- here's the docs on using Tomcat (which also includes programming examples for accessing the data source): http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html Craig On Thu, 19 Sep 2002, Kirby Vandivort wrote: Date: Thu, 19 Sep 2002 09:37:10 -0500 From: Kirby Vandivort [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Database access deployment question Hello, I have been reading up on accessing databases from within the struts framework, and I'm not totally sure of the best way to approach the issue of deployment. We package up a WAR file for distribution to end users, and I would like to be able to tell them to drop the WAR file in webapps and be done with it. (ie., not have to uncompress it). However, from what I can tell, setting up clean database access includes doing something like making a data-source entry and placing it in the web.xml in the WEB-INF directory of the deployed application. Since the properties for the database (username, password, etc) will be different for each end user, I can't apriori set values for this. So, what does everyone out there that has been down this road before do to solve this problem? I guess, really, this goes beyond simple database access. We also have a few other settings for our application that need to be set. CURRENTLY, we aren't using struts (pure servlets) and we have properties files that contain this information. But, we are currently requiring the user to unpack the WAR file and I would love to get away from this. Thanks for your help! -- Kirby Vandivort Theoretical Biophysics Group Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Kirby Vandivort Theoretical Biophysics Group Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: STRUTS BOOK
Question.. are any of the three books, husted, chuck, or james written TO version 1.1? Amazon doesn't give details on any of the three, and Ted's page mentions a chapter that talks about 1.1, but I'm wondering if anything is out there yet that is actually written from the core up to use 1.1. My guess is that it is too early for such a beast, but I figured it couldn't hurt to ask. The Introduction was one of the trickier parts of the book for us. The publisher kept saying the original first chapter wasn't the beginning. We were starting with Struts, but they wanted to start sooner than that. They also wanted a hands-on Struts example in the first chapter. I had no idea how to do all that in a single first chapter. Then George Franciscus came to the rescue with a very tightly written introductory chapter. It covers the basics of the underlying technologies and then leaps right into a working Struts application! The trick George came up for the example was to include the prebuilt classes in the download. That way, we didn't have to get into the build issues before showing people what it is like to develop in Struts. In fact, the new Enabling Technologies section of the Struts User guide grew out of the work we did with our own chapter 1. Of course, ours has more text than hyperlinks (but that's what you have to do in print). We'll be posting the Tiles and Validator chapters as our book examples Real Soon Now. Of course, Cedric and David drafted those. We decided to post these two since Tiles and Validator and the least documented parts of the framework right now. As example chapters, we will be able to keep them up indefinitely. -Ted. Galbreath, Mark wrote: Just got James' Mastering Jakarta Struts (Wiley 2002) last night from Amazon. Scanning through it, the layout and coverage looks very good. If I have one criticism at this time, it's that anyone wanting to master Jakarta Struts already knows about web applications and servlet containers. There was no need to spend the first 60 pages of the book on those subjects (especially the Tomcat-specific stuff). Chuck and Ted: yours are preordered. ;-) Mark -- Ted Husted, Husted dot Com, Fairport NY US co-author, Java Web Development with Struts Order it today: http://husted.com/struts/book.html -- Kirby Vandivort Theoretical Biophysics Group Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
iterate question
Hello, I'm new to struts, so please bear with me. I'm in the early stages of converting something to the struts framework and I've run into a situation that I'm not sure how to handle. I want to make a page that, as an example, looks like: - message 1 - message 2 * re: message 2 + re: re: message 2 * re: message 2 * re: message 2 - message 3 etc. So, I'm going to pass a collection to the jsp page, and the collection might contain collections. There can be any level of nesting. This seems like a common case, but I haven't found a way to do it using the struts tags as of yet. It really needs some sort of recursive solution since you don't know how many levels you will need to go down, and the presentation is something that clearly shouldn't be done on the business side, so any help or guidance that you have would be appreciated. Thanks! -- Kirby Vandivort Theoretical Biophysics Group Email: [EMAIL PROTECTED] 3051 Beckman Institute http://www.ks.uiuc.edu/~kvandivo/University of Illinois Phone: (217) 244-5711405 N. Mathews Ave Fax : (217) 244-6078Urbana, IL 61801, USA -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]