Re: Where should I store image files?
Hi antony, IF you put the image files in the directory structure that contains your webapp, you might hit a security situation where a clever user can directly access these directories with a normal http request to the file. It would not be very difficult to guess your image directory structure if it is in the same directory space. As already suggested you should keep these files in some location, keep a link to those file locations in the database and have a script like (download.jsp?fileID=someimageid) This script should return the the content-type as image/gif or image/jpeg as the case might be and return the image contents. There could be related security issues. Hope this helps. sarath PS: This is in the context of your comment saying that users can upload images and store them on your server. If the images are simple site images, you might as well put them in your web apps directory. - Original Message - From: [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 17, 2001 12:06 PM Subject: Re: Where should I store image files? Where is a good place to put this directory. Should I put it in the directory structure which contains my webapp, ie, using tomcat, /var/tomcat4/webapps/mywebapp/images would this be ok? Or is there somewhere else which is better? Cheers Tony Phase Communcations wrote: I would suggest a directory. Databases can handle the binary info. But, it is not good for performance. Both will work but I would place a file path/url in the database to reference the images and store them in a directory. Brandon Goodin Phase Web and Multimedia P (406) 862-2245 F (406) 862-0354 [EMAIL PROTECTED] http://www.phase.ws -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 16, 2001 9:24 PM To: Struts Users Mailing List Subject: Where should I store image files? Hi Folks I have a jsp/servlet web app and am not sure where I should keep the image files. The image files are constantly getting added to, ie people can upload new images and they should be stored somewhere, either in a database or in a directory somewhere. I am not sure which is the best way to go. Can someone please tell me where they think I should store the images. Cheers Tony -- 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]
Performance issue
Hi, I would like to know the impact in Performance context if There are so many fields in SingleBean which I'm using in an application Could someone throw some light on that... Regards Sai -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
StrutsTestCase for JUnit -- Question
Hi! I just found StrutsTestCase for JUnit and started using it for testing my web site. Just after I started to write my tests, I got into troubles and I couldn't find an answer to my question in the javadoc. I have a web site that first starts with a login page. Then, if the login is successful, I set an attribute in the session and the user gets the main menu page. On that main menu page, I check some values previously stored in my session to get the user some rights, depending on those values. I didn't have any troubles with the login test (well, I took the example) but I got into troubles when I was trying to get to my main menu page. I cannot obviously jump to my mainMenu.jsp without doing a login. When I do (with this MockStrutsTestCase) a login first, I don't know how I can move to the next page so that my mainMenu.jsp can use the session attribute previously stored by the loginAction. How can I go to my main Menu page (action /mainMenu in strut-config.xml) with all the required session attributes? Thanks in advance for taking some time to give me some help. Oliver. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
R: Hi I'm totally new, yes a total idiot on STRUTS ;-) but a free guy
Yes I can buy of course. But Who can tell me that tomorrow you at jcorporate make me pay 20.000 $ for Expresso. In that case I can' t move away to ensure my applications still works. I use Java hoping to be free from platforms and sqlservers and app servers etc. Why do I have to purchase Expresso? I have doubt also on Java and more on struts and a lot more on Expresso. I can code a simpler content manager all by myself in JSP. I can enjoy a lot. And be free ( maybe ). Sometimes reinventing the wheel is not so bad. --kako -Messaggio originale- Da: Sandra Cann [mailto:[EMAIL PROTECTED]] Inviato: venerdì 14 dicembre 2001 17.38 A: [EMAIL PROTECTED]; Struts Users Mailing List Oggetto: RE: Hi I'm totally new, yes a total idiot on STRUTS ;-) Samuele, snip The second is to put up a sort of content-manager with role-based authentication to permit to my customers to publish datas without HTML or similar knowledge... and maybe some reusable code and configuration written by some goog guy ? How about a jump start and be a hero? There is a content-manager that can do this called eContent built on Expresso/Struts with full Java source code available from www.jcorporate.com at an affordable price. Cheers Sandra Cann [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]
bean- performance
Hi, I would like to know the impact in Performance context if There are so many fields in SingleBean which I'm using in an application Could someone throw some light on that... Regards Sai -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
example for displaying tables?
Hi everyone, Is there an eaxmple out there for displaying table data? How do I use iterate? With the code below, it just prints Next element is Thanks for any help. Sunil Here's my jsp: Test.jsp: html body html:form table logic:iterate id=row name=TestForm property=grid Next element is bean:write name=row property=value/ /logic:iterate /table html:submit/ /html:form /body /html My Form: TestForm public class TestForm extends ActionForm { private Vector grid = new Vector(); public TestForm() { // Create the Grid for (int i = 0; i 3; i++) { //Create a row grid.add(new Row(key, Cell (1))); grid.add(new Row(key,Cell (2))); grid.add( new Row(key,Cell (3))); } } /** * Return the grid */ public Vector getGrid() { return grid; } } The Row class: public class Row { private String key = null; private String value = null; public String getKey() { return key; } public String getValue() { return value; } public Row(String key, String value) { key = key; value = value; } } The Action class: public class TestAction { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Validate the request parameters specified by the user ActionErrors errors = new ActionErrors(); return (mapping.findForward(success)); //success maps back to test.jsp } } _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: example for displaying tables?
Hello: Whatever is inside the iterate will be replicated on each iterate. Here's an example that might work for you...but it really depends on what you are looking for when the data is output. table cellpadding=0 cellspacing=0 border=1 width=95% align=center tr td This is my data/td /tr logic:iterate id=row name=TestForm property=grid tr tdbean:write name=row property=value//td /tr /logic:iterate /table You could also get more complex by using multiple interates to display header information and data. But again, it depends on what type of data you have and how you want it displayed. Hope this helps. Bob -Original Message- From: Sunil Mandya [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 16, 2000 11:52 PM To: Struts Users Mailing List Subject: example for displaying tables? Hi everyone, Is there an eaxmple out there for displaying table data? How do I use iterate? With the code below, it just prints Next element is Thanks for any help. Sunil Here's my jsp: Test.jsp: html body html:form table logic:iterate id=row name=TestForm property=grid Next element is bean:write name=row property=value/ /logic:iterate /table html:submit/ /html:form /body /html My Form: TestForm public class TestForm extends ActionForm { private Vector grid = new Vector(); public TestForm() { // Create the Grid for (int i = 0; i 3; i++) { //Create a row grid.add(new Row(key, Cell (1))); grid.add(new Row(key,Cell (2))); grid.add( new Row(key,Cell (3))); } } /** * Return the grid */ public Vector getGrid() { return grid; } } The Row class: public class Row { private String key = null; private String value = null; public String getKey() { return key; } public String getValue() { return value; } public Row(String key, String value) { key = key; value = value; } } The Action class: public class TestAction { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Validate the request parameters specified by the user ActionErrors errors = new ActionErrors(); return (mapping.findForward(success)); //success maps back to test.jsp } } _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.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]
objective html
Hi everyone, I'm working on an open source project called Objective html. Its a toolkit that aims at making html form development similar to the code you would write for something like Java-Swing. I've also got an example of how you can use Struts with Ohtml, I'm hoping some people on this mailing list might find this toolkit useful. Some advantages of Objective HTML are: - Form data is much easily handled and much more intuitive - No need to have 3 pieces of code like MVC (jsp, bean, controller), instead most of your code lies in one class - Much more Object-Orientated than typical MVC frameworks - Supports html and xhtml output types - Less knowledge of html required, most of the messy html code is abstracted in the Java objects - Fully open source I hope some people can try out this toolkit out and let me know if it is useful to them and what I can do to improve it. Check out the website at http://objectivehtml.sourceforge.net Cheers, Keith
Populate ActionForm with an XML DOM object
I have a back-end data source that provides me with an XML object. I'd like to populate an ActionForm based on that XML. Is there sample code like this somewhere? Most uses of the Digester I've seen deal with loading config files, or an initial load of an in-memory database. Would the Digester be apropriate for this job in a high-volume environment? Other approaches anyone? (Apart from using XSLT. Seems like if I choose that route I lose the benefits of the ActionForm/Validation/Token etc.) Lee
RE: Populate ActionForm with an XML DOM object
I have a back-end data source that provides me with an XML object. I'd like to populate an ActionForm based on that XML. Is there sample code like this somewhere? In my project we are using JAXB http://java.sun.com/xml/jaxb/ which is works perfect and is very convenient to use. - Sven Ehrke -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
form bean populated from wrong request
hello Did you see my last email ? About form bean populated from wrong request. so... Is it possible to remove parameters from request before forwarding ? Maris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Populate ActionForm with an XML DOM object
I have a back-end data source that provides me with an XML object. I'd like to populate an ActionForm based on that XML. Is there sample code like this somewhere? There may be more straightforward answers than this, but if all else fails, Expresso extends ActionForm and then also has built in functionality that automates XML dumps. So all the code should be there, though you might have to un-entangle other stuff like security, logging, etc. As always, full source code available. Hope this helps. Sometimes when I post here it almost feels creepy, like an Expresso advertisement, but really we are just a bunch of guys banging on a shared code base. Not Apache, but it's still open source, and most of it's components come from Apache anyway. Apologize if we come across as pushy. Every time new guys join us, it just means we get more functionality to share between each other. That's a big incentive, because lots of cool stuff has been added that way. -- 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: My implementation of Action chaining - Fixed
Hi Tuomo, I've had a quick look - seems good. I only do struts part time so I can't really keep up with you, which is a shame. I'll try to use your code - if you'd like to post it here or mail latest version(s). Someone is working on a workflow component for struts, which I think is the same job as this. See http://jakarta.apache.org/struts/proposal-workflow.html I guess this project won't be finished for ages - so is no use to us! I prefer just 1 returnStamp at a time - lighter load on server simpler to program - anything that sets up a return stamp deletes whatever is already there. Maybe you would need multiple returnStamps for when the user opens a second browser runs the same app. keep up the good work! Keith. --- Tuomo Syvänperä [EMAIL PROTECTED] wrote: Sorry.. I forgot one method from the ActionBase - class.. Attached is the new version. /tuomo Page A: - has the following app:returnStamp tag app:returnStamp to=pageA.do from=pageB.do / - if there is access to page B from some other page C we should also add the tag to page C otherwise there is the possibility that we would return to page A accidentally app:returnStamp to=pageC.do from=pageB.do / // // // ActionBase class. Handles all redirects required by ReturnStamp // class ActionBase extends Action { // // ... // public final ActionForward perform( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException { // NOTE: we first have to call the doPerform - method so that after // we get the stamp from the session and store it in the request, // it doesn't mess up this actions request processing ActionForward forward = doPerform( mapping, form, request, response ); // Check for possible return stamps HttpSession session = request.getSession(); ReturnStamps stamps = (ReturnStamps)session.getAttribute( Constants.RETURN_STAMPS_KEY ); ActionForward stampForward = null; if( stamps != null ) { ReturnStamp stamp = stamps.findStamp( request.getServletPath()); if( stamp != null ) { stampForward = new ActionForward( stamp.getTo()); // Remove this stamp from the session and store it in the request stamps.removeStamp( stamp ); session.setAttribute( Constants.RETURN_STAMPS_KEY, stamps ); request.setAttribute( Constants.RETURN_STAMP_KEY, stamp ); } } if( stampForward != null ) return stampForward; return forward; } // All implementing classes should call this method to retrieve // parameters or attributes from the request public Object getParabute( String parabuteName, HttpServletRequest request ) { Object obj = null; ReturnStamp stamp = (ReturnStamp)request.getAttribute( Constants.RETURN_STAMP_KEY ); if( stamp != null ) { if( (obj = stamp.getAttribute( parabuteName )) != null ) { stdOutLog( getParabute() called. , 2 ); stdOutLog( parabute fround in return stamp., 2, false ); return obj; } } if( (obj = request.getAttribute( parabuteName )) == null ) { obj = request.getParameter( parabuteName ); stdOutLog( getParabute() called. , 2 ); stdOutLog( parabute fround in request parameters., 2, false ); } else { stdOutLog( getParabute() called. , 2 ); stdOutLog( parabute fround in request attributes., 2, false ); } return obj; } } // // // ReturnStampTag implementation // import java.util.Enumeration; import javax.servlet.ServletRequest; import javax.servlet.http.HttpSession; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.TagSupport; import common.Constants; import common.ReturnStamp; import common.ReturnStamps; public final class ReturnStampTag extends TagSupport { protected String to = null; protected String from = null; public String getTo() { return to; } public void setTo( String to ) { this.to = to; } public String getFrom() { return from; } public void setFrom( String from ) { this.from = from; } public int doStartTag() throws JspException { return SKIP_BODY; } public int doEndTag() throws JspException { HttpSession session = pageContext.getSession(); if( session == null ) { return EVAL_PAGE; } ServletRequest request = pageContext.getRequest(); ReturnStamps stamps = (ReturnStamps)session.getAttribute( Constants.RETURN_STAMPS_KEY ); if( stamps == null ) { stamps = new ReturnStamps(); } ReturnStamp stamp = new ReturnStamp( getTo(), getFrom()); for(
Re: form bean populated from wrong request
In Struts a request is forwarded to another jsp - those parameters are part of the 'request'. In the case where the 1st jsp exams the request routes it to an appropriate action to handle it you might want struts to work as it does now. It's common to have code in your action class that detects whether it was started from it's form being posted or elsewhere. (lots of posts about how to test for this). If coming from elsewhere you just ignore whatever values are in the formbean. Does this help? Keith. --- Mâris Orbidâns [EMAIL PROTECTED] wrote: hello Did you see my last email ? About form bean populated from wrong request. so... Is it possible to remove parameters from request before forwarding ? Maris -- 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: form bean populated from wrong request
yes, this might help. But I haven't found any code example yet. Maris -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 3:32 PM To: Struts Users Mailing List Subject: Re: form bean populated from wrong request In Struts a request is forwarded to another jsp - those parameters are part of the 'request'. In the case where the 1st jsp exams the request routes it to an appropriate action to handle it you might want struts to work as it does now. It's common to have code in your action class that detects whether it was started from it's form being posted or elsewhere. (lots of posts about how to test for this). If coming from elsewhere you just ignore whatever values are in the formbean. Does this help? Keith. --- M?ris Orbid?ns [EMAIL PROTECTED] wrote: hello Did you see my last email ? About form bean populated from wrong request. so... Is it possible to remove parameters from request before forwarding ? Maris -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Dispatch Action Conundrum
I'm having trouble utilizing the DispatchAction correctly. I've a page of links which serve as section areas for my application. Each of them will need to call an action to setup the data forward to the correct jsp. From what I've read, it seems that the DispatchAction is perfectly suited for this task. The setup is below. The problem I'm running into is that when I try to utilize one of the links I get a 500 and an error is logged: Context log path= :action: Error creating Action instance for path '/enterpriseDispatch', class name 'wcom.gend.iasa.ipcom.action.EnterpriseDispatchAction' any ideas? Andrew _\|/___ generation-d development andrew b forman aim: ph0rman setup - I've set an entry in my struts-config. For now only the location action is set up: actionpath=/enterpriseDispatch type=wcom.gend.iasa.ipcom.action.EnterpriseDispatchAction scope=request parameter=area forward name=sipsetup path=/WEB-INF/jsp/sipsetup.jsp/ ... forward name=location path=/location/ ... forward name=gateway path=/WEB-INF/jsp/gateway/manage.jsp/ /action actionpath=/location type=wcom.gend.iasa.ipcom.action.LocationAction scope=request name=locationForm validate=false forward name=success path=/WEB-INF/jsp/locations/manage.jsp/ /action my action looks like: public class EntepriseDispatchAction extends DispatchAction { public EntepriseDispatchAction() { super(); } public ActionForward sipsetup( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { return ( mapping.findForward( sipsetup ) ); } ... public ActionForward location( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { return ( mapping.findForward( location ) ); } ... in my jsp I'm calling it as so: html:link href=/enterpriseDispatch.do?area=subscriber bean:message key=enterpriseconfig.link.subscriber/ /html:link -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
AW: Populate ActionForm with an XML DOM object
Hi, I have done reading XML file thing in JSP. this works with jaxp1.1.3 (if you dion't have this in your application server, just put in the lib directory of your application - tmcat 4 doesnot require this anyway). In the attachment you can find useful methods hope work fine. good luck. fehmi. -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Gesendet am: Monday, December 17, 2001 12:30 PM An: [EMAIL PROTECTED] Betreff: Populate ActionForm with an XML DOM object I have a back-end data source that provides me with an XML object. I'd like to populate an ActionForm based on that XML. Is there sample code like this somewhere? Most uses of the Digester I've seen deal with loading config files, or an initial load of an in-memory database. Would the Digester be apropriate for this job in a high-volume environment? Other approaches anyone? (Apart from using XSLT. Seems like if I choose that route I lose the benefits of the ActionForm/Validation/Token etc.) Lee intrnav.jsp Description: Binary data nav_config.xml Description: Binary data -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
This would be a question for Kyle Brown, however ...
... however I think that it could be interesting to other people I am interested into understanding more deeply the sentence below in your paper at http://www7.software.ibm.com/vad.nsf/Data/Document2557?OpenDocumentp=1BCT= 1 namely: Another potential mismatch is in trying to apply Struts to a portal style application. While you can use Struts in this style of application (especially considering its template support), you will find more appropriate support in other Apache projects, such as the Apache JetSpeed and Turbine portal servers. COuld you explain which are the difference between these three Apache projects with respect to portal-style applications? TIA, Marco Spadoni Italia On Line S.p.A. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
how to detect which form is being posted ?
It's common to have code in your action class that detects whether it was started from it's form being posted or elsewhere. (lots of posts about how to test for this). How to do it ? If coming from elsewhere you just ignore whatever values are in the formbean. Does this help? thanx a lot Maris -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[ANN] Mapper ActionForm-to-Value Object and back
Hi All, after reading a lot about problems related to mapping an ActionForm (somehow a set of String properties mapping the data on the Presentation layer) to more business-oriented objects (Value Objects for example), I've written a simple mapper that will allow you to: - keep 'em separated (don't mix 'em up, they have different responsibilities) - move the data from one to the other and back in a couple of lines of code. Here's the URL: http://www.mycgiserver.com/~andrej/technical/struts/struts.jsp Note: don't worry about the presentation, the site sucks.. I'll take care of it later :). Also, the connection isn't really fast... Here's an example: ExampleForm +getLastName:String +setLastName(String) +getDateOfBirth:String +setDateOfBirth(String) +getYearsOfJavaExperience:String +setYearsOfJavaExperience(String) +getEmailAddresses:String[] +setEmailAddresses(String[]) +getChild:ChildForm +setChild(ChildForm) ExampleVO +getLastName:String +setLastName(String) +getDateOfBirth:Date +setDateOfBirth(Date) +getYearsOfJavaExperience:Integer +setYearsOfJavaExperience(Integer) +getEmailAddresses:String[] +setEmailAddresses(String[]) +getChild:ChildVO +setChild(ChildVO) To perform the ActionForm-VO mapping, simply write: FormToVOPropertyMapper mapper = new FormToVOPropertyMapper(form, vo); mapper.map(); And you're done! The mapper will take care of matching the getters and the setters of the two objects, will loop on the array elements and will also use recursion to convert the nested ActionForm to the corresponding nested Value Objects! Please note that it's not based on external configuration files but only on method names (get/set matching). It is very useful when your ActionForm and your Value Objects are almost identical and the main difference is that the ActionForm can only deal with String while the Value Object should have more business data (Date, Integer, ...) - which is usually the case for the project I'm working on. I've found this simple package pretty useful. There still are some limitations but I wanted to make it available asap in case someone could find it helpful. The code is well commented and the site above should provide enough details to evaluate the utility. Any feedback (really, any!) is appreciated. Andrej
Checkbox's question.
Hi all, I am a newbie. I used html:checkbox in my work. But it worked strange. When I first view the page and submit the form, the checkbox is OK. Then if I view the page again and change the checkbox's state, the checkbox is not ok. It's always checked. How to fix it? html:checkbox property=openWindow value=on/ public void setOpenWindow(String openWindow) { this.openWindow=openWindow; } public String getOpenWindow() { return openWindow; } private String openWindow=on; Please help me!!! Sincerely, Hong Xing == Bioinformatics Department Beijing Genomics Institute Beijing Center Beijing Airport Industrial Zone B6 Beijing 101300 Tel: 0086-10-80494199-3306(Office) Email : [EMAIL PROTECTED] == -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: how to detect which form is being posted ?
Here it is - this is my way - a design pattern copied from non-strus programs. == in your jsp html:hidden property=formName value=Form-EditUser/ === in your action class EditUserForm thisForm = (EditUserForm) form; String formName = thisForm.getFormName(); if (formName == null || !formName.equals(Form-EditUser)) { // Came from forward from another form // Display default form. } else { // came from our form validate it. } = Keith. --- Mâris Orbidâns [EMAIL PROTECTED] wrote: It's common to have code in your action class that detects whether it was started from it's form being posted or elsewhere. (lots of posts about how to test for this). How to do it ? If coming from elsewhere you just ignore whatever values are in the formbean. Does this help? thanx a lot Maris -- 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: Struts/FOP
when you emit RTF, can the users edit this format (unlike PDF). is there an import into word and does it lose the formatting? sorry for my ignorance. Sandeep --- Vic Cekvenich [EMAIL PROTECTED] wrote: 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] __ 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]
html:errors handling
Hi, I have a strange behaviour in my application. in my logonaction, I do some check, when error occurs, I use errors.add(xxx, yyy) to set some errors. But when I use html:errors tag to display it, I get null My_Error null, so my error message is preceded by null text et followed by null text. I don't understand where it comes from. I display errors.size() and it returns my 1, so there is only one record in it. any idea ? Frederic -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:errors handling
did you set your error text in your application resource file ? -Original Message- From: Frédéric Houbie - ABSIS-GROUP [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:22 AM To: Struts-User Subject: html:errors handling Hi, I have a strange behaviour in my application. in my logonaction, I do some check, when error occurs, I use errors.add(xxx, yyy) to set some errors. But when I use html:errors tag to display it, I get null My_Error null, so my error message is preceded by null text et followed by null text. I don't understand where it comes from. I display errors.size() and it returns my 1, so there is only one record in it. any idea ? Frederic -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Files download
Thanks Daniel. Almost missed it. Will give it a try and let you know. Thinh -Original Message- From: Daniel WAMARA 2 [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 2:54 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: Re: Files download I know none but I made an application doing that, all you have to do is to set up the content type of the response. Here's the code I made for : public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { HttpSession session = request.getSession(); try { some codes here String username = getUser(request); some codes here String filetoget = request.getParameter(filetoget); response.setContentType(text/html); response.setHeader(Content-disposition, attachment; filename=+ filetoget); BufferedOutputStream bos = new BufferedOutputStream(response.getOutputStream()); FileInputStream fis = new FileInputStream(new File(filetoget)); byte[] buffer = new byte[1024]; int bytes_read; while((bytes_read = fis.read(buffer)) != -1) bos.write(buffer, 0, bytes_read); fis.close(); bos.close(); } catch(Exception me) { some codes here } return mapping.findForward(success); } -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Checkbox's question.
Hi, use the form's reset()-methode. why: - check out the links in the Struts resource area - search the mailing list archive regards Alexander Jesse -Original Message- From: Hong Xing [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 4:06 PM To: [EMAIL PROTECTED] Subject: Checkbox's question. Hi all, I am a newbie. I used html:checkbox in my work. But it worked strange. When I first view the page and submit the form, the checkbox is OK. Then if I view the page again and change the checkbox's state, the checkbox is not ok. It's always checked. How to fix it? html:checkbox property=openWindow value=on/ public void setOpenWindow(String openWindow) { this.openWindow=openWindow; } public String getOpenWindow() { return openWindow; } private String openWindow=on; Please help me!!! Sincerely, Hong Xing == Bioinformatics Department Beijing Genomics Institute Beijing Center Beijing Airport Industrial Zone B6 Beijing 101300 Tel: 0086-10-80494199-3306(Office) Email : [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: html:errors handling
Hi, have you defined the errors.header and .footer texts in the application resource file? hope this helps Alexander Jesse -Original Message- From: Frédéric Houbie - ABSIS-GROUP [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 5:22 PM To: Struts-User Subject: html:errors handling Hi, I have a strange behaviour in my application. in my logonaction, I do some check, when error occurs, I use errors.add(xxx, yyy) to set some errors. But when I use html:errors tag to display it, I get null My_Error null, so my error message is preceded by null text et followed by null text. I don't understand where it comes from. I display errors.size() and it returns my 1, so there is only one record in it. any idea ? Frederic -- 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]
Form Bean with a Mutliselect box
Ahhh! I have a struts form on a jsp page that uses a select box that allows multiple selections. I am wondering how to setup my form bean to handle this or if struts will even do it. I have tried using an Array getter and setter in the form bean, and an Array List, but I continue to get a argument type mismatch. Has anyone accomplished this, if so how? Brian Stiles -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: html:errors handling
Frédéric, I think you need these 2 lines in your ApplicationResources.properties file. (obviously the html can be different (maybe just nbsp;) errors.header=font color=red size=+1ul errors.footer=/ul/font Struts assumes you will always have them (it should default to a null string if you don't - I think it maybe does in later versions). Keith. --- Barry Jia [EMAIL PROTECTED] wrote: did you set your error text in your application resource file ? -Original Message- From: Frédéric Houbie - ABSIS-GROUP [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:22 AM To: Struts-User Subject: html:errors handling Hi, I have a strange behaviour in my application. in my logonaction, I do some check, when error occurs, I use errors.add(xxx, yyy) to set some errors. But when I use html:errors tag to display it, I get null My_Error null, so my error message is preceded by null text et followed by null text. I don't understand where it comes from. I display errors.size() and it returns my 1, so there is only one record in it. any idea ? Frederic -- 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: html:errors handling
Great helps, thanks -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: lundi 17 decembre 2001 17:44 To: Struts Users Mailing List Subject: RE: html:errors handling Fridiric, I think you need these 2 lines in your ApplicationResources.properties file. (obviously the html can be different (maybe just nbsp;) errors.header=font color=red size=+1ul errors.footer=/ul/font Struts assumes you will always have them (it should default to a null string if you don't - I think it maybe does in later versions). Keith. --- Barry Jia [EMAIL PROTECTED] wrote: did you set your error text in your application resource file ? -Original Message- From: Fridiric Houbie - ABSIS-GROUP [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:22 AM To: Struts-User Subject: html:errors handling Hi, I have a strange behaviour in my application. in my logonaction, I do some check, when error occurs, I use errors.add(xxx, yyy) to set some errors. But when I use html:errors tag to display it, I get null My_Error null, so my error message is preceded by null text et followed by null text. I don't understand where it comes from. I display errors.size() and it returns my 1, so there is only one record in it. any idea ? Frederic -- 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Good taglib to format number
Which taglib are you using to format number, date, using Locale config of Browser ? Thanks Frederic Houbie ABSIS GROUP -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Checkbox's question.
Hi! Use the reset method in the form bean: public void reset(ActionMapping mapping, HttpServletRequest request) { openWindow= false; } This is a well known problem, see link: http://www.jguru.com/faq/view.jsp?EID=471957 Good luck / Linnéa - Original Message - From: Hong Xing [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 4:05 PM Subject: Checkbox's question. Hi all, I am a newbie. I used html:checkbox in my work. But it worked strange. When I first view the page and submit the form, the checkbox is OK. Then if I view the page again and change the checkbox's state, the checkbox is not ok. It's always checked. How to fix it? html:checkbox property=openWindow value=on/ public void setOpenWindow(String openWindow) { this.openWindow=openWindow; } public String getOpenWindow() { return openWindow; } private String openWindow=on; Please help me!!! Sincerely, Hong Xing == Bioinformatics Department Beijing Genomics Institute Beijing Center Beijing Airport Industrial Zone B6 Beijing 101300 Tel: 0086-10-80494199-3306(Office) Email : [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: howto set html:select value=[bean value]
did u get an answer - in case you didn't. Does this line bean:write name=AttributesForm property=app/ put outside the select tag work? If so try using single quotes surrounding it. value='bean:write name=AttributesForm property=app/' The message seems to be saying there is no attribute name AttributesForm in the request. (maybe it should start with small 'a' not big 'A'). Keith. --- SHURTLEFF,ROBERT (HP-FtCollins,ex1) [EMAIL PROTECTED] wrote: 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] __ 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
RE: Form Bean with a Mutliselect box
I have done this by with getter/setter that uses an array of Strings as follows: public String[] getMergeeIds() { return mergeeIds; } public void setMergeeIds(String[] ids) { this.mergeeIds = ids; } Then in my form I use the multiple=true ... html:select property=mergeeIds size=10 multiple=true html:options name=activeCompanies property=companyIds labelName=activeCompanies labelProperty=companyNames/ /html:select -Original Message- From: Stiles, Brian [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:43 AM To: '[EMAIL PROTECTED]' Subject: Form Bean with a Mutliselect box Ahhh! I have a struts form on a jsp page that uses a select box that allows multiple selections. I am wondering how to setup my form bean to handle this or if struts will even do it. I have tried using an Array getter and setter in the form bean, and an Array List, but I continue to get a argument type mismatch. Has anyone accomplished this, if so how? Brian Stiles -- 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: example for displaying tables?
Thanks folks! Has anyone used the struts-layout library from Improve? Sunil -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 3:29 AM To: Struts Users Mailing List Subject: RE: example for displaying tables? Sorry if I'm off the mark here but I think, 1 - Change your iterate tag so name=myTestForm The iterate tag will the look for a bean named myTestForm. 2 - In your action class create that bean:- request.addAttribute(myTestForm, new TestForm()); keith. --- Cuperus, Bob [EMAIL PROTECTED] wrote: Hello: Whatever is inside the iterate will be replicated on each iterate. Here's an example that might work for you...but it really depends on what you are looking for when the data is output. table cellpadding=0 cellspacing=0 border=1 width=95% align=center tr td This is my data/td /tr logic:iterate id=row name=TestForm property=grid tr tdbean:write name=row property=value//td /tr /logic:iterate /table You could also get more complex by using multiple interates to display header information and data. But again, it depends on what type of data you have and how you want it displayed. Hope this helps. Bob -Original Message- From: Sunil Mandya [mailto:[EMAIL PROTECTED]] Sent: Saturday, December 16, 2000 11:52 PM To: Struts Users Mailing List Subject: example for displaying tables? Hi everyone, Is there an eaxmple out there for displaying table data? How do I use iterate? With the code below, it just prints Next element is Thanks for any help. Sunil Here's my jsp: Test.jsp: html body html:form table logic:iterate id=row name=TestForm property=grid Next element is bean:write name=row property=value/ /logic:iterate /table html:submit/ /html:form /body /html My Form: TestForm public class TestForm extends ActionForm { private Vector grid = new Vector(); public TestForm() { // Create the Grid for (int i = 0; i 3; i++) { //Create a row grid.add(new Row(key, Cell (1))); grid.add(new Row(key,Cell (2))); grid.add( new Row(key,Cell (3))); } } /** * Return the grid */ public Vector getGrid() { return grid; } } The Row class: public class Row { private String key = null; private String value = null; public String getKey() { return key; } public String getValue() { return value; } public Row(String key, String value) { key = key; value = value; } } The Action class: public class TestAction { public ActionForward perform(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { // Validate the request parameters specified by the user ActionErrors errors = new ActionErrors(); return (mapping.findForward(success)); //success maps back to test.jsp } } _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.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] __ 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: howto set html:select value=[bean value]
Yes, bean:write name=AttributesForm property=app/ Works just fine outside! Tested it that way before embedding inside of other tag. I will try the single-quote approach. Thanks! Robert -Original Message- From: Keith Bacon [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 9:59 To: Struts Users Mailing List Subject: Re: howto set html:select value=[bean value] did u get an answer - in case you didn't. Does this line bean:write name=AttributesForm property=app/ put outside the select tag work? If so try using single quotes surrounding it. value='bean:write name=AttributesForm property=app/' The message seems to be saying there is no attribute name AttributesForm in the request. (maybe it should start with small 'a' not big 'A'). Keith. --- SHURTLEFF,ROBERT (HP-FtCollins,ex1) [EMAIL PROTECTED] wrote: 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]
accessing EJB components from a Struts application?
Hi all, after browsing the FAQ and searching the mailing list archive, I have not yet found a 'premium way' to go for EJB business logic integration into a Struts application. It's pretty clear that the EJB stuff should go into the action classes. I also saw hints that it might be useful to add another layer between the action classes and the entity/session beans in order to keep the action classes small and independent from the underlying business logic tier architecture. So the recommended architecture would be action class - ejb 'helper' class - EJB Session/Entity Bean which allows for e.g. replacing the EJB tier by direct JDBC database access without having to modify the action classes. Is the presented view correct/recommendable, or have I probably missed some important developments concerning the Struts-EJB issue? Besides selected threads of this mailing list, are there any instructive resources/links regarding the topic? Regards, -- Thomas Corte [EMAIL PROTECTED] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Help with session problems
I am experiencing a problem with session expiration I believe. Basically, my struts application grabs job objects and places them into the session for viewing on the page. Everything works fine until I leave the computer alone overnight and come back in the morning. At this time, I'll hit submit to get the latest list of jobs. It returns this list in the session, but this time says ClassCastException. It cannot pull the jobs out of the session and cast them back to Job objects. I am not sure why an expiration in the session causes this type of problem. I even checked the session, and the job objects are in fact there. But for some reason, there is a ClassCastException only when something on the server is expired. Does struts require something I am not familiar with? Any help would be greatly appreciated. bean:define id=jobList name=categoryIterator property=value type=java.util.List/ logic:iterate id=jobsIterator indexId=jobsIndex name=jobList bean:define id=job name=jobsIterator type=com.tsg.bean.Job/ tr class=DarkGreyRow td width=60font class=JobTexta href=/listJob.dobean:write name=job property=jobId//a/td td width=50font class=JobTextbean:write name=job property=jobState//td td width=110 wrap=onfont class=JobTextbean:write name=job property=jobCompany//td td width=218 wrap=onfont class=JobTextbean:write name=job property=jobPosition//td td width=80 wrap=onfont class=JobTextbean:write name=job property=jobStartDate//td td width=100 wrap=onfont class=JobTextbean:write name=job property=jobSalary/ /td /tr /logic:iterate -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Image References in jsp
We have an action that is used from a couple of different mappings. Depending on a parameter it displays differently. When forwarded to the jsp the images fail under different mappings. i.e. if it is /reg/action1 then it fails, but if it is /action1 then it works. All the images are in the root directory inside a directory called images. We are referencing them via /images/image.gif Thanks, David Dandeneau
RE: Form Bean with a Mutliselect box - Followup Question
Thanks Bill- just a follow up to that- can you use MergeeIds to then pull a second hashtable/array(from a form) to list a set of values based on the ID Select Box? I guess I'm a bit confused on the syntax. Thanks again, Paul --- Siggelkow, Bill [EMAIL PROTECTED] wrote: I have done this by with getter/setter that uses an array of Strings as follows: public String[] getMergeeIds() { return mergeeIds; } public void setMergeeIds(String[] ids) { this.mergeeIds = ids; } Then in my form I use the multiple=true ... html:select property=mergeeIds size=10 multiple=true html:options name=activeCompanies property=companyIds labelName=activeCompanies labelProperty=companyNames/ /html:select -Original Message- From: Stiles, Brian [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:43 AM To: '[EMAIL PROTECTED]' Subject: Form Bean with a Mutliselect box Ahhh! I have a struts form on a jsp page that uses a select box that allows multiple selections. I am wondering how to setup my form bean to handle this or if struts will even do it. I have tried using an Array getter and setter in the form bean, and an Array List, but I continue to get a argument type mismatch. Has anyone accomplished this, if so how? Brian Stiles -- 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] __ 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]
internationalization numeric formats
Hi, does struts support different formats for numbers dependent upon the locale of the user? I've had a look in the bean write tag code which seems to indicate using keys such as org.apache.struts.taglib.bean.format.float. Should this be used in the Application.properties and Application_de.properties files e.g: org.apache.struts.taglib.bean.format.float=###,###,###,###,###.### Cheers Nathan ** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper at LevelSeas for the presence of computer viruses. ** -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Checkbox's question.
coincidentally, I was working on the check box today for the first time. I found the problem too. It seems OK when you set the check box unchecked as defaut (openWindow=null;). but when you set it checked as default, each time you uncheck the box and submit. the value won't change, it still remained checked. In fact. the setOpenWindow(..) function has never been called when the box was unchecked. It is only called when the check box is checked. Any one knows what went wrong? Thanks Yunming Li -Original Message- From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:51 AM To: Struts Users Mailing List Subject: Re: Checkbox's question. Hi! Use the reset method in the form bean: public void reset(ActionMapping mapping, HttpServletRequest request) { openWindow= false; } This is a well known problem, see link: http://www.jguru.com/faq/view.jsp?EID=471957 Good luck / Linnéa - Original Message - From: Hong Xing [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 4:05 PM Subject: Checkbox's question. Hi all, I am a newbie. I used html:checkbox in my work. But it worked strange. When I first view the page and submit the form, the checkbox is OK. Then if I view the page again and change the checkbox's state, the checkbox is not ok. It's always checked. How to fix it? html:checkbox property=openWindow value=on/ public void setOpenWindow(String openWindow) { this.openWindow=openWindow; } public String getOpenWindow() { return openWindow; } private String openWindow=on; Please help me!!! Sincerely, Hong Xing == Bioinformatics Department Beijing Genomics Institute Beijing Center Beijing Airport Industrial Zone B6 Beijing 101300 Tel: 0086-10-80494199-3306(Office) Email : [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: [ANN] Mapper ActionForm-to-Value Object and back
Sorry, it looks like the ZIP file is corrupted. I'll fix it tonight so that the code is available tomorrow. The documentation should cover most of the details required to understand the main principles of the package. Thanks. Andrej -Original Message- From: Sobkowski, Andrej [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 9:37 AM To: Jakarta Struts (Dev) (E-mail); Jakarta Struts (User) (E-mail) Subject: [ANN] Mapper ActionForm-to-Value Object and back Hi All, after reading a lot about problems related to mapping an ActionForm (somehow a set of String properties mapping the data on the Presentation layer) to more business-oriented objects (Value Objects for example), I've written a simple mapper that will allow you to: - keep 'em separated (don't mix 'em up, they have different responsibilities) - move the data from one to the other and back in a couple of lines of code. Here's the URL: http://www.mycgiserver.com/~andrej/technical/struts/struts.jsp Note: don't worry about the presentation, the site sucks.. I'll take care of it later :). Also, the connection isn't really fast... Here's an example: ExampleForm +getLastName:String +setLastName(String) +getDateOfBirth:String +setDateOfBirth(String) +getYearsOfJavaExperience:String +setYearsOfJavaExperience(String) +getEmailAddresses:String[] +setEmailAddresses(String[]) +getChild:ChildForm +setChild(ChildForm) ExampleVO +getLastName:String +setLastName(String) +getDateOfBirth:Date +setDateOfBirth(Date) +getYearsOfJavaExperience:Integer +setYearsOfJavaExperience(Integer) +getEmailAddresses:String[] +setEmailAddresses(String[]) +getChild:ChildVO +setChild(ChildVO) To perform the ActionForm-VO mapping, simply write: FormToVOPropertyMapper mapper = new FormToVOPropertyMapper(form, vo); mapper.map(); And you're done! The mapper will take care of matching the getters and the setters of the two objects, will loop on the array elements and will also use recursion to convert the nested ActionForm to the corresponding nested Value Objects! Please note that it's not based on external configuration files but only on method names (get/set matching). It is very useful when your ActionForm and your Value Objects are almost identical and the main difference is that the ActionForm can only deal with String while the Value Object should have more business data (Date, Integer, ...) - which is usually the case for the project I'm working on. I've found this simple package pretty useful. There still are some limitations but I wanted to make it available asap in case someone could find it helpful. The code is well commented and the site above should provide enough details to evaluate the utility. Any feedback (really, any!) is appreciated. Andrej
Re: Checkbox's question.
Hi!! All values from your formbean are sent in the request as parameters when you press submit - but checkbox values are only in this request if they have the value on = they are checked. If you use the reset method it should work in a correct way - values are first set to false by the reset method and then, if they are present i the request they receive value true, otherwise the have the value false. /Linnéa - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 7:07 PM Subject: RE: Checkbox's question. coincidentally, I was working on the check box today for the first time. I found the problem too. It seems OK when you set the check box unchecked as defaut (openWindow=null;). but when you set it checked as default, each time you uncheck the box and submit. the value won't change, it still remained checked. In fact. the setOpenWindow(..) function has never been called when the box was unchecked. It is only called when the check box is checked. Any one knows what went wrong? Thanks Yunming Li -Original Message- From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:51 AM To: Struts Users Mailing List Subject: Re: Checkbox's question. Hi! Use the reset method in the form bean: public void reset(ActionMapping mapping, HttpServletRequest request) { openWindow= false; } This is a well known problem, see link: http://www.jguru.com/faq/view.jsp?EID=471957 Good luck / Linnéa - Original Message - From: Hong Xing [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 4:05 PM Subject: Checkbox's question. Hi all, I am a newbie. I used html:checkbox in my work. But it worked strange. When I first view the page and submit the form, the checkbox is OK. Then if I view the page again and change the checkbox's state, the checkbox is not ok. It's always checked. How to fix it? html:checkbox property=openWindow value=on/ public void setOpenWindow(String openWindow) { this.openWindow=openWindow; } public String getOpenWindow() { return openWindow; } private String openWindow=on; Please help me!!! Sincerely, Hong Xing == Bioinformatics Department Beijing Genomics Institute Beijing Center Beijing Airport Industrial Zone B6 Beijing 101300 Tel: 0086-10-80494199-3306(Office) Email : [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: several ActionForm accessing one Action class
By design ActionForms won't know about Action classes. But rather the ActionForm reference will be passed to the Action in its perform method. So forms are used by actions. Actions are actually defined by you in the struts-config.xml and several may be implemented in the same Action class. Finally an ActionForm could contain several child beans. And those beans could be also be ActionForm subclasses. - Original Message - From: Crisalyn Ramos [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 6:22 PM Subject: 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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
RE: Checkbox's question.
I was just thinking about this problem, too. I think this checkbox-in-request-only-when-checked anomaly should be handled with javascript like this: The checkbox jsp tag should create a hidden field named after the property, and a checkbox with some other name. When the checkbox is checked or unchecked, it should change the value of the hidden field with a generated line of javascript. This way, the controller doesn't have to know that the field is rendered as a checkbox (and do this special checkbox jig), and the field's value is only changed when the field exists in the request. So if another jsp doesn't have the checkbox at all, the value isn't touched. Dan -Original Message- From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 10:29 AM To: Struts Users Mailing List Subject: Re: Checkbox's question. Hi!! All values from your formbean are sent in the request as parameters when you press submit - but checkbox values are only in this request if they have the value on = they are checked. If you use the reset method it should work in a correct way - values are first set to false by the reset method and then, if they are present i the request they receive value true, otherwise the have the value false. /Linnéa - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 7:07 PM Subject: RE: Checkbox's question. coincidentally, I was working on the check box today for the first time. I found the problem too. It seems OK when you set the check box unchecked as defaut (openWindow=null;). but when you set it checked as default, each time you uncheck the box and submit. the value won't change, it still remained checked. In fact. the setOpenWindow(..) function has never been called when the box was unchecked. It is only called when the check box is checked. Any one knows what went wrong? Thanks Yunming Li -Original Message- From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:51 AM To: Struts Users Mailing List Subject: Re: Checkbox's question. Hi! Use the reset method in the form bean: public void reset(ActionMapping mapping, HttpServletRequest request) { openWindow= false; } This is a well known problem, see link: http://www.jguru.com/faq/view.jsp?EID=471957 Good luck / Linnéa - Original Message - From: Hong Xing [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 4:05 PM Subject: Checkbox's question. Hi all, I am a newbie. I used html:checkbox in my work. But it worked strange. When I first view the page and submit the form, the checkbox is OK. Then if I view the page again and change the checkbox's state, the checkbox is not ok. It's always checked. How to fix it? html:checkbox property=openWindow value=on/ public void setOpenWindow(String openWindow) { this.openWindow=openWindow; } public String getOpenWindow() { return openWindow; } private String openWindow=on; Please help me!!! Sincerely, Hong Xing == Bioinformatics Department Beijing Genomics Institute Beijing Center Beijing Airport Industrial Zone B6 Beijing 101300 Tel: 0086-10-80494199-3306(Office) Email : [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]
RE: struts and jserv
Thanks, Nandkumar --- Phase Communcations [EMAIL PROTECTED] wrote: JSERV!!! kinda outdated don't ya think : ) -Original Message- From: nandkumar rayanker [mailto:[EMAIL PROTECTED]] Sent: Friday, December 14, 2001 7:27 PM To: [EMAIL PROTECTED] Subject: struts and jserv Hi , I am in the process of developing prototype web app and following is the environment: 1. APache web server 2. JServ I would like to develop application based on struts framework. I would like to know whether I can develop struts app and run under JSERV AND APACHE environment. thanks nandkumar nandkumar __ 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] __ 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 and jserv
Hi Mâris, Thanks, Nandkumar --- Mâris Orbidâns [EMAIL PROTECTED] wrote: I don't think so. JServ doesn't support JSP pages. Try Tomcat ! Maris --- I would like to know whether I can develop struts app and run under JSERV AND APACHE environment. thanks nandkumar nandkumar __ 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] __ 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: Form Bean with a Mutliselect box - Followup Question
If you want to do something on the same form with the selected IDs without hitting the Submit button then you can use the IDs with some javascript ... However, if you are talking about processing the form after Submit, you can do anything with the values. For example, in my case, I have a wizard-style interface where in the first screen the user picks multiple IDs, then in the second screen, details about each of the selected IDs is displayed in a table. To set up the second screen, I took each ID and used those IDs to access detail data out of a directory server (of course, this data could come thru JDBC, EJB, anywhere). -Original Message- From: Paul [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 12:48 PM To: Struts Users Mailing List Subject: RE: Form Bean with a Mutliselect box - Followup Question Thanks Bill- just a follow up to that- can you use MergeeIds to then pull a second hashtable/array(from a form) to list a set of values based on the ID Select Box? I guess I'm a bit confused on the syntax. Thanks again, Paul --- Siggelkow, Bill [EMAIL PROTECTED] wrote: I have done this by with getter/setter that uses an array of Strings as follows: public String[] getMergeeIds() { return mergeeIds; } public void setMergeeIds(String[] ids) { this.mergeeIds = ids; } Then in my form I use the multiple=true ... html:select property=mergeeIds size=10 multiple=true html:options name=activeCompanies property=companyIds labelName=activeCompanies labelProperty=companyNames/ /html:select -Original Message- From: Stiles, Brian [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:43 AM To: '[EMAIL PROTECTED]' Subject: Form Bean with a Mutliselect box Ahhh! I have a struts form on a jsp page that uses a select box that allows multiple selections. I am wondering how to setup my form bean to handle this or if struts will even do it. I have tried using an Array getter and setter in the form bean, and an Array List, but I continue to get a argument type mismatch. Has anyone accomplished this, if so how? Brian Stiles -- 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] __ 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: Checkbox's question.
So it is the way supposed to be or just a bug of struts? -Original Message- From: Dan Cancro [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 1:41 PM To: 'Struts Users Mailing List' Subject: RE: Checkbox's question. I was just thinking about this problem, too. I think this checkbox-in-request-only-when-checked anomaly should be handled with javascript like this: The checkbox jsp tag should create a hidden field named after the property, and a checkbox with some other name. When the checkbox is checked or unchecked, it should change the value of the hidden field with a generated line of javascript. This way, the controller doesn't have to know that the field is rendered as a checkbox (and do this special checkbox jig), and the field's value is only changed when the field exists in the request. So if another jsp doesn't have the checkbox at all, the value isn't touched. Dan -Original Message- From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 10:29 AM To: Struts Users Mailing List Subject: Re: Checkbox's question. Hi!! All values from your formbean are sent in the request as parameters when you press submit - but checkbox values are only in this request if they have the value on = they are checked. If you use the reset method it should work in a correct way - values are first set to false by the reset method and then, if they are present i the request they receive value true, otherwise the have the value false. /Linnéa - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 7:07 PM Subject: RE: Checkbox's question. coincidentally, I was working on the check box today for the first time. I found the problem too. It seems OK when you set the check box unchecked as defaut (openWindow=null;). but when you set it checked as default, each time you uncheck the box and submit. the value won't change, it still remained checked. In fact. the setOpenWindow(..) function has never been called when the box was unchecked. It is only called when the check box is checked. Any one knows what went wrong? Thanks Yunming Li -Original Message- From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:51 AM To: Struts Users Mailing List Subject: Re: Checkbox's question. Hi! Use the reset method in the form bean: public void reset(ActionMapping mapping, HttpServletRequest request) { openWindow= false; } This is a well known problem, see link: http://www.jguru.com/faq/view.jsp?EID=471957 Good luck / Linnéa - Original Message - From: Hong Xing [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 4:05 PM Subject: Checkbox's question. Hi all, I am a newbie. I used html:checkbox in my work. But it worked strange. When I first view the page and submit the form, the checkbox is OK. Then if I view the page again and change the checkbox's state, the checkbox is not ok. It's always checked. How to fix it? html:checkbox property=openWindow value=on/ public void setOpenWindow(String openWindow) { this.openWindow=openWindow; } public String getOpenWindow() { return openWindow; } private String openWindow=on; Please help me!!! Sincerely, Hong Xing == Bioinformatics Department Beijing Genomics Institute Beijing Center Beijing Airport Industrial Zone B6 Beijing 101300 Tel: 0086-10-80494199-3306(Office) Email : [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]
Re: This would be a question for Kyle Brown, however ...
Subject: Re: This would be a question for Kyle Brown, however ... From: Vic Cekvenich [EMAIL PROTECTED] === I disagree with the statement. I want to use as little technology as possible to leverage it to be productive. I too looked at integrating other, but it turns out YOU DO NOT NEED anything else but Struts. For Portal, use tiles with RSS for Content Syndication and XSLT. Much better and practical then anything else I have seen. (I create a table in PostgreSQL that matches RSS plus some fields that rank what to display). Vic Marco Spadoni wrote: ... however I think that it could be interesting to other people I am interested into understanding more deeply the sentence below in your paper at http://www7.software.ibm.com/vad.nsf/Data/Document2557?OpenDocumentp=1BCT= 1 namely: Another potential mismatch is in trying to apply Struts to a portal style application. While you can use Struts in this style of application (especially considering its template support), you will find more appropriate support in other Apache projects, such as the Apache JetSpeed and Turbine portal servers. COuld you explain which are the difference between these three Apache projects with respect to portal-style applications? TIA, Marco Spadoni Italia On Line S.p.A. -- 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: Checkbox's question.
This was just an idea for an improvement to the CheckboxTag tag that would help cope with some HTML wierdness. What do the rest of you think? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:28 AM To: [EMAIL PROTECTED] Subject: RE: Checkbox's question. So it is the way supposed to be or just a bug of struts? -Original Message- From: Dan Cancro [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 1:41 PM To: 'Struts Users Mailing List' Subject: RE: Checkbox's question. I was just thinking about this problem, too. I think this checkbox-in-request-only-when-checked anomaly should be handled with javascript like this: The checkbox jsp tag should create a hidden field named after the property, and a checkbox with some other name. When the checkbox is checked or unchecked, it should change the value of the hidden field with a generated line of javascript. This way, the controller doesn't have to know that the field is rendered as a checkbox (and do this special checkbox jig), and the field's value is only changed when the field exists in the request. So if another jsp doesn't have the checkbox at all, the value isn't touched. Dan -Original Message- From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 10:29 AM To: Struts Users Mailing List Subject: Re: Checkbox's question. Hi!! All values from your formbean are sent in the request as parameters when you press submit - but checkbox values are only in this request if they have the value on = they are checked. If you use the reset method it should work in a correct way - values are first set to false by the reset method and then, if they are present i the request they receive value true, otherwise the have the value false. /Linnéa - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 7:07 PM Subject: RE: Checkbox's question. coincidentally, I was working on the check box today for the first time. I found the problem too. It seems OK when you set the check box unchecked as defaut (openWindow=null;). but when you set it checked as default, each time you uncheck the box and submit. the value won't change, it still remained checked. In fact. the setOpenWindow(..) function has never been called when the box was unchecked. It is only called when the check box is checked. Any one knows what went wrong? Thanks Yunming Li -Original Message- From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:51 AM To: Struts Users Mailing List Subject: Re: Checkbox's question. Hi! Use the reset method in the form bean: public void reset(ActionMapping mapping, HttpServletRequest request) { openWindow= false; } This is a well known problem, see link: http://www.jguru.com/faq/view.jsp?EID=471957 Good luck / Linnéa - Original Message - From: Hong Xing [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 4:05 PM Subject: Checkbox's question. Hi all, I am a newbie. I used html:checkbox in my work. But it worked strange. When I first view the page and submit the form, the checkbox is OK. Then if I view the page again and change the checkbox's state, the checkbox is not ok. It's always checked. How to fix it? html:checkbox property=openWindow value=on/ public void setOpenWindow(String openWindow) { this.openWindow=openWindow; } public String getOpenWindow() { return openWindow; } private String openWindow=on; Please help me!!! Sincerely, Hong Xing == Bioinformatics Department Beijing Genomics Institute Beijing Center Beijing Airport Industrial Zone B6 Beijing 101300 Tel: 0086-10-80494199-3306(Office) Email : [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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Checkbox's question.
Hi!! I think it's a bug... Javascript is funny but it slows down the prestanda a lot /Linnéa - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 8:27 PM Subject: RE: Checkbox's question. So it is the way supposed to be or just a bug of struts? -Original Message- From: Dan Cancro [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 1:41 PM To: 'Struts Users Mailing List' Subject: RE: Checkbox's question. I was just thinking about this problem, too. I think this checkbox-in-request-only-when-checked anomaly should be handled with javascript like this: The checkbox jsp tag should create a hidden field named after the property, and a checkbox with some other name. When the checkbox is checked or unchecked, it should change the value of the hidden field with a generated line of javascript. This way, the controller doesn't have to know that the field is rendered as a checkbox (and do this special checkbox jig), and the field's value is only changed when the field exists in the request. So if another jsp doesn't have the checkbox at all, the value isn't touched. Dan -Original Message- From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 10:29 AM To: Struts Users Mailing List Subject: Re: Checkbox's question. Hi!! All values from your formbean are sent in the request as parameters when you press submit - but checkbox values are only in this request if they have the value on = they are checked. If you use the reset method it should work in a correct way - values are first set to false by the reset method and then, if they are present i the request they receive value true, otherwise the have the value false. /Linnéa - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 7:07 PM Subject: RE: Checkbox's question. coincidentally, I was working on the check box today for the first time. I found the problem too. It seems OK when you set the check box unchecked as defaut (openWindow=null;). but when you set it checked as default, each time you uncheck the box and submit. the value won't change, it still remained checked. In fact. the setOpenWindow(..) function has never been called when the box was unchecked. It is only called when the check box is checked. Any one knows what went wrong? Thanks Yunming Li -Original Message- From: Linnea Ahlbeck [mailto:[EMAIL PROTECTED]] Sent: Monday, December 17, 2001 11:51 AM To: Struts Users Mailing List Subject: Re: Checkbox's question. Hi! Use the reset method in the form bean: public void reset(ActionMapping mapping, HttpServletRequest request) { openWindow= false; } This is a well known problem, see link: http://www.jguru.com/faq/view.jsp?EID=471957 Good luck / Linnéa - Original Message - From: Hong Xing [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, December 17, 2001 4:05 PM Subject: Checkbox's question. Hi all, I am a newbie. I used html:checkbox in my work. But it worked strange. When I first view the page and submit the form, the checkbox is OK. Then if I view the page again and change the checkbox's state, the checkbox is not ok. It's always checked. How to fix it? html:checkbox property=openWindow value=on/ public void setOpenWindow(String openWindow) { this.openWindow=openWindow; } public String getOpenWindow() { return openWindow; } private String openWindow=on; Please help me!!! Sincerely, Hong Xing == Bioinformatics Department Beijing Genomics Institute Beijing Center Beijing Airport Industrial Zone B6 Beijing 101300 Tel: 0086-10-80494199-3306(Office) Email : [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] -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: using MySQL as a datasource
Try these things first: Verify that you have the latest stable version of mysql - 3.23.46 I think. Get the latest driver - 2.0.8 I ran into an issue with a third-party connection pool that passed transaction-level parameters to a pre-3.23.36 mysql server, causing *pages* of StackOverflows. Finally, may I suggest looking into Poolman as an alternative to the struts connection pooling. Marcus Blackhall wrote: Hi All, I am attempting to use MySQL as a datasouce for struts to make use of the Connection Pool. I have in my struts-config.xml file the floowing for the datasource data-sources data-source set-property property=autoCommit value=false/ set-property property=description value=Example Data Source Configuration/ set-property property=driverClass value=org.gjt.mm.mysql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=some_pass/ set-property property=url value=jdbc:mysql://localhost:3306/myjsp/ set-property property=user value=monty/ /data-source /data-sources I have placed the Jars jdbc2_0-stdext.jar, struts.jar and the reuired MySQL driver jar (mysql_comp.jar) in the WEB-INF/lib directory for my application. Within the web.xml file for my application the servlet action is defined as follows : servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueorg.apache.struts.webapp.example.ApplicationResources/param-value /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping The problem is that whenever I have the datasource my application will not run because the action servlet fails on initialisation with the following error : cannot load servlet name: action: Exception initializing application data source org.apache.struts.action.DATA_SOURCE Has anybody got any ideas on this. I have tested within my IDE that the database can be connected with the above url and user/password connections. Do I need any more configurations in web.xml or struts-config.xml ? any answers would be much appreciated, thanks in advance Marcus -- Peter Kordel Software Engineer Zvolve Systems, Inc. 770-551-4528 http://www.zvolve.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
struts integration to turbine (semi-working)
I am using turbine, and using the struts html tags. Yes, it is working! I have it working manually, if I create an instance of my object and set all the properties of it manually and push my object onto the request, I can use the struts html objects. Simple example: % Survey survey = new Survey(); survey.setSurveyName(survey name); request.setAttribute(survey,survey); % html:text name=survey property=surveyName size=44 maxlength=44/ One of the things that struts does is to read values from the request object and creates a new object with the appropriate values. It automatically reads the request object and creates objects. What class or object is doing this in struts? I would like to use this to create my objects. I really like the taglibs of struts. I hate having to loop through radio groups, combo boxes, etc to select my value. Thanks, Phillip _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
[ANNOUNCE] Struts Console v1.2
Struts Console version 1.2 is now available. http://www.jamesholmes.com/struts/ http://www.jamesholmes.com/struts/struts-console-1.2.zip This is mostly a bug fix release with a couple of new features. Most notably is the addition of support for opening multiple files at once in the standalone version. Changes with Struts Console v1.2 *) Added support for opening multiple files at once in standalone version. *) Added ability to switch look and feel of the standalone version of the application. *) Added ability to turn off config file DTD validation. This allows the app to work with config files that have a modified structure (DTD). This feature should only be used when absolutely necessary and may break standard Struts Console functionality. *) Fixed bug in JBuilder plugin where changes to a file in the Source view would cause the Struts Console view to forget where it was. *) Fixed bug in JBuilder plugin where exceptions would be generated if an invalid config file was used. Now an informational error message is displayed with a button to go to the line in question in the source view. *) Fixed bug where JBuilder plugin did not support read only files. *) Fixed bug in NetBeans/Forte module where the Save button was enabled all the time regardless of whether a file's contents had been changed. Thanks, -james [EMAIL PROTECTED] http://www.jamesholmes.com/struts/ __ 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/FOP
Subject: Re: Struts/FOP From: Vic Cekvenich [EMAIL PROTECTED] === INLINE Sandeep Takhar wrote: when you emit RTF, can the users edit this format (unlike PDF). YES, USER COULD EDIT IT I SUPPOSE. is there an import into word and does it lose the formatting? FORMATTING IS PERFECT, SINCE YOU GENERATED IT MANUALLY. WORD IS NOT REQUIRED. ANY OS HAS A RTF (GOV. SPEC) READER. sorry for my ignorance. ONLY PEOPLE WHO KNOW, HOW MUCH IS THERE TO KNOW, ARE HUMBLE. I THINK MYSELF IGNORANT. USE ANY INFO AT YOUR OWN PERIL. Sandeep --- Vic Cekvenich [EMAIL PROTECTED] wrote: 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] __ 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: using MySQL as a datasource
Thanks for the reply, it turned out that the property auto-commit must be set to true and not false. I changed the line set-property property=autoCommit value=false/ to set-property property=autoCommit value=true/ and all went well, Marcus - Original Message - From: Peter Kordel [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Monday, December 17, 2001 9:17 PM Subject: Re: using MySQL as a datasource Try these things first: Verify that you have the latest stable version of mysql - 3.23.46 I think. Get the latest driver - 2.0.8 I ran into an issue with a third-party connection pool that passed transaction-level parameters to a pre-3.23.36 mysql server, causing *pages* of StackOverflows. Finally, may I suggest looking into Poolman as an alternative to the struts connection pooling. Marcus Blackhall wrote: Hi All, I am attempting to use MySQL as a datasouce for struts to make use of the Connection Pool. I have in my struts-config.xml file the floowing for the datasource data-sources data-source set-property property=autoCommit value=false/ set-property property=description value=Example Data Source Configuration/ set-property property=driverClass value=org.gjt.mm.mysql.Driver/ set-property property=maxCount value=4/ set-property property=minCount value=2/ set-property property=password value=some_pass/ set-property property=url value=jdbc:mysql://localhost:3306/myjsp/ set-property property=user value=monty/ /data-source /data-sources I have placed the Jars jdbc2_0-stdext.jar, struts.jar and the reuired MySQL driver jar (mysql_comp.jar) in the WEB-INF/lib directory for my application. Within the web.xml file for my application the servlet action is defined as follows : servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class init-param param-nameapplication/param-name param-valueorg.apache.struts.webapp.example.ApplicationResources/param-va lue /init-param init-param param-nameconfig/param-name param-value/WEB-INF/struts-config.xml/param-value /init-param init-param param-namedebug/param-name param-value2/param-value /init-param init-param param-namedetail/param-name param-value2/param-value /init-param init-param param-namevalidate/param-name param-valuetrue/param-value /init-param load-on-startup2/load-on-startup /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping The problem is that whenever I have the datasource my application will not run because the action servlet fails on initialisation with the following error : cannot load servlet name: action: Exception initializing application data source org.apache.struts.action.DATA_SOURCE Has anybody got any ideas on this. I have tested within my IDE that the database can be connected with the above url and user/password connections. Do I need any more configurations in web.xml or struts-config.xml ? any answers would be much appreciated, thanks in advance Marcus -- Peter Kordel Software Engineer Zvolve Systems, Inc. 770-551-4528 http://www.zvolve.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]
Two Struts Research Questions...
I have asked several questions in preparation for a Struts demo this week, so here is another two. Question one: Our current app uses non visual' JSP files to act as our actions. As with struts actions, we only access the pages through these files. Each page will have a 'load' and upon submit will pass through a 'save' and then onto the actual desired action. This structure has proven difficult to work with and maintain but has kept the control logic away from the HTML(thus my desire for struts). Most of these files do not do too much other call an EJB to load or save.I will be making the case that because these files are servlets and that Struts keeps the Action Class instances cached, the required resources be less with struts. Can anyone provide me with a Resource/Performance contrast between a struts action class and a servlet (doing the same work). It seems logical that forwarding between several servlets will be slower that chaining action classes, but I would like something to tell the group. Question Two: One of my main selling points is internationalization. So there will be alot of tags in the pages. I have seen what seems to be differing opinions in the archive regarding the tags. I understand that the tag classes themselves may be cached (by the container) as well to improve performance. I also understand that a page built with a bunch of tags as opposed to a static text page will load a bit slower. I have seen posts of people claiming that they have taken a huge hit from alot of message tags. So my question is..Should I be concerned about the number of tags in my I18N app? We are using WLS 5.1 and probably end with 6.x in the new year( if this means anything). Thanks everyone. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Struts/Tomcat 4.0 Sealing Violation
Hi, I am trying to run the sample applications that com with Struts. I have tried using the binary distributions and have used Ant with the source distributons. I keep getting a java.lang.SecurityException: sealing violation when I try to enter any example application. I am also unable to compile any JSP file in the application directory. I have one copy of the struts.jar in: d:\jakarta-tomcat-4.0-b7\webapps\struts-example\WEB-INF\lib I have two copies of the jaxp.jar in: d:\JDK\jre\lib\ext d:\jakarta-tomcat-4.0-b7\jasper These jar files are not in my CLASSPATH. Any help will be greatly appreciated. Christian
How to use ActionMessages *and* redirects
Hello, In my application, I need to show status messages after a record is updated. I am using ActionMessages to do this -- and it works. However, there is some other information on the page that shows the status message. The user will very likely refresh this page so that information is updated, but doing so will cause the update form to re-post. I could prevent this by redirecting to the status message page instead of forwarding (i.e. so the URL in the browser's address bar is updated). When I set up the mapping for the status message page to redirect=true in the struts-config.xml, the status messages stopped being displayed. Is there any way that I can get the ActionMessage associated with the request to persist past the redirect? Thanks- Tom -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Invalidating a session
Can you please elaborate on the error message that you got ? Were you trying to access any attribute from the session after the point where you invalidated it ? --Rakesh --- - Original Message - From: Struts Newsgroup @[EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, December 18, 2001 9:40 AM Subject: Invalidating a session Subject: Invalidating a session From: Nicolas Parisé [EMAIL PROTECTED] === Hi, I got error message when I invoke session.invalidate() inside JSP page that contains Struts form tag, any1 can help me? Thank you Nicolas -- 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]
Personolized content using Struts. Jetspeed?
I would like to know what is the best way to provide customized content to the user like providing layout and color change etc., similar to portal sites. Is Jet Speed the solution for this?. Are there any competetors. I use Templates Tags in struts on Tomcat and Apache web server. Saw a few sites with jetspeed on jakarta site. I am not sure if those sites were built using struts. Interested in getting links to sites providing customization build using struts. - Thanks -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Moving to Struts
Dear all I need to move my standard MVC application to the Struts Framework ... Can anyone tell me the following : What components will I need to build and what will be available to me via the Struts library. What is the average rough effort estimate per component What is the effort estimate for integration Any help will be appreciated Thanks a ton. Regards, Aneesha This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately. You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited. -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
trouble with DB connection pool - style question
Hello. I am trying to implement a DB connection manager with my Struts webapp. I created a servlet that gets called when Tomcat is initialized, that creates a DbConnectionBroker, and puts it in the ServletContext: getServletContext().setAttribute(dbPool, dbPool); In a 'ActionForm', I'm validating a username against the database, so I grab the dbPool object to pass into my database bean: DbConnectionBroker pool = (DbConnectionBroker)servlet.getServletContext().getAttribute(dbPool); This works fine for the first page. When I attempt to access the next page (any other following page), right after the checkLogin tag is called, it throws the exception below. Two questions... First, I would like to utilize Struts datasource mapping, but don't know how to do so while using a different connection manager. (There was a post yesterday suggesting Poolman... ) Second, what am I doing wrong so that I cannot access my next page? The 'Action' called after the working page executes normally, then it dies. I'm loading two servlets (action, and my initDBPool) in web.xml. Is there some rule about which must be loaded first? I'm new to the whole servlet thing, but it seems like it's looking to my initDBPool servlet for information it should find elsewhere (hence the IncompatibleClassChangeError). I would be most grateful if someone could explaine the 'proper' method for merging connectionPooling with Struts - but I'd be happy for a solution for my problem at hand too... Thanks, Andy Timm java.lang.IncompatibleClassChangeError at _0002fregister_0002ejspregister_jsp_0._jspService(_0002fregister_0002 ejspregister_jsp_0.java:578) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspSer vlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3 18) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:4 04) 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(RequestDispatc herImpl.java:194) at org.apache.struts.action.ActionServlet.processActionForward(ActionSer vlet.java:1758) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:159 5) 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:4 04) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372 ) at org.apache.tomcat.core.ContextManager.internalService(ContextManager. java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743 ) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnectio n(HttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java: 416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java :498) at java.lang.Thread.run(Thread.java:484) __ 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]
is it possible to use two forms and one action?
Hi, Is it possible to use use two forms in one action? For example, ActionForm1 has two instance variable userID and name and is already populated and Action1 gets done. During another Action2, ActionForm2 is populated but ActionForm2 has no instance variable userID. In Action2, userID is needed to something like querying the DB. Can I use ActionForm1.userID which is already populated in Action2? If can not, how to work around the problem( use a value inputed by user just once in many actions?) Thanks in advance Victor -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
Re: Good taglib to format number
Frédéric Houbie - ABSIS-GROUP wrote: Which taglib are you using to format number, date, using Locale config of Browser ? Hi, take a look at the format Attribute from bean:write. You have to download the nightly Build, it's not in Struts 1.01. Volker -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]