RE: multiple buttons on a form
Lachlan, I hope this helps - a bit long I know. Below is what I have used. It shows multiple buttons how to have data associated with the buttons. I hope this can be understood! I've seen other similar examples in archive butnot with the passing of data with the button, th way i do it may be a bit flakey. Keith. === Code for jsp - Redisplay Button Maint Button that passed key value to form bean. property= gives names of properties in form bean If user presses maintButton struts calls setMaintButton(key) on the form bean. - html:submit property=redisplayButton bean:message key=Biff1LinkList.jsp.literal.redisplayButton/ /html:submit % String key = listItem.getLinkIDAsString(); % html:submit property=maintButton value=%= key % bean:message key=Biff1LinkList.jsp.literal.redisplayButton/ /html:submit = In Form bean - boolean redisplayButton; boolean maintButton; String maintButtonData; /** * RedisplayButton - ActionServlet calls this if it was pressed */ public void setRedisplayButton(String sss) { //dbmd(setRedisplayButton: value passed=+ sss); redisplayButton = true; } /** * Action class uses this to see if this button was pressed */ public boolean isRedisplayButton() { return redisplayButton; } /** * maintButton - ActionServlet calls this if it was pressed * Val. passed in is from value= parm on html:submit tag. */ public void setMaintButton(String sss) { maintButton = true; maintButtonData = sss; } /** * action class uses this to see if this button was pressed */ public boolean isMaintButton() { return maintButton; } /** * action class uses this to get the key * if this maintButton was pressed */ public String getMaintButtonData() { return maintButtonData; } == In Action class - if (myForm.isRedisplayButton()) { // // redisplay page (use change selection/sort parms) // } else if (thisForm.isMaintButton()) { // // get the key value (from value= parm // of the html:submit tag. // String selectedLinkID = myForm.getMaintButtonData(); - end of keiths example === --- Nathan Anderson [EMAIL PROTECTED] wrote: I know that people have done this before, so I'm sure someone can help you out [or you can find an answer in the mail archive]. But I was thinking about this today, and I wondered what would happen if you create a submit property in your form bean, and then give each submit button a different value. Someone must have tried that... what happens? Nathan Anderson -Original Message- From: Lachlan Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 4:26 PM To: Struts Users Mailing List Subject: multiple buttons on a form Is there a way to have multiple submit buttons on a form and be able to tell which button was pressed in the following action? Regards, Lachlan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How do you pass a data object for editing?
I agree with Ryan. An old rule from way back:- Pass Keys Round Not Data It's simpler to only keep keys across user interactions (either stored on the form or in the session). Otherwise you have 3 versions of data 1 - what's on the database. 2 - what you've saved in the session (or on the form) 3 - new values coming in from the form Not having the 2nd set of data is a big simplification. Some might say re-reading the database more frequently is inefficient. ie. Your database caching is less efficient than your server's caching of session info. Maybe - but can serializing data to the client form be faster than you DB?. Keith. --- Stephen Owens [EMAIL PROTECTED] wrote: Ryan, I usually just discard the data object, other than properties on the form, either displayed or hidden, that I need to identify it or populate it. Then I reload it, update it, and finally update the DB when/if the form is submitted. -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 4:36 PM To: [EMAIL PROTECTED] Subject: How do you pass a data object for editing? I'm interested in finding out how other people are passing data objects between requests for updating. For instance - User clicks Edit Record I load the data object from the database, copy the properties to the form, and put the data object in the session. When the users presses save on the form, I get the data object from the session, try and do a consistency check to make sure the key fields match what is on the form, and do the update. Is there a way to pass the data object with the form? Maybe via serialization? That would keep it out of the session, and remove the consistency check. Thanks, Ryan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: How to return to the page that called the action class?
I have a generic action class that I want to set up that when the class is successful it send the user back to the page from which they came. How do I get that information? And, how would I structure my class to allow it to send the user back? We have the same propblem in our Application, and it can only be solved with a proper workflow mechanism. At the moment we use a session variable that has to be set before invoking an action, which stores the name of the page where we came from. Or we pass the name of the calling action as a parameter, so that we know where to get back. But this is all workarround, you need a workflow framework here. Volker -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Help, How to display Chinese in jsp by using message tag ?
Hi, Try saving your resource file with Chinese text as GB2312 encoded text. There is a tool in the $JAVA_HOME/bin dir called 'native2ascii'. Run this against your file and you will have a pure ascii file with \u (X = hex number) to represent the double byte chinese chars. in the javadoc it specifies that java.util.Properties should be able to decode a stream of this data and convert it into 16bit unicode. If struts uses this, then your java strings should be OK. To verify that you have read in the resource correctly, I suggest writing a small java app that can write the data to screen because the character encoded will be preserved in Java. Your next problem is going to be writing data using the jspWriter. I would expect the jsp writer to also use ISO-8859-1 encoding when converting unicode java strings to a byte stream, this would completely mess up your chinese chars. You would need to change the encoding in the jspWriter to be GB2312 if this is to work correctly. What Jeff says is also correct, you would need to specify the encoding used in the http headers. If neither of the two suggestions above work, then your other option is to sub-class the relevant code and override the methods that do the encoding with your own. But then you are probably entering a whole world of pain :) Sorry, I cant be of more help, I have only ever done double byte i18n work on normal apps and not web apps. Regards, Chris. -Original Message- From: Julia Yang [mailto:[EMAIL PROTECTED]] Sent: 12 December 2001 21:12 To: Struts Users Mailing List Subject: RE: Help, How to display Chinese in jsp by using message tag ? I did, also put double quotes around the Chinese character but it gave me the following jsp exception for some reason weblogic.utils.ParsingException: nested TokenStreamException: antlr.TokenStreamI OException at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:900) at weblogic.servlet.jsp.JspParser.doit(JspParser.java:71) at weblogic.servlet.jsp.JspParser.parse(JspParser.java:175) at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:113) at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:253 ) at weblogic.servlet.jsp.JspStub.compilePage(JspStub.java:313) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:180) at weblogic.servlet.jsp.JspStub.prepareServlet(JspStub.java:148) at weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl. java:306) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:208) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm pl.java:246) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe rvletContext.java:1265) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm pl.java:1631) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120) -Original Message- From: Jeff Martin [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 12:22 PM To: Struts Users Mailing List Subject: RE: Help, How to display Chinese in jsp by using message tag ? Have you tried putting the contentType in the JSP page directive like I had previously suggested? The html spec at http://www.w3.org/TR/html4/ section 5.2.2 says: To sum up, conforming user agents must observe the following priorities when determining a document's character encoding (from highest priority to lowest): 1. An HTTP charset parameter in a Content-Type field. 2. A META declaration with http-equiv set to Content-Type and a value set for charset. 3. The charset attribute set on an element that designates an external resource. Therefore, if your web server is sending the content type as part of the HTTP header, your meta tag will be ignored. Jeff -Original Message- From: Julia Yang [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 2:05 PM To: Struts Users Mailing List Subject: RE: Help, How to display chinese in jsp by using message tag ? Thanks for you reply. You gave a good point. But I still don't know how to make it work. Can you or any body tell me how to fix it if you happened to know. What I did was: edit the application_zh.properties in note pad and save in UTF-8 encoding. In my jsp I tried each of the following headmeta http-equiv=Content-Type content=text/html; charset=UTF-8/head headmeta http-equiv=Content-Type content=text/html; charset=gb2312/head same problem: nothing shows if I put English text instead of Chinese character in the property file, it works fine. Does it explain some thing ? Thanks Julia -Original Message- From: Chris Birch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 10:04 AM To: Struts Users Mailing List Subject: RE: Help, How to display chinese in jsp by
RE: How do you pass a data object for editing?
But what if you're crossing request boundaries (i.e. user edits form, presses edit, has to review her data, presses save)? You'll have to keep the information in the session AFAICS. Please correct me if I'm wrong. It would simplify my life a lot :) tomK -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: donderdag 13 december 2001 10:41 To: Struts Users Mailing List Subject: RE: How do you pass a data object for editing? I agree with Ryan. An old rule from way back:- Pass Keys Round Not Data It's simpler to only keep keys across user interactions (either stored on the form or in the session). Otherwise you have 3 versions of data 1 - what's on the database. 2 - what you've saved in the session (or on the form) 3 - new values coming in from the form Not having the 2nd set of data is a big simplification. Some might say re-reading the database more frequently is inefficient. ie. Your database caching is less efficient than your server's caching of session info. Maybe - but can serializing data to the client form be faster than you DB?. Keith. --- Stephen Owens [EMAIL PROTECTED] wrote: Ryan, I usually just discard the data object, other than properties on the form, either displayed or hidden, that I need to identify it or populate it. Then I reload it, update it, and finally update the DB when/if the form is submitted. -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 4:36 PM To: [EMAIL PROTECTED] Subject: How do you pass a data object for editing? I'm interested in finding out how other people are passing data objects between requests for updating. For instance - User clicks Edit Record I load the data object from the database, copy the properties to the form, and put the data object in the session. When the users presses save on the form, I get the data object from the session, try and do a consistency check to make sure the key fields match what is on the form, and do the update. Is there a way to pass the data object with the form? Maybe via serialization? That would keep it out of the session, and remove the consistency check. Thanks, Ryan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts intermittently not working after startup
I've been developing my first real Struts application for last several weeks and things have been going OK. But I reached a point (about Sunday) where the web app now doesn't always work correctly, in that it give errors like: Error 500: No action instance for path /findEntity could be created and other objects that should have been instantiated but arent'. If I restart the server a few times the web app works again. There is nothing in the log to suggest that the web app startup is failing (all action mappings seem to be added ok). It's only when I click on a link that I see the problem - Struts trys to forward me to appropriate Action but can't find it. The errors just sem to have appeared as my web app grew to a certain point but I only have about 30 mappings in the config file - I can't see that's a limitation. I have a colleague whose Struts app is now also exhibiting same problem. Any ideas please? (I'm using Struts 1.0 release version - not nightly build) Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts intermittently not working after startup
Yes I too have the same problem, Count me ... Kicha Rob Breeds wrote: I've been developing my first real Struts application for last several weeks and things have been going OK. But I reached a point (about Sunday) where the web app now doesn't always work correctly, in that it give errors like: Error 500: No action instance for path /findEntity could be created and other objects that should have been instantiated but arent'. If I restart the server a few times the web app works again. There is nothing in the log to suggest that the web app startup is failing (all action mappings seem to be added ok). It's only when I click on a link that I see the problem - Struts trys to forward me to appropriate Action but can't find it. The errors just sem to have appeared as my web app grew to a certain point but I only have about 30 mappings in the config file - I can't see that's a limitation. I have a colleague whose Struts app is now also exhibiting same problem. Any ideas please? (I'm using Struts 1.0 release version - not nightly build) Thanks Rob -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] --H P-- - i n v e n t - https://ecardfile.com/id/kicha -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How do you pass a data object for editing?
Tom, In that case as you are doing now is the best way. Maybe store the key on the form so you can check the key on the incoming form matches the key of the data held in the session (to guard against bugs hacking). Then (big pain) - before updating check the data on the DB is the same as what you originally saved in the session (guard against intervening updates (optimistic locking I think they call this)). This involves a lot of code! --- There is another way which I prefer - but not so often used. eg. Opening a bank account online involves many forms. On your customer account tables have a status field. Values:- INCO - Incomplete data. ACTV - Active BLKD - Blocked DEL - Deleted Each form writes the data to the DB as INCO indicating data from a multi-form interaction. After all forms are complete final validation is done the status set to ACTV. Most functions treat INCO the same as DEL - ie. ignore it - the INCO value isn't a lot extra to add. Advantage - in a complex long interaction every submit saves data on the DB - so lost sessions, internet problems don't lose the users data. Disadvantage - possibly large amounts of INCO data from people messing about - extra hits on database. Any use? Keith --- Tom Klaasen (TeleRelay) [EMAIL PROTECTED] wrote: But what if you're crossing request boundaries (i.e. user edits form, presses edit, has to review her data, presses save)? You'll have to keep the information in the session AFAICS. Please correct me if I'm wrong. It would simplify my life a lot :) tomK -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: donderdag 13 december 2001 10:41 To: Struts Users Mailing List Subject: RE: How do you pass a data object for editing? I agree with Ryan. An old rule from way back:- Pass Keys Round Not Data It's simpler to only keep keys across user interactions (either stored on the form or in the session). Otherwise you have 3 versions of data 1 - what's on the database. 2 - what you've saved in the session (or on the form) 3 - new values coming in from the form Not having the 2nd set of data is a big simplification. Some might say re-reading the database more frequently is inefficient. ie. Your database caching is less efficient than your server's caching of session info. Maybe - but can serializing data to the client form be faster than you DB?. Keith. --- Stephen Owens [EMAIL PROTECTED] wrote: Ryan, I usually just discard the data object, other than properties on the form, either displayed or hidden, that I need to identify it or populate it. Then I reload it, update it, and finally update the DB when/if the form is submitted. -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 4:36 PM To: [EMAIL PROTECTED] Subject: How do you pass a data object for editing? I'm interested in finding out how other people are passing data objects between requests for updating. For instance - User clicks Edit Record I load the data object from the database, copy the properties to the form, and put the data object in the session. When the users presses save on the form, I get the data object from the session, try and do a consistency check to make sure the key fields match what is on the form, and do the update. Is there a way to pass the data object with the form? Maybe via serialization? That would keep it out of the session, and remove the consistency check. Thanks, Ryan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How do you pass a data object for editing?
-Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: donderdag 13 december 2001 12:03 To: Struts Users Mailing List Subject: RE: How do you pass a data object for editing? Tom, In that case as you are doing now is the best way. Maybe store the key on the form so you can check the key on the incoming form matches the key of the data held in the session (to guard against bugs hacking). Then (big pain) - before updating check the data on the DB is the same as what you originally saved in the session (guard against intervening updates (optimistic locking I think they call this)). This involves a lot of code! I once learned a trick that simplifies this process a lot: in your DB, add a field VERSION. On a select, you save the VERSION. On update, you say UPDATE mytable SET version=newversion [and other fields] WHERE [criteria] AND VERSION=oldversion where oldversion is the version you saved, and newversion=oldversion+1. So you don't have to check against all fields, only one dedicated one. --- There is another way which I prefer - but not so often used. eg. Opening a bank account online involves many forms. On your customer account tables have a status field. Values:- INCO - Incomplete data. ACTV - Active BLKD - Blocked DEL - Deleted Each form writes the data to the DB as INCO indicating data from a multi-form interaction. After all forms are complete final validation is done the status set to ACTV. Most functions treat INCO the same as DEL - ie. ignore it - the INCO value isn't a lot extra to add. Advantage - in a complex long interaction every submit saves data on the DB - so lost sessions, internet problems don't lose the users data. Disadvantage - possibly large amounts of INCO data from people messing about - extra hits on database. Another disadvantage I see: if one of the fields the user has to enter is (part of) the primary key, you won't be able to store it until he fills it out. Any use? Stored in my patterns to remember memory in any case. Thanks. tomK Keith --- Tom Klaasen (TeleRelay) [EMAIL PROTECTED] wrote: But what if you're crossing request boundaries (i.e. user edits form, presses edit, has to review her data, presses save)? You'll have to keep the information in the session AFAICS. Please correct me if I'm wrong. It would simplify my life a lot :) tomK -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: donderdag 13 december 2001 10:41 To: Struts Users Mailing List Subject: RE: How do you pass a data object for editing? I agree with Ryan. An old rule from way back:- Pass Keys Round Not Data It's simpler to only keep keys across user interactions (either stored on the form or in the session). Otherwise you have 3 versions of data 1 - what's on the database. 2 - what you've saved in the session (or on the form) 3 - new values coming in from the form Not having the 2nd set of data is a big simplification. Some might say re-reading the database more frequently is inefficient. ie. Your database caching is less efficient than your server's caching of session info. Maybe - but can serializing data to the client form be faster than you DB?. Keith. --- Stephen Owens [EMAIL PROTECTED] wrote: Ryan, I usually just discard the data object, other than properties on the form, either displayed or hidden, that I need to identify it or populate it. Then I reload it, update it, and finally update the DB when/if the form is submitted. -Original Message- From: Ryan Cornia [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 4:36 PM To: [EMAIL PROTECTED] Subject: How do you pass a data object for editing? I'm interested in finding out how other people are passing data objects between requests for updating. For instance - User clicks Edit Record I load the data object from the database, copy the properties to the form, and put the data object in the session. When the users presses save on the form, I get the data object from the session, try and do a consistency check to make sure the key fields match what is on the form, and do the update. Is there a way to pass the data object with the form? Maybe via serialization? That would keep it out of the session, and remove the consistency check. Thanks, Ryan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at
RE: How to extract multiple columns of data in an logic:iterate tag ?
I had to do the same thing. My bean model is Iterator. Everything WORKS. Use nested iterate tags on the same name, BUT! you must call previous() in nested iterate. logic:iterate id=dummy name=groupModel trjsp:setProperty name=groupModel property=back value=/ logic:iterate id=dummy2 name=groupModel length=2 td width=49% valign=top... jsp:getProperty name=groupModel property=procDescription/ /td... /logic:iterate /tr /logic:iterate Please notice: 1. Usage of length attribute in nested iterate; 2. Call to hack setProperty/back, which does something similar to previous(). I think this SHOULD be fixed by Struts writers: ...EVERYTHING IS APPROXIMATE: IterateTag.java... boolean dontNext; Tag tag = findAncestorWithClass( this, IterateTag.class); if( tag != null tag.getName().equals(getName()) ) { // we are in nested iterate on the same name dontNext = true; // parent tag also hasNext, otherwise how could we come here? } ... if( ! dontNext) // add this line ... next() -Original Message- From: SHURTLEFF,ROBERT (HP-FtCollins,ex1) [mailto:[EMAIL PROTECTED]] Sent: 13 ??? 2001 ?. 3:33 To: [EMAIL PROTECTED] Subject: How to extract multiple columns of data in an logic:iterate tag ? Assume that the ActionForm has the getter for the below myhashtable that returns a Map. Assume that the .value returns an Array of Strings (or whatever) I want to build a table with 4 columns in it with the logic:iterate . I copied the below code from the STRUTS Developers Guide: logic:iterate id=element name=myhashtable Next element is bean:write name=element property=value/ /logic:iterate Assume that a typical record is like: Map.key = myKey Map.value = [ myvalue, mydesc, myotherdata ] But, how do I get the 0th, 1st, 2nd, etc. columns data out of the .value? Does this work? logic:iterate id=element name=myhashtable Next element key is bean:write name=element property=key/ Next element value 0 is bean:write name=element property=value[0]/ Next element value 1 is bean:write name=element property=value[0]/ Next element value 2 is bean:write name=element property=value[0]/ /logic:iterate What if .value was a Class like public class myRecord{ .getValue() .getDesc() .getOtherData() } How would you call the getters to get the data? All help is appreciated. Robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: As there any Expected Date The Next Version of Struts will Come Out?
http://jakarta.apache.org/struts/userGuide/kickstart.html#release The best advice to make any strategic plans based on what is available today, period, and treat any new release as a pleasant surprise. Even our roughest estimates have proven to be wildly inaccurate, and so it would be cruel for us to even try and guess. [EMAIL PROTECTED] wrote: Hi Is there any expected date that the next version of struts will come out? Just roughly, first quarter 2002, second, third? Is the next big version going to be 1.1? Cheers Tony -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: struts/expresso mentor
I would be very interested in being considered for this role. Working for the past year to write webAppWriter, a jsp/struts/expresso app that writes jsp/struts/expresso apps, this is very familiar territory, and one that seems pretty easy once it is repetitive. Samples for your review (10 minute versions) are on the webAppWriter site, and are numberous and varied. I am doing a similar mentoring thing for a company here in Dallas. John McClain wrote: I am fairly new to jsp/struts/expresso development and have been given a task that seems more than I can chew. This newsgroup is wonderful, but I was wondering if there are any expresso/struts gurus out there who would consider a mentoring relationship with me as I attempt to build this project. The fee for the service could be worked out. Any takers??? John McClain [EMAIL PROTECTED] John McClain 7604 Muschetto Ct. Citrus Heights, CA. 95621 [EMAIL PROTECTED] (916)728-5223 -- Pete Carapetyan http://datafundamentals.com Java Development Services Open standards technology for commercial profitability -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Have a problem inserting an action or only a jps into a template
Hi, I use Struts from the nighly build 04.11.2001. My template looks like the following: %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % html:html locale=true html html:base/ body background='graphics/blueAndWhiteBackground.gif' table width='610' trtdtiles:get name='content'//td/tr /table html:errors/ /body /html /html:html and my JSP ShowArticleList wich uses that template %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles % tiles:insert template='/common/template.jsp' tiles:put name='content' content='/show/articleList.do'/ /tiles:insert The action /show/articleList.do is defined like action name=articleListBean scope=session path=/show/articleList unknown=false type=com.tecmath.cms.mt.struts.ArticleListAction parameter=show forward name=success path=/tmpl/articleListCont.jsp/ /action and /tmpl/articleListCont.jsp is %@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % UL logic:iterate id=article name=articleListBean property=articles LI html:hidden name=article property=id/ html:link page=/ArticleDetails.jsp paramId=articleId paramName=article paramProperty=id bean:write name=article property=articleNumber/ /html:link (bean:write name=article property=materialGroup/) bean:write name=article property=price/ bean:write name=article property=currency/ /LI /logic:iterate /UL If I excute the ShowArticleList.jsp I get the next error. Can someone tell me why ? Error: 500 Location: /iwf-test/ShowArticleList.jsp Internal Servlet Error: D:\Programme\Entwicklung\IBM\VisualAge for Java\ide\project_resources\Apache_Tomcat_Test_Environment\webapps\iwf-test\S howArticleList.jsp(3,4) Unable to convert a String to java.lang.Object for attribute content -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
ActionMappings parameter - field
Hi, What is the parameter - field for in the ActionMapping class ? I was thinking about storing some info there that I use to communicate some things between my actions. Is it safe to just call ActionMapping.setParameter and set its value or should it be put inside a synchronized block ? /tuomo -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: ActionMappings parameter - field
Hi Tuomo, The mapping parameter is an arbitrary string associated with a mapping that can be accessed via mapping.getParameter (). Jon. -Original Message- From: Tuomo Syvänperä [mailto:[EMAIL PROTECTED]] Sent: 13 December 2001 12:45 To: [EMAIL PROTECTED] Subject: ActionMappings parameter - field Hi, What is the parameter - field for in the ActionMapping class ? I was thinking about storing some info there that I use to communicate some things between my actions. Is it safe to just call ActionMapping.setParameter and set its value or should it be put inside a synchronized block ? /tuomo -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: ActionMappings parameter - field
Thx.. But is it safe to use setParameter in your own actions and if I do should i enclose it in a synchronized block ? /tuomo Jon.Ridgway wrote: Hi Tuomo, The mapping parameter is an arbitrary string associated with a mapping that can be accessed via mapping.getParameter (). Jon. -Original Message- From: Tuomo Syvänperä [mailto:[EMAIL PROTECTED]] Sent: 13 December 2001 12:45 To: [EMAIL PROTECTED] Subject: ActionMappings parameter - field Hi, What is the parameter - field for in the ActionMapping class ? I was thinking about storing some info there that I use to communicate some things between my actions. Is it safe to just call ActionMapping.setParameter and set its value or should it be put inside a synchronized block ? /tuomo -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: ActionForward to anything other than a jsp
You can try something like below where the local action mapping maps to an action. forward name=success path=/detailAcct/ //return to a chained action //Note: if for some reason the success is changed from a mapped //action to a jsp page expect some nasty errors here. ActionForward actionForward = mapping.findForward(success); ActionMappings mappings = mapping.getMappings(); String returnPath = actionForward.getPath(); ActionMapping finalMapping = mappings.findMapping(returnPath); EraAction finalAction = null; try { Class clazz = Class.forName(finalMapping.getType()); finalAction = (Action) clazz.newInstance(); } catch (Exception e) { cat.warn(Could not find chained action: + e.getMessage()); cs.setAttribute(accountForm,formInstance); return mapping.findForward(error); } //end try catch return finalAction.perform(finalMapping,formInstance,request,response); -Original Message- From: Scott A. Roehrig [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 01, 2001 10:59 PM To: [EMAIL PROTECTED] Subject: ActionForward to anything other than a jsp Hi: I have read the archives and have seen some posts and responses to this question, but was hoping something more definitive might be posted. Within an ActionA, I would like to forward to another ActionB to continue processing. Sounds reasonable. So, I look up the javadoc and see the section about ActionForward and think okay I would simply do the following in the first action ActionForward forward = new ActionForward(/ActionServlet/ActionB); return forward; Well, so far no luck to say the least. I seem to always get 404 errors that the page can't be found. I have seen a post about bypassing the ActionForward and using the request.getRequestDispatcher and have not tried that yet since it seemed so logical that the ActionForward method should work. No go, the only workaround I found was to have the forward to a .jsp page that did a jsp:forward to the actual action. Can someone please let me know. Can an Action forward to another Action instead of a JSP page and if so why does the above method not work? Thanks for any guidance. Scott -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem with Tomcat 3.3 and Struts 1.0
Hi! I'm new to struts and need help to get the examples running. I've downloaded and installed a fresh Tomcat 3.3. Then I installed struts 1.0 by copying all struts-*.war in the webapps-directory of tomcat. After restarting tomcat, struts is almost working: * http://localhost:8080/struts-documentation - work * http://localhost:8080/struts-blank - work * http://localhost:8080/struts-example - work * http://localhost:8080/struts-template - work * http://localhost:8080/struts-upload - work * http://localhost:8080/struts-exercise-taglib - 75% The link to /struts-exercise-taglib/bean-cookie.jsp causes an org.apache.jasper.JasperException with root cause: java.lang.IllegalAccessException. The link to /struts-exercise-taglib/logic-match.jsp causes an javax.servlet.ServletException: No getter method for property value of bean cookie with root cause: javax.servlet.jsp.JspException: No getter method for property value of bean cookie. But the best is the link to /struts-exercise-taglib/logic-compare.jsp. It kills tomcat :-(. On the console you can then see: # # HotSpot Virtual Machine Error, Internal Error # Please report this error at # http://java.sun.com/cgi-bin/bugreport.cgi # # Error ID: 47454E45524154452F4F502D41500E435050084B # abnormal program termination My environement: * http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.3/bin/jakarta-tom cat-3.3.zip * http://jakarta.apache.org/builds/jakarta-struts/release/v1.0/jakarta-struts- 1.0.zip * Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C) * Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode) * Win2000 Prof. I put the detailed error messages in the attachment of this mail. I'm thankful to every hint. Alexander -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
forward to jsp or to do ?
What' s the difference between a forward to jsp or to do ? In case of forward to jsp just servlet compiled from the jsp file will be called. Am I right ? What will happen if I forward to *.do ? regards, Maris global-forwards forward name=logon path=/logon.jsp/ forward name=logoff path=/logoff.do/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: multiple buttons on a form
The image submit from strutsx seems to work for a submit with an image. However, I don't see a javascript property (onClick) so that a confirm pop-up can be implemented. thanks -Original Message- From: Phase Communcations [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 5:47 PM To: Struts Users Mailing List Subject: RE: multiple buttons on a form visit the strutsx.org and look at the image button patch. -Original Message- From: Lachlan Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 5:26 PM To: Struts Users Mailing List Subject: multiple buttons on a form Is there a way to have multiple submit buttons on a form and be able to tell which button was pressed in the following action? Regards, Lachlan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
how to deal with Variable form elements in struts
Hi, I have a form that looks very similar to the inbox in Yahoo or HotMail. The number of checkbox is varying and so are their names. How to assign their values to the Form Bean property? Currently I've been using a normal input html form tag like follows. input type=checkbox name=chk_%= I % and in the Action Class I'm using the request object to go through all the form elements using getParameterNames and finding out the checkboxes and getting the checked row. Can some one through light on how to go about doing the same using the Struts frame work. --Shashi.
Re: Have a problem inserting an action or only a jps into a template
Hello, This problem arise with some web container : they have some trouble to convert a String to an Object ;-(. In your case, this seems to happen in tags tiles:put name='content' content='/show/articleList.do'/ Both methods setContent(String) and setContent(Object) exist, but container doesn't find the appropriate one. Possible solutions : * remove one of the two methods (but this could lead to problems if you use it elsewhere) and recompile Tiles * try something like : content='%=(Object)/show/articleList.do%' Cedric storck wrote: Hi, I use Struts from the nighly build 04.11.2001. My template looks like the following: %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % html:html locale=true html html:base/ body background='graphics/blueAndWhiteBackground.gif' table width='610' trtdtiles:get name='content'//td/tr /table html:errors/ /body /html /html:html and my JSP ShowArticleList wich uses that template %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles % tiles:insert template='/common/template.jsp' tiles:put name='content' content='/show/articleList.do'/ /tiles:insert The action /show/articleList.do is defined like action name=articleListBean scope=session path=/show/articleList unknown=false type=com.tecmath.cms.mt.struts.ArticleListAction parameter=show forward name=success path=/tmpl/articleListCont.jsp/ /action and /tmpl/articleListCont.jsp is %@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % UL logic:iterate id=article name=articleListBean property=articles LI html:hidden name=article property=id/ html:link page=/ArticleDetails.jsp paramId=articleId paramName=article paramProperty=id bean:write name=article property=articleNumber/ /html:link (bean:write name=article property=materialGroup/) bean:write name=article property=price/ bean:write name=article property=currency/ /LI /logic:iterate /UL If I excute the ShowArticleList.jsp I get the next error. Can someone tell me why ? Error: 500 Location: /iwf-test/ShowArticleList.jsp Internal Servlet Error: D:\Programme\Entwicklung\IBM\VisualAge for Java\ide\project_resources\Apache_Tomcat_Test_Environment\webapps\iwf-test\S howArticleList.jsp(3,4) Unable to convert a String to java.lang.Object for attribute content -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: multiple buttons on a form
I suggest that you create a function Javascript called for the buttons, inside of the function you records one hidde-field before calling submit with a parameter passed for the function, for example, then you I can treat several submits. - Original Message - From: Kiet Nguyen [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 12:48 PM Subject: RE: multiple buttons on a form The image submit from strutsx seems to work for a submit with an image. However, I don't see a javascript property (onClick) so that a confirm pop-up can be implemented. thanks -Original Message- From: Phase Communcations [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 5:47 PM To: Struts Users Mailing List Subject: RE: multiple buttons on a form visit the strutsx.org and look at the image button patch. -Original Message- From: Lachlan Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 5:26 PM To: Struts Users Mailing List Subject: multiple buttons on a form Is there a way to have multiple submit buttons on a form and be able to tell which button was pressed in the following action? Regards, Lachlan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
re: How to return to the page that called the action class?
There are a couple options I can think of: 1. use request.getHeader(Referer) 2. add a property to your generic class that holds the return link. Then have the calling class set it. 3. you could use javascript to back up, but that is ugly... HTH, Pete Hi, I have a generic action class that I want to set up that when the class is successful it send the user back to the page from which they came. How do I get that information? And, how would I structure my class to allow it to send the user back? Thanks for any info. Alex -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
re: forward to jsp or to do ?
Correct, if you forward to a jsp, it will display the compile jsp servlet. If you forward to a do, then it will look for that action in your actions-config.xml and execute the appropriate action class. This allows you to chain actions together. HTH, Pete What' s the difference between a forward to jsp or to do ? In case of forward to jsp just servlet compiled from the jsp file will be called. Am I right ? What will happen if I forward to *.do ? regards, Maris global-forwards forward name=logon path=/logon.jsp/ forward name=logoff path=/logoff.do/ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: Have a problem inserting an action or only a jps into a template
If I try my example with JBoss2.2.2Tomcat3.2.3 as standalone everyting works fine but if I try it with my JBossTomcat integrated in Visual Age I get that exception. The funny thing is that it has worked some days ago before I tested it outside VA and editited the JSP and configs outside VA. -Ursprungliche Nachricht- Von: Cedric Dumoulin [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 13. Dezember 2001 15:58 An: Struts Users Mailing List Betreff: Re: Have a problem inserting an action or only a jps into a template Hello, This problem arise with some web container : they have some trouble to convert a String to an Object ;-(. In your case, this seems to happen in tags tiles:put name='content' content='/show/articleList.do'/ Both methods setContent(String) and setContent(Object) exist, but container doesn't find the appropriate one. Possible solutions : * remove one of the two methods (but this could lead to problems if you use it elsewhere) and recompile Tiles * try something like : content='%=(Object)/show/articleList.do%' Cedric storck wrote: Hi, I use Struts from the nighly build 04.11.2001. My template looks like the following: %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % html:html locale=true html html:base/ body background='graphics/blueAndWhiteBackground.gif' table width='610' trtdtiles:get name='content'//td/tr /table html:errors/ /body /html /html:html and my JSP ShowArticleList wich uses that template %@ taglib uri=/WEB-INF/tiles.tld prefix=tiles % tiles:insert template='/common/template.jsp' tiles:put name='content' content='/show/articleList.do'/ /tiles:insert The action /show/articleList.do is defined like action name=articleListBean scope=session path=/show/articleList unknown=false type=com.tecmath.cms.mt.struts.ArticleListAction parameter=show forward name=success path=/tmpl/articleListCont.jsp/ /action and /tmpl/articleListCont.jsp is %@ taglib uri='/WEB-INF/struts-template.tld' prefix='template' % %@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % UL logic:iterate id=article name=articleListBean property=articles LI html:hidden name=article property=id/ html:link page=/ArticleDetails.jsp paramId=articleId paramName=article paramProperty=id bean:write name=article property=articleNumber/ /html:link (bean:write name=article property=materialGroup/) bean:write name=article property=price/ bean:write name=article property=currency/ /LI /logic:iterate /UL If I excute the ShowArticleList.jsp I get the next error. Can someone tell me why ? Error: 500 Location: /iwf-test/ShowArticleList.jsp Internal Servlet Error: D:\Programme\Entwicklung\IBM\VisualAge for Java\ide\project_resources\Apache_Tomcat_Test_Environment\webapps\iwf-test\S howArticleList.jsp(3,4) Unable to convert a String to java.lang.Object for attribute content -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Problem with Struts in IBM VisualAge 3.5.2
I'm trying to install and run Struts in IBM VisualAge 3.5 Patch 2 according to the instructions found in the paper from Kyle Brown (Apache Struts and VisualAge for Java, Part2: Using Struts in VAJ 3.5.2 and 3.5.3). Before to install the EmployeelistForApache.zip contents I was able to start the Apache Tomcat Test Environment and successfully run the default example applications. After the installation and the configuration of the EmployeelistForApache.zip contents, when I try to start Apache Tomcat, I have the following messages (below) on VAJ consolle, ending with the listed exception stack frame. Anyone that can give me an hint? TIA, Marco Spadoni Italia On Line Context log path=/employeelist :tomcat.errorPage: init Context log path=/employeelist :jsp: init JASPER_LOG Thu Dec 13 15:45:25 GMT+01:00 2001 Parent class loader is: org.apache.tomcat.loader.AdaptiveServletLoader@294c/JASPER_LOG Context log path=/employeelist :default: init Context log path=/employeelist :action: init Context log path=/employeelist :action: Loading application resources from resource ApplicationResources Context log path=/employeelist :action: Initializing configuration from resource path /WEB-INF/struts-config.xml Exception occurred: null java.lang.reflect.InvocationTargetException: java.lang.InternalError: (Ex02) An error has occurred. java.lang.Throwable(java.lang.String) java.lang.Error(java.lang.String) java.lang.VirtualMachineError(java.lang.String) java.lang.InternalError(java.lang.String) org.apache.struts.digester.Digester org.apache.struts.action.ActionServlet.initDigester(int) org.apache.struts.digester.Digester org.apache.struts.action.ActionServlet.initDigester(int) void org.apache.struts.action.ActionServlet.initMapping() void org.apache.struts.action.ActionServlet.init() void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig) void org.apache.tomcat.core.ServletWrapper.initServlet() void org.apache.tomcat.core.ServletWrapper.loadServlet() void org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(org.apache.to mcat.core.Context) void org.apache.tomcat.core.ContextManager.initContext(org.apache.tomcat.core.Con text) void org.apache.tomcat.core.ContextManager.init() void org.apache.tomcat.startup.Tomcat.execute(java.lang.String []) void org.apache.tomcat.startup.Tomcat.main(java.lang.String []) java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object []) void com.ibm.ivj.tomcat.TomcatRunner.startTomcat(java.lang.String) void com.ibm.ivj.tomcat.TomcatRunner.actionPerformed(java.awt.event.ActionEvent) void java.awt.Button.processActionEvent(java.awt.event.ActionEvent) void java.awt.Button.processEvent(java.awt.AWTEvent) void java.awt.Component.dispatchEventImpl(java.awt.AWTEvent) void java.awt.Component.dispatchEvent(java.awt.AWTEvent) void java.awt.EventQueue.dispatchEvent(java.awt.AWTEvent) boolean java.awt.EventDispatchThread.pumpOneEvent() void java.awt.EventDispatchThread.pumpEvents(java.awt.Conditional) void java.awt.EventDispatchThread.run() -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts intermittently not working after startup
Error 500: No action instance for path /findEntity could be created ... I've gotten this type of thing when I'm changing any of the action classes during development. I assume struts might be doing its own class loading and I'm pulling the old class out from under it. If you are not modifying the classes, I don't know what might be the cause. By the way, is there any way to tell struts to re-initialize itself, including reloading the classes? Frank Lawlor Athens Group, Inc. (512) 345-0600 x151 Athens Group, an employee-owned consulting firm integrating technology strategy and software solutions. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: struts/expresso mentor
Hi Pete, I am so glad you responded! If we could talk about this over the phone, it would be a lot easier. Is this OK with you? if it's not, then how do you want to handle this?? John McClain 7604 Muschetto Ct. Citrus Heights, CA. 95621 [EMAIL PROTECTED] (916)728-5223 - Original Message - From: Pete Carapetyan [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 4:18 AM Subject: Re: struts/expresso mentor I would be very interested in being considered for this role. Working for the past year to write webAppWriter, a jsp/struts/expresso app that writes jsp/struts/expresso apps, this is very familiar territory, and one that seems pretty easy once it is repetitive. Samples for your review (10 minute versions) are on the webAppWriter site, and are numberous and varied. I am doing a similar mentoring thing for a company here in Dallas. John McClain wrote: I am fairly new to jsp/struts/expresso development and have been given a task that seems more than I can chew. This newsgroup is wonderful, but I was wondering if there are any expresso/struts gurus out there who would consider a mentoring relationship with me as I attempt to build this project. The fee for the service could be worked out. Any takers??? John McClain [EMAIL PROTECTED] John McClain 7604 Muschetto Ct. Citrus Heights, CA. 95621 [EMAIL PROTECTED] (916)728-5223 -- Pete Carapetyan http://datafundamentals.com Java Development Services Open standards technology for commercial profitability -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Mixing Struts with XSLT
It makes sense to me and would like to know if there is an answer as well. This tackles one problem. What about the return? You have to generate XML again and than send it through the loop. Sandeep --- Dave Makower [EMAIL PROTECTED] wrote: We are currently using XML with XSLT in JSPs, in the following manner, and we'd like to integrate this approach with Struts: We use a custom tag (similar to the x:transform tag slated for inclusion in the standard JSP taglibs) that applies a stylesheet to XML included in the body of the tag. This way, we can use Java and JSP inside the transform tag to generate XML, and have our HTML developers create XSLT stylesheets that create the appropriate look for the data represented by the XML. A further advantage of this approach is that we can start by including static XML in the JSP as a stand-in for the dynamic data, so that the HTML developers can create their stylesheets in parallel with the Java developers doing the work to generate the XML dynamically. Now that we're considering moving to Struts, we'd like to be able to let our HTML developers use the Struts html taglib within their stylesheets to generate HTML form elements. But that would require that after the transform tag is interpreted, the results are passed again through the JSP interpreter in order to replace the Struts tags with the appropriate HTML form elements. Is this making sense? Does anyone have a suggestion as to the best way to accomplish this? -- +---+ | Dave Makower [EMAIL PROTECTED] | | http://www.davemak.com/ | +---+ -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: forward to jsp or to do ?
I changed a forward from search.jsp to search.do. Then when I forward to /search it throws an exception. I tried to change some other forwards from jsp to do with the same outcome. Actually it goes in a loop printing the same stack trace again and again. I have do forward to logoff only. But it's different. It has no form bean. Could you explain it, please. regards, Maris // forward if(request.getParameter(search) != null) return mapping.findForward(search); // config file global-forwards forward name=search path=/search.do/ forward name=logoff path=/logoff.do/ /global-forwards action path=/search type=addressbook.SearchAction name=SearchForm scope=request input=/search.jsp /action actionpath=/logoff type=addressbook.LogOffAction /action // stack trace Internal Servlet Error: javax.servlet.ServletException: cannot find message associated with key : dispatcher.forwardException at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher Impl.java:210) at org.apache.struts.action.ActionServlet.processActionForward(ActionServle t.java:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher Impl.java:194) at org.apache.struts.action.ActionServlet.processActionForward(ActionServle t.java:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher Impl.java:194) at org.apache.struts.action.ActionServlet.processActionForward(ActionServle t.java:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: 500 Error
I just upgraded to Tomcat 4.01 and get the following exception: javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception at org.apache.catalina.core.StandardWrapper.load(StandardWrapper. java:871) . java.lang.NoSuchMethodError at org.apache.jasper.compiler.TldLocationsCache.processJars(TldLo cationsCache.java:202) One possible cause of this is having an incorrect (usually old) version of a class/jar in your path. - Make sure you have installed all correct version of any jars. - Make sure you don't put jars in the jre lib or lib/ext dirs unless they belong there. - The above seems to indicate a problem with the org.apache.jasper.compiler.TldLocationsCache class so look to see where this is located (probably in some jasper*.jar) and make sure its not an old one. Tomcat should have the correct version in jasper/jasper-compiler.jar Frank Lawlor Athens Group, Inc. (512) 345-0600 x151 Athens Group, an employee-owned consulting firm integrating technology strategy and software solutions. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Solution: 2 Databases Problem / Oracle Connection Pooling
There is a very easy solution for the 2 Databases Problem: Oracle provides a .zip File instead a .jar file. Rename .zip to .jar and everything works fine. Struts cannot find the correct drivers, but the Error Messages are completely nonsense (100m try-catch block?) Things can be so easy cu hansa -- Sven Haiges mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Servlet 2.0 spec
Hey all, I have a client that is using Oracle 9ias. Currently they are not wanting to move to OC4J (Orion). Therefore, they are planning on using JServ as their servlet container. I understand that JServ is servlet 2.0 compliant. I also understand that Struts requires the container be 2.2 compliant. I'm still trying to convince the client that they should move to OC4J. However, if I am unable to do so is there any way to use struts in a JServ container. Is there specific functionality I could avoid? Could someone break down what 2.2 functionality Struts is relying on? TIA, Thanks, Jason Smith Project Refinery __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts/FOP
Has anyone ever generated a PDF file (via FOP) from an Action servlet? Any implications in doing so via an Action servlet vs. a standard/plain servlet? I've reviewed the servlet example from the FOP distro. and it seems as if as long as I have access to the response object (which I do in the Action servlet) I should be fine. For those interested, the situation is that (from a servlet) I will be using Enhydra's Zeus to generate an in-memory XML doc, then using that XML doc and a pre-written XSL stylesheet I plan on using FOP to build a PDF doc and shoot it back to the user's browser. Not too out of the ordinary, but I'd like to inquire into any pitfalls. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Dynamic SQL query library
While not politically correct I too use a CachedRowSet, by setting a property in my FromBean of rowset to accomplish this. For more see http://developer.java.sun.com/developer/earlyAccess/crs Vic Note, however, that CachedRowSet is no commercially redistributable (Stated on the above reverence). Frank Lawlor Athens Group, Inc. (512) 345-0600 x151 Athens Group, an employee-owned consulting firm integrating technology strategy and software solutions. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: ActionMappings parameter - field
I think communication between actions can best be done via the request object - it is reachable from everywhere, and you can be sure it doesn't interfere with struts. hth, tomK -Original Message- From: Tuomo Syvänperä [mailto:[EMAIL PROTECTED]] Sent: donderdag 13 december 2001 13:45 To: [EMAIL PROTECTED] Subject: ActionMappings parameter - field Hi, What is the parameter - field for in the ActionMapping class ? I was thinking about storing some info there that I use to communicate some things between my actions. Is it safe to just call ActionMapping.setParameter and set its value or should it be put inside a synchronized block ? /tuomo -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Design Help
James, I was reading through the archives when I came across the below post. If one follow the design as you have shown below, dose the Delegate get stored in the form? If it does then does one reference the DAO via the delegate with a nested type syntax in the view/JSP? So if I have a Delegate, which in you example does a viewall, I first create the delegate, create the DAO and populate it and then store the Delegate in the form with some standard setter and getter method: FORM: public void setDelgate(Object d) { this.delgate = d; } public Object getDelgate() { return this.delgate; } Then in the view how do I reference the values in the DAO? Is it just something like: bean:write name=ViewAllFrm property=delegate.dao.value/ Where dao is the Data access object, and value is a getter in that object. Is this the correct flow or am I missing something? Thanks in advance. Regards, Todd G. Nist -Original Message- From: Hicks, James [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 29, 2001 5:46 PM To: Struts Users Mailing List Subject: RE: Design Help 1) The relationship is a starting point. Basically, I would not pass an ActionForm to my business delegate (RentalBean). Doing so ties that delegate to the web interface. If you were wanting to create a Swing client in the future, you would have to create seperate business delegates for it. Try to abstract your business delegates from your view ( see code below ). 2) Use a constructor that requires no params, but provide 'public void init(...)' params to initialize the state of your bean. 3) Depends on the scope of the application. I usually provide several different applications, all depending on the business cases (admin app, web user app, swing app, web services for b2b,...). 4) Start off with a base data access class that has general methods. The methods should provide a way to create jdbc connections and close connections, statements, and result sets. You can also have query builder methods in this class that don't tie it to any single use case. If you are wanting the application to scale upto EJB in the future, you are best to use delegate objects like you are doing (RentalBean). If you are wanting to use an Action class for every use case ( adding a rental, editing a rental, viewing a rental, deleting a rental), then you don't need to the action property . If you are wanting to use one class, then use the 'action' property in the request, this is how id did it below. The data access object (RentalDAO) should be an interface. You should use a factory that uses a JNDI value to select the DAO object. This allows you to change databases by just modifing a value in the web.xml file and redeploying your app. I wont go into this, but check the java petstore app (1.2.1) for examples. With the following code, only the BaseAction, RentalForm, and RentalAction are tied to the web client and struts. The business delegate (RentalDelegate) and the data access object(s) (BaseDAO and RentalDAO) can now be used with other clients (web, wap, swing,...). Lets rewrite some of the pseudo-code you sent: -- Code for BaseAction.java -- public abstract class BaseAction extends Action { //Don't use class variables in Action objects. These are not thread safe. //protected String action=null; //provide this method just in case any of your subclassing actions want to do some pre-initialization processing. public ActionForward prePerform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { //could do custom authentication or something else. //base implementation returns null. return null; } //this is good. I do this on all of my projects. Also got the idea from Ted Husted and a few others on the list. public abstract ActionForward performAction(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException; //proxy method public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { //WE CANT DO THIS BECAUSE Action OBJECTS ARE NOT THREAD SAFE. //Find out what we are doing (Create,Edit,Save,Reset, Delete, etc.) //action=request.getParameter(action); //if (action == null) // action=mapping.getParameter(); //catch all uncaught exceptions. Provide global
RE: 500 Error
What is your OS and environment? I had similar error with SUSE Linux, Apache1.3.2 Java SDK 1.4 beta 3, and struts 1.0. I changed to Java SDK 1.3 and used one of nightly builds. (all files in struts binary distribuiton have ^M caracter - DOS files and that might be also the reason. Thats my $0.02 Hope it helps. Peter Quoting Frank Lawlor [EMAIL PROTECTED]: I just upgraded to Tomcat 4.01 and get the following exception: javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception at org.apache.catalina.core.StandardWrapper.load(StandardWrapper. java:871) . java.lang.NoSuchMethodError at org.apache.jasper.compiler.TldLocationsCache.processJars(TldLo cationsCache.java:202) One possible cause of this is having an incorrect (usually old) version of a class/jar in your path. - Make sure you have installed all correct version of any jars. - Make sure you don't put jars in the jre lib or lib/ext dirs unless they belong there. - The above seems to indicate a problem with the org.apache.jasper.compiler.TldLocationsCache class so look to see where this is located (probably in some jasper*.jar) and make sure its not an old one. Tomcat should have the correct version in jasper/jasper-compiler.jar Frank Lawlor Athens Group, Inc. (512) 345-0600 x151 Athens Group, an employee-owned consulting firm integrating technology strategy and software solutions. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Servlet 2.0 spec
As I remember it's impossible to forward a request under 2.0. Don't think that struts will work. But some colleagues said they had replaced servlet library of JServ with newer ( I think 2.2 ) and it worked ! You can try it too. pls, let me know if it works Maris -Original Message- From: Jason Smith [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 6:22 PM To: [EMAIL PROTECTED] Subject: Servlet 2.0 spec Hey all, I have a client that is using Oracle 9ias. Currently they are not wanting to move to OC4J (Orion). Therefore, they are planning on using JServ as their servlet container. I understand that JServ is servlet 2.0 compliant. I also understand that Struts requires the container be 2.2 compliant. I'm still trying to convince the client that they should move to OC4J. However, if I am unable to do so is there any way to use struts in a JServ container. Is there specific functionality I could avoid? Could someone break down what 2.2 functionality Struts is relying on? TIA, Thanks, Jason Smith Project Refinery __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: forward to jsp or to do ?
it was because my action class forwarded to itself. excuse me, pls Maris -Original Message- From: Mâris Orbidâns Sent: Thursday, December 13, 2001 6:00 PM To: Struts Users Mailing List Subject: RE: forward to jsp or to do ? I changed a forward from search.jsp to search.do. Then when I forward to /search it throws an exception. I tried to change some other forwards from jsp to do with the same outcome. Actually it goes in a loop printing the same stack trace again and again. I have do forward to logoff only. But it's different. It has no form bean. Could you explain it, please. regards, Maris // forward if(request.getParameter(search) != null) return mapping.findForward(search); // config file global-forwards forward name=search path=/search.do/ forward name=logoff path=/logoff.do/ /global-forwards action path=/search type=addressbook.SearchAction name=SearchForm scope=request input=/search.jsp /action actionpath=/logoff type=addressbook.LogOffAction /action // stack trace Internal Servlet Error: javax.servlet.ServletException: cannot find message associated with key : dispatcher.forwardException at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher Impl.java:210) at org.apache.struts.action.ActionServlet.processActionForward(ActionServle t.java:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher Impl.java:194) at org.apache.struts.action.ActionServlet.processActionForward(ActionServle t.java:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcher Impl.java:194) at org.apache.struts.action.ActionServlet.processActionForward(ActionServle t.java:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:509) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts Design question
But my beans already contain the validation! Besides, performing the validation in the ActionForm is effectively tying business logic (data validation) to the web framework dontya think? Well, I put data type and required field validation only in the bean. Validation that is more advanced than that, or based on business rules should be in your app server (if you have one), or in the action object. While the response might be OK in a specific solution, I think it is, in general, the wrong partitioning of the validation issue. The questioner was more on the correct track. To understand the more general case, consider the case where a company has a database(s) and is developing multiple applications, some may even be developed by 3rd parties. How do they look at the data validation issue? Any DB administrator will tell you HE/SHE is responsible for the DB integrity, not the (irresponsible :-) app developers: - The data integrity issues need to be defined by those who really understand and are responsible for them. This includes business data rules. - You don't want to replicate the validation in multiple applications. - You don't want to have to change multiple applications and the database simultaneously if there are changes. - etc., etc., etc. Note that this doesn't mean ALL validation is associated with the database, just that which relates to the data model and the business integrity of the data base. If one app requires certain data, another app different data, and the database doesn't care, then it is the application responsibility. To address this we defined a set of objects which front the database. They worry not only about validation, but also things specific to the database (e.g. query language), connection pooling, etc. To work well with web applications these objects need to have a validation interface that lets you provide the total set of new (string?) data and allows the object to return field-specific and object-general error information. This is also a good place to place the common business data rules (not application rules) so that all applications use one common set, maintenance is consistent, etc. In VERY simple cases you could merge this with Action classes, but generally there are significant differences, no 1-1 relationship, etc. Frank Lawlor Athens Group, Inc. (512) 345-0600 x151 Athens Group, an employee-owned consulting firm integrating technology strategy and software solutions. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: File upload facility / file manager example app
Does anyone out there know of an opensource, java based file upload facility or file manager app ??? You will have to check the licensing statements yourself but two sources: - the struts source download has an upload app - the O'Reilly website has a very complete dicussion and sample code of this (search on upload). Frank Lawlor Athens Group, Inc. (512) 345-0600 x151 Athens Group, an employee-owned consulting firm integrating technology strategy and software solutions. winmail.dat Description: application/ms-tnef -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: struts/expresso mentor
Yes, a phone call would be great. I am in meetings for the rest of today, though, and have an optional one for tonight. Would tomorrow work? My schedule is fairly open then. John McClain wrote: Hi Pete, I am so glad you responded! If we could talk about this over the phone, it would be a lot easier. Is this OK with you? if it's not, then how do you want to handle this?? John McClain 7604 Muschetto Ct. Citrus Heights, CA. 95621 [EMAIL PROTECTED] (916)728-5223 - Original Message - From: Pete Carapetyan [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 4:18 AM Subject: Re: struts/expresso mentor I would be very interested in being considered for this role. Working for the past year to write webAppWriter, a jsp/struts/expresso app that writes jsp/struts/expresso apps, this is very familiar territory, and one that seems pretty easy once it is repetitive. Samples for your review (10 minute versions) are on the webAppWriter site, and are numberous and varied. I am doing a similar mentoring thing for a company here in Dallas. John McClain wrote: I am fairly new to jsp/struts/expresso development and have been given a task that seems more than I can chew. This newsgroup is wonderful, but I was wondering if there are any expresso/struts gurus out there who would consider a mentoring relationship with me as I attempt to build this project. The fee for the service could be worked out. Any takers??? John McClain [EMAIL PROTECTED] John McClain 7604 Muschetto Ct. Citrus Heights, CA. 95621 [EMAIL PROTECTED] (916)728-5223 -- Pete Carapetyan http://datafundamentals.com Java Development Services Open standards technology for commercial profitability -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- Pete Carapetyan http://datafundamentals.com Java Development Services Open standards technology for commercial profitability -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts/FOP
I'm interested in this as well. I just finished a project writing a XSL/FO stylesheet to generate a report, and did the creation through command line via a junit test suite. If you get this figured out, let me know, I'd be happy to help publish a struts-fop example! Matt John M. Corro [EMAIL PROTECTED] wrote: Has anyone ever generated a PDF file (via FOP) from an Action servlet? Any implications in doing so via an Action servlet vs. a standard/plain servlet? I've reviewed the servlet example from the FOP distro. and it seems as if as long as I have access to the response object (which I do in the Action servlet) I should be fine. For those interested, the situation is that (from a servlet) I will be using Enhydra's Zeus to generate an in-memory XML doc, then using that XML doc and a pre-written XSL stylesheet I plan on using FOP to build a PDF doc and shoot it back to the user's browser. Not too out of the ordinary, but I'd like to inquire into any pitfalls. -- To unsubscribe, e-mail: For additional commands, e-mail: - Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts!
RE: Problem with Struts in IBM VisualAge 3.5.2
- Did you remove IBM's XML parser and install the correct Xerces version? - Did you add your application project to the Class Path | Project Path of the TomcatRunner class? - Check to make sure you have ...\VisualAge for Java\ide\project_resources\Apache_Tomcat_Test_Environment\webapps\employeeli st\WEB-INF\struts-config.xml - Make sure the struts-config.xml format is correct (start with a known good one just to check) - You don't have any security enabled (IBM\VisualAge for Java\ide\program\lib\security\java.policy) do you? Make sure a simple app can open a file. Frank Lawlor Athens Group, Inc. (512) 345-0600 x151 Athens Group, an employee-owned consulting firm integrating technology strategy and software solutions. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: struts/expresso mentor
Sorry for that last post, should have been off list but I wasn't paying attention. It will not happen again. Bad netiquette on my part. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts/FOP
I would be interested in your approach. I used Cocoon to publish to a PDF file. Anyone with integration issues between the two frameworks? Thanks, Safa. I'm interested in this as well. I just finished a project writing a XSL/FO stylesheet to generate a report, and did the creation through command line via a junit test suite. If you get this figured out, let me know, I'd be happy to help publish a struts-fop example! Matt John M. Corro [EMAIL PROTECTED] wrote: Has anyone ever generated a PDF file (via FOP) from an Action servlet? Any implications in doing so via an Action servlet vs. a standard/plain servlet? I've reviewed the servlet example from the FOP distro. and it seems as if as long as I have access to the response object (which I do in the Action servlet) I should be fine. For those interested, the situation is that (from a servlet) I will be using Enhydra's Zeus to generate an in-memory XML doc, then using that XML doc and a pre-written XSL stylesheet I plan on using FOP to build a PDF doc and shoot it back to the user's browser. Not too out of the ordinary, but I'd like to inquire into any pitfalls. -- To unsubscribe, e-mail: For additional commands, e-mail: - Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: 500 Error
I had something like this the other night. I figured out that tomcat had saved the servlet generated off of my JSP and was checking the last-modified times between the servlet and the JSP file (like it should). The problem was that I was doing tag development and thus had to touch the JSP file after each compile to force tomcat to recompile the JSP with the new tags. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
prev action class
How can I determine ( in perform() method ) which was the previous ActionClass that forwarded to current class ? Maris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
re: How to return to the page that called the action class?
Sorry - this is a bit of a long example. It's my attempt to implement some chaining logic using a generic chainToPage class. Seems rather long winded to me - but it sure works doesn't do anything sneaky involving struts. In this example the linkList page forwards to linkMaint tells linkMaint to return to linkList (could be any page). Features - Only the standard forwardTo call is used. - All transfers of control use forwards name=... names defined in struts-config.xml. I use terminology of a boss page transferring to a slave page telling it where to go on completion, there must be better terms I'm sure. boss page - linkList slave page - linkMaint -example attached. --- Peter Alfors [EMAIL PROTECTED] wrote: There are a couple options I can think of: 1. use request.getHeader(Referer) 2. add a property to your generic class that holds the return link. Then have the calling class set it. 3. you could use javascript to back up, but that is ugly... HTH, Pete Hi, I have a generic action class that I want to set up that when the class is successful it send the user back to the page from which they came. How do I get that information? And, how would I structure my class to allow it to send the user back? Thanks for any info. Alex -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com == Struts config. linkList can transfer to maint or create page. In the following code example the linkMaint page returns to the linkList page. This config would allow it to go on to /pageAfterMaintFinished.do as well. !-- Links -- !-- LinkList uses ChainToPage as a boss -- action path=/biff1LinkList type=biff1.Biff1LinkListAction name=biff1LinkListForm scope=request validate=false input=/Biff1LinkList.jsp forward name=create path=/biff1LinkCreate.do/ forward name=maint path=/biff1LinkMaint.do/ /action !-- LinkList uses ChainToPage as a slave -- action path=/biff1LinkMaint type=biff1.Biff1LinkMaintAction name=biff1LinkMaintForm scope=request validate=false input=/Biff1LinkMaint.jsp forward name=list path=/biff1LinkList.do/ forward name=maintFinished path=/pageAfterMaintFinished.do/ /action == In the boss action class (linkList) - transfer to the slave (linkMaint) -- // 1st parm is the chain ID of the thing I want to go to // maybe overkill - it just a enables a check that boss slave match each other. // 2nd parm is the local forward name (defined in struts-config for the slave) which the // slave is to forward to. ChainToPage chainToPage = new ChainToPage(Biff1LinkMaintAction.CHAIN_ID, list); // // Boss attributes - things that the slave should not look at. // Things the boss class will use once the slave has returned. // Here it's selected options that must be re-established when the list // is redisplayed. chainToPage.setBossAttribute(selectedLinkSelectionOption, selectedLinkSelectionOption); chainToPage.setBossAttribute(selectedReviewDisplayTypeOption, selectedReviewDisplayTypeOption); // // Slave attributes - data being passed to the slave. Key values. // Since we have to have some stuff in the session we might // as well use it rather than the request. // chainToPage.setSlaveAttribute(selectedLinkID, selectedLinkID); // Clear out old stuff, add new one. request.getSession().removeAttribute(ChainToPage.SESSION_KEY); request.getSession().setAttribute(ChainToPage.SESSION_KEY, chainToPage); // forward to the slave. return forwardTo(mapping, maint); -- In the boss action class (linkList) - when started from another page See if transfer is from the the slave (linkMaint) (ie. if it's the ChainId we recognise. We re-set items on the form to the saved values. -- ChainToPage chainToPage = (ChainToPage) request.getSession().getAttribute(ChainToPage.SESSION_KEY); if (chainToPage != null chainToPage.getChainId().equals(Biff1LinkMaintAction.CHAIN_ID)) {
transformations
I've been looking at the transformation solutions listed on Ted Husted's page. Can anyone give me a quick rundown of the pros/cons of these two? Is there an Official Struts direction on this issue? The Struts Transformer by Ron Smith http://www.rpsenterprises.com/struts/index.html The Capco Mapper Framework by Francois Rey http://husted.com/struts/resources/mapper.htm thanks Lee
RE: multiple buttons on a form
This is how I did it, and it seems to work well: In my form I have the following: html:submit property=addAdd/html:submit html:submit property=saveSave/html:submit html:submit property=deleteDelete/html:submit In my action, I check for the existance of one of these properties and act accordingly. For example, String value = request.getParameter(add); if (value != null) { //do something... } -Original Message- From: Felipe F. Palma Dias [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 6:58 AM To: Struts Users Mailing List Subject: Re: multiple buttons on a form I suggest that you create a function Javascript called for the buttons, inside of the function you records one hidde-field before calling submit with a parameter passed for the function, for example, then you I can treat several submits. - Original Message - From: Kiet Nguyen [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 12:48 PM Subject: RE: multiple buttons on a form The image submit from strutsx seems to work for a submit with an image. However, I don't see a javascript property (onClick) so that a confirm pop-up can be implemented. thanks -Original Message- From: Phase Communcations [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 5:47 PM To: Struts Users Mailing List Subject: RE: multiple buttons on a form visit the strutsx.org and look at the image button patch. -Original Message- From: Lachlan Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 5:26 PM To: Struts Users Mailing List Subject: multiple buttons on a form Is there a way to have multiple submit buttons on a form and be able to tell which button was pressed in the following action? Regards, Lachlan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts/FOP
Cocoon and Struts are different. Since I wanted to avoid server side production load issues (of lots of XSLT) I emit XML from JSP to browses. And the browses then do the XSLT FOP-like for me. This way salability is flat, as more users use it, each user uses its own XSLT on client side. (For older browser, need JavaScript for XSLT, but new ones do XML just fine) (And I also use RTF instead of PDF, since RTF reader is already installed on all OSes, and Adobe PDF has to be installed and for other reasons I avoid Adobe . And I do not use all the FOP tags, just a few like table and row). Vic (promo: my book at basebeans.com talks about XSL in a chapter) [EMAIL PROTECTED] wrote: I would be interested in your approach. I used Cocoon to publish to a PDF file. Anyone with integration issues between the two frameworks? Thanks, Safa. I'm interested in this as well. I just finished a project writing a XSL/FO stylesheet to generate a report, and did the creation through command line via a junit test suite. If you get this figured out, let me know, I'd be happy to help publish a struts-fop example! Matt John M. Corro [EMAIL PROTECTED] wrote: Has anyone ever generated a PDF file (via FOP) from an Action servlet? Any implications in doing so via an Action servlet vs. a standard/plain servlet? I've reviewed the servlet example from the FOP distro. and it seems as if as long as I have access to the response object (which I do in the Action servlet) I should be fine. For those interested, the situation is that (from a servlet) I will be using Enhydra's Zeus to generate an in-memory XML doc, then using that XML doc and a pre-written XSL stylesheet I plan on using FOP to build a PDF doc and shoot it back to the user's browser. Not too out of the ordinary, but I'd like to inquire into any pitfalls. -- To unsubscribe, e-mail: For additional commands, e-mail: - Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts intermittently not working after startup
You can reload the _mappings_ by doing http://myserver:myport/myapp/admin/reload.do You can ask your servlet container to grab new classes... exact method depends on the container... I'm using Tomcat 4 and the steps were recently posted by someone else... I'll go grab the relevant part of the note... - - - - - - From: Chris Birch [mailto:[EMAIL PROTECTED]] As you're are using Tomcat4 you can reload a web apps context using the built-in Tomcat management web app. If your web-apps context is /myWebApp/ Simply enter http://localhost:8080/manager/reload?path=/myWebApp This should return a simple string that tells you your context has been reloaded and is usually much quicker than restarting. The manager app is protected, so you must have a user who can log in with a manager role. If you are using the simple memory realm authentication then update $TOMAT_HOME/conf/tomcat-users.xml and add: user name=jeff password=foo roles=manager / For more information on the manager app see: http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html After making code changes building/deploying with ant to test, I always use this method as I often have a couple of struts web-apps in my Tomcat server. Regards, Chris. - - - - - - += Jeff Knee -Original Message- From: Frank Lawlor [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 10:42 AM To: 'Struts Users Mailing List' Subject: RE: Struts intermittently not working after startup Error 500: No action instance for path /findEntity could be created ... I've gotten this type of thing when I'm changing any of the action classes during development. I assume struts might be doing its own class loading and I'm pulling the old class out from under it. If you are not modifying the classes, I don't know what might be the cause. By the way, is there any way to tell struts to re-initialize itself, including reloading the classes? Frank Lawlor Athens Group, Inc. (512) 345-0600 x151 Athens Group, an employee-owned consulting firm integrating technology strategy and software solutions. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSTL (standard taglib) Early Access 3
We should not do DB access in JSP (or anything much in JSP). Clear MVC is more productive. Vic Shawn Bayern wrote: Once again, I'm happy to announce a new Early Access release of the JSP Standard Tag Library (JSTL). Early Access Release 3 introduces tags for database access and incorporates some changes to the internationalization and XML-manipulation libraries. The reference implementation is available from Jakarta Taglibs as the 'standard' taglib. Intro page: http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html Documentation: http://jakarta.apache.org/taglibs/doc/standard-doc/index.html Binary dist: http://jakarta.apache.org/builds/jakarta-taglibs/releases/standard/ As before, an EA3 milestone snapshot as well as the usual nightly builds will be available. Community support has been great so far; we're eager to get more feedback as we come closer to a feature-complete release. Please send all comments to [EMAIL PROTECTED] Many thanks! Happy holidays! Shawn Bayern JSTL reference-implementation lead -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts 1.1 book available for order
Hi, Does anyone get the book: Struts Fast Track: J2EE / JSP Framework already? I tried to order this book from AtlasBooks over the phone; however, they told me this book is still printing and it will not be available until Jan. 4, 2001. Is it true? Sophia http://www.atlasbooks.com/marktplc/00670.htm You can order it today, and it will ship next week. It will be on Amazon, etc. in a few more weeks, it takes time. This is the fastest way I know to publish it. Vic -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Struts 1.1 book available for order
Cheng, Sophia wrote: Hi, Does anyone get the book: Struts Fast Track: J2EE / JSP Framework already? I tried to order this book from AtlasBooks over the phone; however, they told me this book is still printing and it will not be available until Jan. 4, 2001. Is it true? Sophia http://www.atlasbooks.com/marktplc/00670.htm You can order it today, and it will ship next week. It will be on Amazon, etc. in a few more weeks, it takes time. This is the fastest way I know to publish it. Vic -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Struts 1.1 book available for order
I got the same reply from Atlas. -Original Message- From: Cheng, Sophia [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 10:43 AM To: 'Struts Users Mailing List' (E-mail) Subject: RE: Struts 1.1 book available for order Hi, Does anyone get the book: Struts Fast Track: J2EE / JSP Framework already? I tried to order this book from AtlasBooks over the phone; however, they told me this book is still printing and it will not be available until Jan. 4, 2001. Is it true? Sophia http://www.atlasbooks.com/marktplc/00670.htm You can order it today, and it will ship next week. It will be on Amazon, etc. in a few more weeks, it takes time. This is the fastest way I know to publish it. Vic -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: multiple buttons on a form
This submits the form to one action class regardless of the action. I do not want to check for what type of action. If you set the action before submitting the form you can get the servlet to execute that action class. I also want to use the image for the submit. The problem occurs under Netscape 4.7 and the user set Never check for new version of page.. thanks -Original Message- From: Prengaman.Karen [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 9:05 AM To: 'Struts Users Mailing List' Subject: RE: multiple buttons on a form This is how I did it, and it seems to work well: In my form I have the following: html:submit property=addAdd/html:submit html:submit property=saveSave/html:submit html:submit property=deleteDelete/html:submit In my action, I check for the existance of one of these properties and act accordingly. For example, String value = request.getParameter(add); if (value != null) { //do something... } -Original Message- From: Felipe F. Palma Dias [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 6:58 AM To: Struts Users Mailing List Subject: Re: multiple buttons on a form I suggest that you create a function Javascript called for the buttons, inside of the function you records one hidde-field before calling submit with a parameter passed for the function, for example, then you I can treat several submits. - Original Message - From: Kiet Nguyen [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 12:48 PM Subject: RE: multiple buttons on a form The image submit from strutsx seems to work for a submit with an image. However, I don't see a javascript property (onClick) so that a confirm pop-up can be implemented. thanks -Original Message- From: Phase Communcations [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 5:47 PM To: Struts Users Mailing List Subject: RE: multiple buttons on a form visit the strutsx.org and look at the image button patch. -Original Message- From: Lachlan Holmes [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 12, 2001 5:26 PM To: Struts Users Mailing List Subject: multiple buttons on a form Is there a way to have multiple submit buttons on a form and be able to tell which button was pressed in the following action? Regards, Lachlan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
ActionForm and ActionMapping Access From JSP page
Hi, What's the *best* way in struts to access ActionForm instance (may be in request or session scope) from a JSP script (note, not using struts tags, e.g. for displaying a label that is using data from ActionFrom cache ) ? Similarly what's the best way for a JSP page to access ActionMapping instance ? Thanks in advance. Jerry
load() exception
Not sure if you managed to solve your problem but I was having a similar problem getting struts to work on Websphere v3.5.4 I ended up doing the foloowing to get it to work: in the .xml (struts_config and web) and .dtd files change the word PUBLIC to SYSTEM extract the .dtd files from the struts.jar to servlets/org/apache/struts/resources use the 1.0.1 version of jaxp.jar (and not v1.1). Webspehere 3.5.4 does not seem to work with jax v1.1 and if anyone knows of a patch for this or if v4 resolves this it would be much appreciated. use parser.jar in the struts_config.xml and web.xml files I needed to explicitly point to the relevant .dtd file (eg !DOCTYPE struts-config SYSTEM file:/{local machine}/servlets/org/apache/struts/resources/struts-config_1_0.dtd). This was not documented in the apache site's installation steps but I found a reference to it in one of the mail archives. Obviously I will be changing this to point to a relative path. Also, I did not patch the ActionServlet class as recommended in apache's installation steps as this caused a parsing error. Please let me know if this helps. Regards, Andrew -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
NewBie Q: How to output your array - LabelValueBean
Hello, I was trying to take Mr. Husted's subscription example and create an array to hold multiple instances: % java.util.ArrayList list = new java.util.ArrayList(); list.add(new com.hfa.register.LabelValueBean(address, address)); % Might sound like a simple question, but how can i output the multiple instances of address? array(1) array(2)? Thanks in Advance, Paul [EMAIL PROTECTED] __ Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctions for all of your unique holiday gifts! Buy at http://shopping.yahoo.com or bid at http://auctions.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: struts.net?
f@#* ASP.NET! Just say no! Could'nt resist. THAnks:) - Original Message - From: Peter Bismuti [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 14, 2001 4:26 AM Subject: struts.net? Has anyone ported or considered porting struts to asp.net? Before you respond with something like f@#* ASP.NET!, just consider that some have no choice in the matter. THAnks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: struts.net?
This would be a complete waste of time. Any Struts port to .NET would be used if and only if Microsoft added Struts application generation features to its .NET development tools. This will not happen. Even though Struts is open source, product management fundamentals are still applicable. - Alex Esterkin = -Original Message- From: Peter Bismuti [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 04:26 To: [EMAIL PROTECTED] Subject: struts.net? Has anyone ported or considered porting struts to asp.net? Before you respond with something like f@#* ASP.NET!, just consider that some have no choice in the matter. THAnks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
f@#* ASP.NET
Well said My only contribution to the struts user group. You have to have a sense of humor!
RE: struts.net?
Oh boy! Did I just hear someone yell fire in a movie theater full of firemen?!? Hopefully, the majority of the firemen will remain calm and we won't see Peter get crushed to death but firemen trying to (constructively or not) help Peter see the light. (Apache.org seems to me to be quite happy in the J2EE model.) += Jeff Knee -Original Message- From: Peter Bismuti [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 4:26 AM To: [EMAIL PROTECTED] Subject: struts.net? Has anyone ported or considered porting struts to asp.net? Before you respond with something like f@#* ASP.NET!, just consider that some have no choice in the matter. THAnks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: struts.net?
Lol, I love .NET. You really don't need Struts with ASP.NET, it already has the core functionality that Struts aims to provide as part of its native architecture. Obviously it's a different approach and people will argue ad infinitum whether or not it's better or worse; or, if Java rules and ASP drools, etc. etc. -Chris Christopher Assenza Email: [EMAIL PROTECTED] ACCESSDATA http://www.accessdc.com/ -Original Message- From: Knee, Jeff [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 4:53 PM To: 'Struts Users Mailing List' Subject: RE: struts.net? Oh boy! Did I just hear someone yell fire in a movie theater full of firemen?!? Hopefully, the majority of the firemen will remain calm and we won't see Peter get crushed to death but firemen trying to (constructively or not) help Peter see the light. (Apache.org seems to me to be quite happy in the J2EE model.) += Jeff Knee -Original Message- From: Peter Bismuti [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 4:26 AM To: [EMAIL PROTECTED] Subject: struts.net? Has anyone ported or considered porting struts to asp.net? Before you respond with something like f@#* ASP.NET!, just consider that some have no choice in the matter. THAnks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
What is the placeholder character for ActionError?
The doc for ActionError states: An encapsulation of an individual error message returned by the validate() method of an ActionForm, consisting of a message key (to be used to look up message text in an appropriate message resources database) plus up to four placeholder objects that can be used for parametric replacement in the message text. What is the placeholder character that will get replaced in the error message string? Thanks, Robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: how to deal with Variable form elements in struts
I am doing something similar. Our forms are 100% dynamic. The contents on them is not know in advance to write all the setters and getters. The form is generated based on the user and some database values. I am using logic:iterate to create the forms. If you iterate on a Map you can pass a key (name) and value (contents of text box). I am experimenting with passing a bean down to offer more flexibility. On the submit site, my .validate() method then manually parses the request object back into the Map. The Action class then manipulates the Map. HTH, Robert -Original Message- From: Shashi [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 7:48 To: [EMAIL PROTECTED] Subject: how to deal with Variable form elements in struts Hi, I have a form that looks very similar to the inbox in Yahoo or HotMail. The number of checkbox is varying and so are their names. How to assign their values to the Form Bean property? Currently I've been using a normal input html form tag like follows. input type=checkbox name=chk_%= I % and in the Action Class I'm using the request object to go through all the form elements using getParameterNames and finding out the checkboxes and getting the checked row. Can some one through light on how to go about doing the same using the Struts frame work. --Shashi. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: What is the placeholder character for ActionError?
{#} Where # is 1, 2, 3 or 4. For example: You encountered the {0} problem. += Jeff Knee -Original Message- From: SHURTLEFF,ROBERT (HP-FtCollins,ex1) [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 5:14 PM To: [EMAIL PROTECTED] Subject: What is the placeholder character for ActionError? The doc for ActionError states: An encapsulation of an individual error message returned by the validate() method of an ActionForm, consisting of a message key (to be used to look up message text in an appropriate message resources database) plus up to four placeholder objects that can be used for parametric replacement in the message text. What is the placeholder character that will get replaced in the error message string? Thanks, Robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: form initialization
Here's a javascript function that will clear all the values in a form: function clearForm(frmObj){ for(var i = 0; i frmObj.length; i++){ if(frmObj.elements[i].type.indexOf(text) == 0){ frmObj.elements[i].value=; } else if (frmObj.elements[i].type.indexOf(radio) == 0){ frmObj.elements[i].checked=false; } else if (frmObj.elements[i].type.indexOf(checkbox) == 0){ frmObj.elements[i].checked = false; } else if (frmObj.elements[i].type.indexOf(select) == 0){ for(var j = 0; j frmObj.elements[i].length ; j++){ frmObj.elements[i].options[j].selected=false; } } } } -Original Message- From: Colin Sharples [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 13, 2001 1:37 PM To: Struts Developers List Subject: Re: form initialization Apologies for following up a user-type question with another one, but in the interests of (brain) bandwith I don't read the user list. Please forgive me, I won't do it again :-) If this approach is used, populating the form bean before the form is displayed, then it means that hitting a Reset button will, rather than clearing the form, clear out any user modifications and re-fill the form with the values that the bean was populated with in the previous step. Now, I know that this is the expected, or even required behaviour from the point of view of HTML. However, when I had one site going through testing, the tester complained that a particular form was broken because the reset button kept on filling in the values instead of clearing them. In this particular case, it was clear that what was required was not a reset button, but a clear all the fields button. So, getting to the point (eventually), I know that it's possible to do this server-side, by having a button which will just cause the form bean to have all its properties set to null and redirect back to the input page. However, is there a way to do this client-side? Regards Colin M Sharples I/T Architect IBM Global Services New Zealand email: [EMAIL PROTECTED] phone: 64-4-5769853 mobile: 64-21-402085 fax: 64-4-5765616 Craig R. McClanahan To: Struts Developers List [EMAIL PROTECTED] craigmcc@apac cc: he.org Subject: Re: form initialization Sent by: [EMAIL PROTECTED] m.com 13/12/2001 19:30 Please respond to Struts Developers List On Wed, 12 Dec 2001, Jon Burford wrote: Date: Wed, 12 Dec 2001 20:40:34 -0800 From: Jon Burford [EMAIL PROTECTED] Reply-To: Struts Developers List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: form initialization Greetings! I have a dynamic form which needs to be initialized from the database. If I put code to initialize the attributes in the default constructor of the form bean, all this happens with no problems - the form is displayed with the proper values. My problem is that the form bean needs some of the request parameters from the calling jsp page in order to properly initialize its fields. What is the preferred way of form bean initialization and how can it access request parameters at initialization time? I used a couple hidden form fields which the jsp page initialized to the corresponding request parameters, but this does not take effect until AFTER the constructor is called. Any help would be much appreciated. This type of question is really more suited for the STRUTS-USER list. The design pattern I prefer is exemplified in the Struts Example application -- use an Action to set up the form bean *before* the form is displayed. In the example app, note how an Edit Subscription transaction is handled: * The /editSubscription action is called to pre-fill the SubscriptionForm bean and place it in request scope. If you need values from the request that triggered this, they are accessible to the Action and it can call setters as needed. * This action forwards to subscription.jsp which shows the pre-filled-out form. * The submit goes to the /saveSubscription action which updates the database (assuming successful validation). TIA! Jon Craig McClanahan -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: How to extract multiple columns of data in an logic:iterate tag ?
I have submitted a patch once for solving this, but it seems to not have made it in CVS. Here's the patch again (against current CVS) hth, tomK -Original Message- From: Uladzimir Kavalchuk [mailto:[EMAIL PROTECTED]] Sent: donderdag 13 december 2001 12:44 To: 'Struts Users Mailing List' Subject: RE: How to extract multiple columns of data in an logic:iterate tag ? I had to do the same thing. My bean model is Iterator. Everything WORKS. Use nested iterate tags on the same name, BUT! you must call previous() in nested iterate. logic:iterate id=dummy name=groupModel trjsp:setProperty name=groupModel property=back value=/ logic:iterate id=dummy2 name=groupModel length=2 td width=49% valign=top... jsp:getProperty name=groupModel property=procDescription/ /td... /logic:iterate /tr /logic:iterate Please notice: 1. Usage of length attribute in nested iterate; 2. Call to hack setProperty/back, which does something similar to previous(). I think this SHOULD be fixed by Struts writers: ...EVERYTHING IS APPROXIMATE: IterateTag.java... boolean dontNext; Tag tag = findAncestorWithClass( this, IterateTag.class); if( tag != null tag.getName().equals(getName()) ) { // we are in nested iterate on the same name dontNext = true; // parent tag also hasNext, otherwise how could we come here? } ... if( ! dontNext) // add this line ... next() -Original Message- From: SHURTLEFF,ROBERT (HP-FtCollins,ex1) [mailto:[EMAIL PROTECTED]] Sent: 13 ??? 2001 ?. 3:33 To: [EMAIL PROTECTED] Subject: How to extract multiple columns of data in an logic:iterate tag ? Assume that the ActionForm has the getter for the below myhashtable that returns a Map. Assume that the .value returns an Array of Strings (or whatever) I want to build a table with 4 columns in it with the logic:iterate . I copied the below code from the STRUTS Developers Guide: logic:iterate id=element name=myhashtable Next element is bean:write name=element property=value/ /logic:iterate Assume that a typical record is like: Map.key = myKey Map.value = [ myvalue, mydesc, myotherdata ] But, how do I get the 0th, 1st, 2nd, etc. columns data out of the .value? Does this work? logic:iterate id=element name=myhashtable Next element key is bean:write name=element property=key/ Next element value 0 is bean:write name=element property=value[0]/ Next element value 1 is bean:write name=element property=value[0]/ Next element value 2 is bean:write name=element property=value[0]/ /logic:iterate What if .value was a Class like public class myRecord{ .getValue() .getDesc() .getOtherData() } How would you call the getters to get the data? All help is appreciated. Robert -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:struts-user- [EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] BaseHandlerTag.java.diff Description: BaseHandlerTag.java.diff -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
howto set html:select value=[bean value]
I am trying to extract my ActionForm's .getApp() property into the 'value=' attribute. html:select size=1 property=app value=bean:write name=AttributesForm property=app/ html:options property=applications labelProperty=applicationLabels / /html:select But I get the below error. Can you not next bean:write commands inside of quotes? Any ideas. How are you supposed to do something like this. Thanks, Robert Error: 500 Location: /iseecore/app/appAttrs.jsp Internal Servlet Error: org.apache.jasper.compiler.ParseException: C:\Java\tomcat-3.2.3\webapps\iseecore\app\appAttrs.jsp(51,81) Attribute AttributesForm has no value at org.apache.jasper.compiler.JspReader.parseAttributeValue(JspReader.java:519) at org.apache.jasper.compiler.JspReader.parseTagAttributes(JspReader.java:635) at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:798) at org.apache.jasper.compiler.Parser.parse(Parser.java:1077) at org.apache.jasper.compiler.Parser.parse(Parser.java:1042) at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:833) at org.apache.jasper.compiler.Parser.parse(Parser.java:1077) at org.apache.jasper.compiler.Parser.parse(Parser.java:1042) at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:833) at org.apache.jasper.compiler.Parser.parse(Parser.java:1077) at org.apache.jasper.compiler.Parser.parse(Parser.java:1042) at org.apache.jasper.compiler.Parser$Tag.accept(Parser.java:833) at org.apache.jasper.compiler.Parser.parse(Parser.java:1077) at org.apache.jasper.compiler.Parser.parse(Parser.java:1042) at org.apache.jasper.compiler.Parser.parse(Parser.java:1038) at org.apache.jasper.compiler.Compiler.compile(Compiler.java:209) at org.apache.jasper.servlet.JspServlet.doLoadJSP(JspServlet.java:612) at org.apache.jasper.servlet.JasperLoader12.loadJSP(JasperLoader12.java:146) at org.apache.jasper.servlet.JspServlet.loadJSP(JspServlet.java:542) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(JspSe rvlet.java:258) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja va:268) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.facade.RequestDispatcherImpl.doForward(RequestDispatcherIm pl.java:222) at org.apache.tomcat.facade.RequestDispatcherImpl.forward(RequestDispatcherImpl .java:162) at org.apache.struts.action.ActionServlet.processActionForward(ActionServlet.ja va:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1595) at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:491) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:81 2) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC onnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
several ActionForm accessing one Action class
Hi, all. I have several ActionForm that needs to access one Action class. Is this possible? thanks, Cris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
preselected checkboxes
Hi, all. I have several checkboxes in several JSP pages. In each page, there are different sets of checkboxes that needs to be in checked status during page loads. The option I have in mind is to make a separate ActionForm and Action class for each page but I thought that maintenance wise this is not appropriate because I need to revise several classes when some procedure changes. The Action that needs to be done is the same accross all JSP pages, just that these pages has different sets of accounts that needs to be in checked status during page load. Any design technique to handle this? thanks, Cris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
WebLogic6.1 can't start correctly with STRUTS?
Hi all, When I start WebLogic6.1, I get these errors below. How to fix it? Please help me!!! register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'zip:D:/bea/w lserver6/./config/mydomain/applications/DefaultWebApp/WEB-INF/_tmp_war_myserver_ myserver_DefaultWebApp/WEB-INF/lib/1008298416638struts.jar#org/apache/struts/res ources/web-app_2_3.dtd' resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN', 'http:// java.sun.com/j2ee/dtds/web-app_2_2.dtd') Not registered, use system identifier 2001-12-14 上午10时53分40秒 Error HTTP [WebAppServletContext(7561029,Defa ultWebApp,/DefaultWebApp)] action: null java.net.UnknownHostException: java.sun.com Sincerely, Hong Xing -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: WebLogic6.1 can't start correctly with STRUTS?
Are you connected to the internet? Sometimes this will happen if you're not connected to the internet. I found the following answer in the archives: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10824.html Hong Xing [EMAIL PROTECTED] wrote: Hi all, When I start WebLogic6.1, I get these errors below. How to fix it? Please help me!!! register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'zip:D:/bea/w lserver6/./config/mydomain/applications/DefaultWebApp/WEB-INF/_tmp_war_myserver_ myserver_DefaultWebApp/WEB-INF/lib/1008298416638struts.jar#org/apache/struts/res ources/web-app_2_3.dtd' resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN', 'http:// java.sun.com/j2ee/dtds/web-app_2_2.dtd') Not registered, use system identifier 2001-12-14 上午10时53分40秒 [WebAppServletContext(7561029,Defa ultWebApp,/DefaultWebApp)] action: null java.net.UnknownHostException: java.sun.com Sincerely, Hong Xing -- To unsubscribe, e-mail: For additional commands, e-mail: - Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts!
Re: What is the placeholder character for ActionError?
What is the placeholder character that will get replaced in the error message string? The placeholder is {D}, where D is a digit between 1 and 5. In other words, you might have something like this in your ApplicationResources.properties: error.basic=An error occured, here is some info: {0} This allows you to add one extra bit of info to the error text. If you want to add two, do this: error.detailed=An error occured, here is some info: {0} br/Error code: {1} You would have something like this in your ActionClass: ActionErrors errors = new ActionErrors(); // to report the first error (error.basic) errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.basic, e.toString())); // to report the second error (error.detailed) errors.add(ActionErrors.GLOBAL_ERROR, new ActionError(error.basic, e.toString(), BitRot in ActionClass)); // Report any errors we have discovered back to the original form if (!errors.empty()) { saveErrors(request, errors); return(new ActionForward(mapping.getInput())); } Make sense? Tom -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Newbie question about caching data for forms
Hi all, I've been reading through a lot of the Struts info available on the web in various places, and I have a question I'm hoping one of you more experienced folks can answer. There is something simple that I think I'm still not getting. How, using the tag libraries of Struts, can I do the following: 1. If this is the first time that a user has visited the page, then the form isn't pre-populated with any values. The user just types in his/her desired form field values and hits submit. 2. If the webapp knows what the values should be, then the form is first pre-populated with data for the user to edit (e.g. if the user was on that page before but validation failed, so all the fields are pre-populated with the user's previously-submitted data). I think that somehow the html:form and/or bean:parameter tags are where I need to look. To make this more concrete, think of your standard login page. When the user first hits the app, they type in their username and password on some login.jsp page. If they screw up their password, they'll get sent back to the login.jsp page, but now to be nice we'll have the username field pre-populated. That was a simple example; extend it to complex forms where there is a lot of data to keep track of and multiple paths back to the form. In other words, what I'm looking for is the best (or at least typical) idiom for using the struts tag libraries and associated classes to capture the user data and bundle it not only for processing by its action but to also hand that bundle back to a JSP page if necessary. If somebody could show me a simple example of what the JSP page and appropriate fragments of some associated form and action class, I'd be muchly appreciative. I'd probably also begin to feel a little more clueful than I do at the moment... Thanks! Reid - Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts!
: WebLogic6.1 can't start correctly with STRUTS?
I just changed my web.xml. Then it worked OK. Old: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 1.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; Changed: !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; -ÓʼþÔ¼þ- ·¢¼þÈË: Matt Raible [mailto:[EMAIL PROTECTED]] ·¢ËÍʱ¼ä: 2001Äê12ÔÂ14ÈÕ 11:06 ÊÕ¼þÈË: Struts Users Mailing List Ö÷Ìâ: Re: WebLogic6.1 can't start correctly with STRUTS? Are you connected to the internet? Sometimes this will happen if you're not connected to the internet. I found the following answer in the archives: http://www.mail-archive.com/struts-user@jakarta.apache.org/msg10824.html Hong Xing [EMAIL PROTECTED] wrote: Hi all, When I start WebLogic6.1, I get these errors below. How to fix it? Please help me!!! register('-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN', 'zip:D:/bea/w lserver6/./config/mydomain/applications/DefaultWebApp/WEB-INF/_tmp_war_m yserver_ myserver_DefaultWebApp/WEB-INF/lib/1008298416638struts.jar#org/apache/st ruts/res ources/web-app_2_3.dtd' resolveEntity('-//Sun Microsystems, Inc.//DTD Web Application 1.2//EN', 'http:// java.sun.com/j2ee/dtds/web-app_2_2.dtd') Not registered, use system identifier 2001-12-14 ä¸å10æ?3å?0ç§? [WebAppServletContext(7561029,Defa ultWebApp,/DefaultWebApp)] action: null java.net.UnknownHostException: java.sun.com Sincerely, Hong Xing -- To unsubscribe, e-mail: For additional commands, e-mail: - Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Newbie question about caching data for forms
Hello Reid, Your question is of many folds. check for === for my sugestions below. Hope it helps you. --Shashi. - Original Message - From: Reid Pinchback [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 14, 2001 9:12 AM Subject: Newbie question about caching data for forms Hi all, I've been reading through a lot of the Struts info available on the web in various places, and I have a question I'm hoping one of you more experienced folks can answer. There is something simple that I think I'm still not getting. How, using the tag libraries of Struts, can I do the following: 1. If this is the first time that a user has visited the page, then the form isn't pre-populated with any values. The user just types in his/her desired form field values and hits submit. 2. If the webapp knows what the values should be, then the form is first pre-populated with data for the user to edit (e.g. if the user was on that page before but validation failed, so all the fields are pre-populated with the user's previously-submitted data). === For the above question: I have some thing very similar. I have a registration form which is generalized for both Registering a new user as well as Editing the profile of the existing user. I'm having a session variable that will be set to ADD when the user clicks on the Register link and is set to MOD when the user clicks on the Edit Profile link. The session variable will be set like follows: 1. In case of ADD invoke an Action Class to set the session variable and then forward to the registration form. 2. In case of MOD invoke another Action Class to get the data from the database set the FormBean and also the session variable. === You can set the value for the variables using the formbean in the JSP. It wouldn't create problems if the value is null. === The formbean has to have session scope. Specified in the struts-config.xml. I think that somehow the html:form and/or bean:parameter tags are where I need to look. To make this more concrete, think of your standard login page. When the user first hits the app, they type in their username and password on some login.jsp page. If they screw up their password, they'll get sent back to the login.jsp page, but now to be nice we'll have the username field pre-populated. That was a simple example; extend it to complex forms where there is a lot of data to keep track of and multiple paths back to the form. In other words, what I'm looking for is the best (or at least typical) idiom for using the struts tag libraries and associated classes to capture the user data and bundle it not only for processing by its action but to also hand that bundle back to a JSP page if necessary. If somebody could show me a simple example of what the JSP page and appropriate fragments of some associated form and action class, I'd be muchly appreciative. I'd probably also begin to feel a little more clueful than I do at the moment... Thanks! Reid - Do You Yahoo!? Check out Yahoo! Shopping and Yahoo! Auctionsfor all of your holiday gifts! -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: preselected checkboxes
You can have one FormBean having the scope set to session (in struts-config.xml), used accross all the JSP pages. In the JSP pages use the jsp:useBean tag to have the same FormBean in the session. In all the JSP send the action to a single action class. To distinguish between different pages in the Action Class have a session variable to identify the page number and set it in each page. Hope this helps. --Shashi. - Original Message - From: Crisalyn Ramos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Friday, December 14, 2001 8:09 AM Subject: preselected checkboxes Hi, all. I have several checkboxes in several JSP pages. In each page, there are different sets of checkboxes that needs to be in checked status during page loads. The option I have in mind is to make a separate ActionForm and Action class for each page but I thought that maintenance wise this is not appropriate because I need to revise several classes when some procedure changes. The Action that needs to be done is the same accross all JSP pages, just that these pages has different sets of accounts that needs to be in checked status during page load. Any design technique to handle this? thanks, Cris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
How to solve it???
Hello, This is a plain JSP - HTML code: -- % for(i=0; iobjUsers.size(); i++){ tmpuser=objUsers.getUser(i); % trtd input type=checkbox name=user value=%= tmpuser.getUserId()% %=tmpuser.getUserId()%td/tr % } % After running the above code and view the html source then i can see: trtd input type=checkbox name=user value=chiru chirutd/tr trtd input type=checkbox name=user value=deva devatd/tr trtd input type=checkbox name=user value=ravi ravitd/tr trtd input type=checkbox name=user value=selvam selvamtd/tr --- Now I want to convert the above code to struts. For that how to design my form class to map the values from HTML to Form class and action class? Because Its array of checkboxes. How to write set and get methods in the form class. Pls help me. Regards, Deva MphasiS BFL Ltd. 139/1, Aditya Complex Hosur Road, Koramangala Bangalore - 560 095 India Tel: (91)-80-552-2714 Extn. 2155 Architecting Value SEI Level 5 ISO 9001 If you are honest and frank, people may cheat you;Be honest and frank anyway -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Passing url parameters using command structure url
I am using commmand structure urls to hide my jsp views. I need to pass a query string to an action from the view. How do I accomplish this? I have tried http://www.mysite.com/do/next?page=2 but the url brings up an error. I have read Ted Husted's catalog and am not sure I see or understand how this is done. Anyways, I am sure someone knows the answer to this. Thanks, Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
JSTL (standard taglib) Early Access 3
Once again, I'm happy to announce a new Early Access release of the JSP Standard Tag Library (JSTL). Early Access Release 3 introduces tags for database access and incorporates some changes to the internationalization and XML-manipulation libraries. The reference implementation is available from Jakarta Taglibs as the 'standard' taglib. Intro page: http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html Documentation: http://jakarta.apache.org/taglibs/doc/standard-doc/index.html Binary dist: http://jakarta.apache.org/builds/jakarta-taglibs/releases/standard/ As before, an EA3 milestone snapshot as well as the usual nightly builds will be available. Community support has been great so far; we're eager to get more feedback as we come closer to a feature-complete release. Please send all comments to [EMAIL PROTECTED] Many thanks! Happy holidays! Shawn Bayern JSTL reference-implementation lead -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: JSTL (standard taglib) Early Access 3
On Thu, 13 Dec 2001, Paul DuBois wrote: I haven't seen this in the docs that I've read so far. Is this: - something I should just know - an oversight in the docs or the distribution - complete coincidence that installing js.jar fixed my pages :-) It's definitely not the latter. :-) I've clarified the docs (which will be included in the next nighly distribution) and, as a convenience, included 'js.jar' in the binary 'milestone' EA3 distribution (just updated). 'js.jar' is necessary for any uses of the ECMAScript expression language. Sorry for the lack of information, Shawn -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]