RE: J2EE IDE
Hi Friends JBuilder 9 is really a good IDE. Does BTW Eclipse support ejb development? I used myEclipseIde for J2EE dev. and It was OK. Shashank S. Dixit Software Analyst. Datamatics Ltd. Contact: 28291253 ext 146 Mobile: 9820930075 Be brave against all odds. Never give up. -Original Message- From: Navjot Singh [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 27, 2003 2:09 PM To: Struts Users Mailing List Subject: RE: J2EE IDE Well, i like Eclipse a lot but it has it's constraints. If you wish to have O/R mapping support in your IDE, try JDeveloper etc. Although i have never used JBulder or IntelliJ but they are also good ones. navjot |-Original Message- |From: [EMAIL PROTECTED] |[mailto:[EMAIL PROTECTED] |Sent: Wednesday, August 27, 2003 12:16 PM |To: [EMAIL PROTECTED] |Subject: J2EE IDE | | |Can someone please suggest me a free J2EE IDE suitable for development of |webapps using STRUTS. I know of some IDE's like the FORTE, ECLIPSE, |NETBEANS. However I wanted to ckeckout if anyone has already evaluated any |of these since I am not sure which one is easy to use and has reasonably |good features as well. | |Regards |Sreekant G | | | - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: RE : Remote and local EJB
You can have properties file where you can define which interface should you consider for calling EJBs. SO that you dont have to change your code to serve your purpose. Let me know what do you think Shashank S. Dixit Software Analyst. Datamatics Ltd. Contact: 28291253 ext 146 Mobile: 9820930075 Be brave against all odds. Never give up. -Original Message- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 11:30 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: RE : Remote and local EJB If we know that EJBs and struts classes will reside in same JVM then why we should also invoke the stateless session bean remotely? We can invoke that session bean using the local interface... rite .? Although I agree that in furure, we may deploy web and app classes on different machines, so that's why I am looking for a solution where we can take advantage of both local and remote interface of EJB. I would say we should prefer the local EJB call instead of remote EJB call as far as possible. Viral -Original Message- From: Shashank Dixit [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 10:29 AM To: Struts Users Mailing List; Viral_Thakkar; [EMAIL PROTECTED] Subject: RE: RE : Remote and local EJB Hi Viral Ideally there should be one stateless session bean within action class and business component EJBs so that you have only one remote call and all other EJB calls are local. You should always program considering different tiers on different machines, although you are using the web and app tier on same machine now. Let me know what do you think on this. Shashank S. Dixit Software Analyst. Datamatics Ltd. Contact: 28291253 ext 146 Mobile: 9820930075 Be brave against all odds. Never give up. -Original Message- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 9:40 AM To: Struts Users Mailing List; Piper, James D CECOM SEC EPS Subject: RE : Remote and local EJB Thanks Jim. I am using the oracle 9iAS. I also developed the EJB which supports both remote and local access. I am also able to invoke this EJB from my action class. I accessed this EJB using the remote and also using local interface separately. The reason why I want this EJB to be deployed both as local and remote is that at present EJB will be accessed by the struts action class, both are in same JVM so I can access the EJB using the local interface. In future when we do clustering then at that time, EJB bean may be at different server, in different JVM, at that time struts action class should dynamically find the remote EJB. One way I think, we can handle such situation in the catch block of the NamingException() while accessing the local bean, we need to lookup the remote EJB. But it seems that this is not the good programming practice. So I am looking for some design pattern or framework, which supports the solution to this problem. Thanks, Viral -Original Message- From: Piper, James D CECOM SEC EPS [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 7:49 PM To: Viral_Thakkar Subject: RE: RE : Remote and local EJB So let me see if I understand what it is you are wanting to accomplish. It sounds like you have a bunch of EJBs, a Struts application and several servers. You would like http requests coming in to be 'evaluated' by your application and then based on some information within that request (i.e. users name, users ip address, users browsers type, users preference selection, or possibly even the current servers load) invoke either a local or a remote EJB. For example maybe you have an EJB that does some realy heavy calculatations like a ray-tracer and for some important users you want the results to come back faster than for other less important users. So you make your ray tracing EJB and deploy it on both the local server (i.e. the same one running your Struts app) and on some other EJB server far far away. Then register them both in your ejb-jar.xml with different names ie. RayTraceLocal and RayTraceRemote. So now to access either the remote or the local EJB depending on the request you write your Struts action class to first evaluate the HTTP request to figure out if this request is coming from the important user or not and then as appropriate either do your jndi lookup for the RayTraceLocal or the RayTraceRemote. As far as I know there is not any built in mechanics within Struts for doing this kind of thing, its up to you to write an Action class that invokes the backend EJB you want. I think some EJB servers give you some flexability and increase performance when using EJBs that are within the same container - WebLogic I know lets you specify both a remote and a local name for each EJB then provides better performance when using the local one - Possible even the high end WebLogic stuff will do automatic load balancing between EJB server so that your calls to jndi lookup return references to EJBs
RE: RE : Remote and local EJB
you mean you can mention these in ejb-jar.xml? How? Shashank S. Dixit Software Analyst. Datamatics Ltd. Contact: 28291253 ext 146 Mobile: 9820930075 Be brave against all odds. Never give up. -Original Message- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 3:35 PM To: [EMAIL PROTECTED]; Struts Users Mailing List Subject: RE : Remote and local EJB This seems to be good idea. I think EJB configuration files may also help us to achieve the same. -Original Message- From: Shashank Dixit [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 2:29 PM To: Viral_Thakkar; Struts Users Mailing List Subject: RE: RE : Remote and local EJB You can have properties file where you can define which interface should you consider for calling EJBs. SO that you dont have to change your code to serve your purpose. Let me know what do you think Shashank S. Dixit Software Analyst. Datamatics Ltd. Contact: 28291253 ext 146 Mobile: 9820930075 Be brave against all odds. Never give up. -Original Message- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 11:30 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE: RE : Remote and local EJB If we know that EJBs and struts classes will reside in same JVM then why we should also invoke the stateless session bean remotely? We can invoke that session bean using the local interface... rite .? Although I agree that in furure, we may deploy web and app classes on different machines, so that's why I am looking for a solution where we can take advantage of both local and remote interface of EJB. I would say we should prefer the local EJB call instead of remote EJB call as far as possible. Viral -Original Message- From: Shashank Dixit [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 10:29 AM To: Struts Users Mailing List; Viral_Thakkar; [EMAIL PROTECTED] Subject: RE: RE : Remote and local EJB Hi Viral Ideally there should be one stateless session bean within action class and business component EJBs so that you have only one remote call and all other EJB calls are local. You should always program considering different tiers on different machines, although you are using the web and app tier on same machine now. Let me know what do you think on this. Shashank S. Dixit Software Analyst. Datamatics Ltd. Contact: 28291253 ext 146 Mobile: 9820930075 Be brave against all odds. Never give up. -Original Message- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 9:40 AM To: Struts Users Mailing List; Piper, James D CECOM SEC EPS Subject: RE : Remote and local EJB Thanks Jim. I am using the oracle 9iAS. I also developed the EJB which supports both remote and local access. I am also able to invoke this EJB from my action class. I accessed this EJB using the remote and also using local interface separately. The reason why I want this EJB to be deployed both as local and remote is that at present EJB will be accessed by the struts action class, both are in same JVM so I can access the EJB using the local interface. In future when we do clustering then at that time, EJB bean may be at different server, in different JVM, at that time struts action class should dynamically find the remote EJB. One way I think, we can handle such situation in the catch block of the NamingException() while accessing the local bean, we need to lookup the remote EJB. But it seems that this is not the good programming practice. So I am looking for some design pattern or framework, which supports the solution to this problem. Thanks, Viral -Original Message- From: Piper, James D CECOM SEC EPS [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 7:49 PM To: Viral_Thakkar Subject: RE: RE : Remote and local EJB So let me see if I understand what it is you are wanting to accomplish. It sounds like you have a bunch of EJBs, a Struts application and several servers. You would like http requests coming in to be 'evaluated' by your application and then based on some information within that request (i.e. users name, users ip address, users browsers type, users preference selection, or possibly even the current servers load) invoke either a local or a remote EJB. For example maybe you have an EJB that does some realy heavy calculatations like a ray-tracer and for some important users you want the results to come back faster than for other less important users. So you make your ray tracing EJB and deploy it on both the local server (i.e. the same one running your Struts app) and on some other EJB server far far away. Then register them both in your ejb-jar.xml with different names ie. RayTraceLocal and RayTraceRemote. So now to access either the remote or the local EJB depending on the request you write your Struts action class to first evaluate the HTTP request to figure out if this request is coming from the important user
RE: RE : Remote and local EJB
Hi Viral I am also using struts and developing a framework with struts which supports ejb too. May I know the actual need to call ejb either by remote or local interface depending on request? So that I can think in the direction of getting the solution. Shashank S. Dixit Software Analyst. Datamatics Ltd. Contact: 28291253 ext 146 Mobile: 9820930075 Be brave against all odds. Never give up. -Original Message- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 5:57 PM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE : Remote and local EJB Thanks for the reply. I agree with this solution, but this does not solve the problem of accessing the remote and local EJBs depending on the request. -Original Message- From: Laurent MARQUEZ [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 10:11 PM To: 'Struts Users Mailing List' Subject: RE : RE : Remote and local EJB 1-See on http://www-106.ibm.com/developerworks/java/library/j-ejb1022.html for pattern business delegate. 2-You must declare your EJB Local or remote or both interface in your web.xml, Like this foo example: #ejb-ref # ejb-ref-name # ejb/fr.artal.FooHome #/ejb-ref-name #ejb-ref-type # Session #/ejb-ref-type #home # fr.artal.FooHome #/home #remote # fr.artal.Foo #/remote #ejb-link # FooEJB #/ejb-link # /ejb-ref 3-Call your delegate interface, in your action class: import org.apache.struts.action.Action; #Public class FooAction extends Action #{ # //~ Static fields/initializers - # # public static final String ID = ID; # public static final String NAME = NAME; # # //~ Methods # protected ActionForward execute( # ActionMapping mapping, # ActionForm form, # HttpServletRequest request, # HttpServletResponse response) # throws Exception { # # Integer id = null; # FooData fooData = null; # # if (form != null) # { # // using the form displayed in the view to get the foo id # String id = (String)PropertyUtils.getSimpleProperty(form, id); # # # // using business delegate pattern to interface with EJB session # FooDelegate FooDelegate = new FooDelegate(); # # # fooData = FooDelegate.getFoo(id); # } # if (fooData != null) # { # // set the request attribute # String name = fooData .getName(); # # request.setAttribute(ID, id); # request.setAttribute(NAME, name); # } # } #} 4- you can now, use the request object to display all the foo fields in your view(JSP) Example foo data: #%@ taglib uri=/WEB-INF/struts-bean.tld prefix=bean % #%@ taglib uri=/WEB-INF/struts-html.tld prefix=html % # #html:html #head/head #body # #table width=500 # border=0 cellspacing=0 cellpadding=0 # tr # tdFoo:/td # /tr # tr # td Id: %= request.getAttribute(ID) %/td # /tr # tr # tdnbsp;/td # /tr # tr # td Name: %= request.getAttribute(NAME) %/td # /tr # tr # tdnbsp;/td # /tr #/table #/body #/html:html -Message d'origine- De : Viral_Thakkar [mailto:[EMAIL PROTECTED] Envoyé : lundi 18 août 2003 11:39 À : Struts Users Mailing List Objet : RE: RE : Remote and local EJB Business delegate pattern explains on how to use the business delegate class. This pattern explains its usage and benefits. Here I am interested in a solution which supports remote and local EJB access depending on request. Any idea on this...??? -Original Message- From: Laurent MARQUEZ [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 1:07 PM To: 'Struts Users Mailing List' Subject: RE : Remote and local EJB Yes, you can interface EJB with Jakarta Struts I use the pattern business delegate See chapter 13 Of Programming Jakarta struts -Message d'origine- De : Viral_Thakkar [mailto:[EMAIL PROTECTED] Envoyé : lundi 18 août 2003 07:35 À : Struts Users Mailing List Objet : Remote and local EJB Is there any struts support or any one has idea on following problem? I am developing an application in which I require to develop an EJB with local and remote interface. Local or remote EJB should be invoked depending on the request. How one can identify this? Any framework which support this local and remote EJB development and access? -Original Message- From: Robert Leland [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 9:39 AM To: [EMAIL PROTECTED] Subject: [Validator] The Validator Wiki needs you
RE: RE : Remote and local EJB
Hi Viral Ideally there should be one stateless session bean within action class and business component EJBs so that you have only one remote call and all other EJB calls are local. You should always program considering different tiers on different machines, although you are using the web and app tier on same machine now. Let me know what do you think on this. Shashank S. Dixit Software Analyst. Datamatics Ltd. Contact: 28291253 ext 146 Mobile: 9820930075 Be brave against all odds. Never give up. -Original Message- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Thursday, August 21, 2003 9:40 AM To: Struts Users Mailing List; Piper, James D CECOM SEC EPS Subject: RE : Remote and local EJB Thanks Jim. I am using the oracle 9iAS. I also developed the EJB which supports both remote and local access. I am also able to invoke this EJB from my action class. I accessed this EJB using the remote and also using local interface separately. The reason why I want this EJB to be deployed both as local and remote is that at present EJB will be accessed by the struts action class, both are in same JVM so I can access the EJB using the local interface. In future when we do clustering then at that time, EJB bean may be at different server, in different JVM, at that time struts action class should dynamically find the remote EJB. One way I think, we can handle such situation in the catch block of the NamingException() while accessing the local bean, we need to lookup the remote EJB. But it seems that this is not the good programming practice. So I am looking for some design pattern or framework, which supports the solution to this problem. Thanks, Viral -Original Message- From: Piper, James D CECOM SEC EPS [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 7:49 PM To: Viral_Thakkar Subject: RE: RE : Remote and local EJB So let me see if I understand what it is you are wanting to accomplish. It sounds like you have a bunch of EJBs, a Struts application and several servers. You would like http requests coming in to be 'evaluated' by your application and then based on some information within that request (i.e. users name, users ip address, users browsers type, users preference selection, or possibly even the current servers load) invoke either a local or a remote EJB. For example maybe you have an EJB that does some realy heavy calculatations like a ray-tracer and for some important users you want the results to come back faster than for other less important users. So you make your ray tracing EJB and deploy it on both the local server (i.e. the same one running your Struts app) and on some other EJB server far far away. Then register them both in your ejb-jar.xml with different names ie. RayTraceLocal and RayTraceRemote. So now to access either the remote or the local EJB depending on the request you write your Struts action class to first evaluate the HTTP request to figure out if this request is coming from the important user or not and then as appropriate either do your jndi lookup for the RayTraceLocal or the RayTraceRemote. As far as I know there is not any built in mechanics within Struts for doing this kind of thing, its up to you to write an Action class that invokes the backend EJB you want. I think some EJB servers give you some flexability and increase performance when using EJBs that are within the same container - WebLogic I know lets you specify both a remote and a local name for each EJB then provides better performance when using the local one - Possible even the high end WebLogic stuff will do automatic load balancing between EJB server so that your calls to jndi lookup return references to EJBs on whatever server is being currently used less. But these kind of load balancing issues you would need to talk with your EJB server provider and then build your Struts actions to invkoke those EJBs in the way the EJB server provider specified to get the benefits of load balancing. Good Luck, Jim Piper -Original Message- From: Viral_Thakkar [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 8:27 AM To: Struts Users Mailing List; [EMAIL PROTECTED] Subject: RE : Remote and local EJB Thanks for the reply. I agree with this solution, but this does not solve the problem of accessing the remote and local EJBs depending on the request. -Original Message- From: Laurent MARQUEZ [mailto:[EMAIL PROTECTED] Sent: Monday, August 18, 2003 10:11 PM To: 'Struts Users Mailing List' Subject: RE : RE : Remote and local EJB 1-See on http://www-106.ibm.com/developerworks/java/library/j-ejb1022.html for pattern business delegate. 2-You must declare your EJB Local or remote or both interface in your web.xml, Like this foo example: #ejb-ref # ejb-ref-name # ejb/fr.artal.FooHome #/ejb-ref-name #ejb-ref-type # Session #/ejb-ref-type #home # fr.artal.FooHome #/home #remote # fr.artal.Foo #/remote #
RE: Model and Business in Struts
Hello We are in process of developing such framework, As soon as it gets complet I will mail it to you., Pls keep in touch and if you get some information on it forward it to me. - Shashank -Original Message- From: Mehdi Bizhani [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 12:46 PM To: [EMAIL PROTECTED] Subject: Model and Business in Struts Hi, Please introduce me a Struts-compatible and complete framework for the business part and model part of an Sruts application that it can also handle the security issue. My application is middle-weight. Thanks Free multi-lingual web-based and POP3 email service with a generous 15MB of storage, a choice of themes for your mailbox, message filtering, plus spam and virus protection Sign up now: http://www.gawab.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LookupDispatchAction
HI Nalini There is a fantastic example given in Programming Jakarta Struts from Orielly. Shashank S. Dixit Software Analyst. Datamatics Ltd. Contact: 28291253 ext 146 Mobile: 9820930075 Be brave against all odds. Never give up. -Original Message- From: Nalini Pal [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 7:45 PM To: [EMAIL PROTECTED] Subject: LookupDispatchAction Not sure how best to set this up and indeed, if it is possible so any advice would be appreciated. I have a an ActionForm called RegisterForm where a new user to enter their details (name, email, school name and school address) or an existing registered user to edit these fields. Alongside the 'school address' field I have a submit button, 'Find School' that allows a user to enter part of the school name or address and hit this 'FindSchool' button which then goes off to another page (selectSchool.jsp) that displays a list of matching schools. The user then clicks on their chosen school on selectSchool.jsp and is then returned to the RegisterForm with the 'school name' and 'school address' fields populated. I have been advised to use a LookupDispatchAction, as a JSP alternative to Javascript. Has anyone used it and/ or have an example illustrating its use? Many Thanks Nalini - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Action in Welcome File List
This is my welcome.jsp file. %@ page contentType=text/html; charset=UTF-8 % %@ page language=java % %@ taglib uri=/WEB-INF/struts-html.tld prefix=html % %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % html:html locale=true head titleWELCOME TO STRUTS/title /head body logic:redirect href=http://localhost:8181/SPWeb/showlogon.do; / /body /html:html And it works, no problem as yet Regards, Shashank -Original Message- From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 4:17 PM To: 'Struts Users Mailing List' Subject: RE: Struts Action in Welcome File List But you can redirect using logic redirect tag ? Mohan -Original Message- From: Suzette Daniel [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 8:03 PM To: 'Struts Users Mailing List' Subject: RE: Struts Action in Welcome File List Nope this is not supported, the web.xml must map to a file. -Original Message- From: Bailey, Shane C. [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 9:51 AM To: 'Struts Users Mailing List' Subject: RE: Struts Action in Welcome File List Can't you just do this: welcome-file-list welcome-file/PMTAction.do/welcome-file /welcome-file-list I do it with JRun4. Not sure if all containers will do an action instead of a JSP. -Original Message- From: Jon Wynacht [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 30, 2003 12:41 AM To: Struts Users Mailing List Subject: Re: Struts Action in Welcome File List Hmmm...tried that but still blanks out after a while...I'm wondering if there's an issue with my use of sessions...would that come into play here? Jon On Tuesday, July 29, 2003, at 06:56 PM, John Cavacas wrote: Try, logic:redirect forward=HOME/ In your index.jsp page. Also, look at sruts-blank.war example application for an easy to understand example of this. John -Original Message- From: Jon Wynacht [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 29, 2003 9:41 PM To: [EMAIL PROTECTED] Subject: Struts Action in Welcome File List Hi, I've been using Struts now for some time and enjoy it immensely! However, I've recently run into a problem that has me perplexed. Usually I can figure these things out and not bother the mail lists but this one requires your help ;-) I've pulled some info from the Programming Jakarta Struts book by Chuck Cavaness on how to use a Struts action in the welcome file list of a web.xml file. Based on the instructions in the book I have the following welcome file entry in my web.xml: welcome-file-list welcome-fileindex.jsp/welcome-file /welcome-file-list and the following code in my index.jsp: %@ taglib uri=/WEB-INF/struts-logic.tld prefix=logic % html body logic:forward name=HOME/ /body /html and the following entry in my struts-config.xml file: global-forwards forward name=HOME path=PMTAction.do redirect=false //global-forwards So, when I first fire up Tomcat everything forwards fine but after a while, if I hit the following URL: http://localhost:8080/pmt/index.jsp I get a blank page. No forwarding. Nothing. I've tried every combo possible here, including using logic:redirect/ but eventually it stops forwarding. Am I doing something subtly wrong or drastically wrong here? Thanks in advance, Jon - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This communication is intended for the use of the individual(s) or entity it was addressed to and may contain confidential and/or privileged information. If the reader of this transmission is not the intended recipient, you are hereby notified that any review, dissemination, distribution or copying of this communication is prohibited. If you receive this communication in error, please notify the sender immediately and delete this communication from your system(s) to which it was sent and/or replicated to. (c) 2003 Sapiens Americas Corp. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts w/EJB
try looking xpetstore. xpetsotre.sourceforge.net. see if it helps Shashank -Original Message- From: Kalra, Ashwani [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 10:24 AM To: 'Struts Users Mailing List' Subject: RE: Struts w/EJB hi, Struts doesnt enforce or set any rules or guidelines for using ejbs. With in your action classes you should use Business Delegate to hide the client's dependency on any persistance layer ejb or DAO. Cheers Ashwani Kalra http://www.geocities.com/ashwani_kalra/ -Original Message- From: Martin Naskovski [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 4:31 AM To: Struts Users Mailing List Subject: Struts w/EJB Hello all. Is there an app that demonstrates the use of Struts EJB as a persistence layer? I checked out Struts-Resume from Matt Raible, but it uses Hibernate... Is there anything available w/EJB's? Thanks. Martin -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message contains information that may be privileged or confidential and is the property of the Cap Gemini Ernst Young Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorised to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Need Help : DispatchAction and html:image without javascript.
Hello All, I request you to suggest solution for the following problem. I want to use LookupDispatchAction or DispatchAction class so that the framework can call my action class methods when user preses any button in the JSP page. If I use html:submit buttons the value (which is equal to method name) with it gets submitted and used to call appropriate method in the action class. I am using html:image for buttons. The problem with it is the value for these buttons doesn't get submitted and framework cannot understand the method name. Does that mean if I use html:image then I cannot use DispatchAction or LookupDispatchAction Class. Or If I want to use these classes then I cannot use graphical buttons? can anybody tell me how can I use these classes with html:image ? The main thing is, We don't want to use any peace of javascript code. Thanks in advance. Shashank S. Dixit Associate Software Consultant. Datamatics Ltd. SDF-1, SEEPZ, Andheri,Mumbai
Re: Need Help : DispatchAction and html:image without javascript.
Hello Martin Thanks for your help, I found out the code for ImageButtonDispatchAction and it would be useful for me. Regards, Shashank S. Dixit Associate Software Consultant. Datamatics Ltd. SDF-1, SEEPZ, Andheri,Mumbai - Original Message - From: Martin Naskovski To: Shashank Dixit Cc: Struts Users Mailing List Sent: Thursday, July 24, 2003 12:51 PM Subject: Re: Need Help : DispatchAction and html:image without javascript. Shashank, look for ImageButtonDispatchAction.java in the archives of 'struts-user'. The image buttons get submitted as property.x and property.y. Even if you didn't use the above named file that one of struts' users created, you can easily extend the DispatchAction (look at the source code for Struts on how to do this properly) to look through the HTTP ParameterMap, and look for parameters named *.x or *.y, either using regex or just parse them using the java tokenizer. You only need to find one, either .x or .y, to confirm a button push on the form. ImageButtonDispatchAction (already existing in the archives) already does this, except through the ActionMapping in struts-config.xml you specify what the button names on the form are in the 'parameter' attribute. Doing that, cuts down the time it'll take you to look through the HTTP parameter map. Hope this helps. Martin Wednesday, July 23, 2003, 11:59:23 PM, you wrote: SD Hello All, SD I request you to suggest solution for the following problem. SD I want to use LookupDispatchAction or DispatchAction class so that the framework can call my action class methods when user preses any button in the JSP page. If I use html:submit buttons the SD value (which is equal to method name) with it gets submitted and used to call appropriate method in the action class. I am using html:image for buttons. The problem with it is the value for SD these buttons doesn't get submitted and framework cannot understand the method name. Does that mean if I use html:image then I cannot use DispatchAction or LookupDispatchAction Class. Or If I SD want to use these classes then I cannot use graphical buttons? can anybody tell me how can I use these classes with html:image ? SD The main thing is, We don't want to use any peace of javascript code. SD Thanks in advance. SD Shashank S. Dixit SD Associate Software Consultant. SD Datamatics Ltd. SD SDF-1, SEEPZ, SD Andheri,Mumbai -- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: What is the default scope of an ActionForm.
The default scope is REQUEST - Original Message - From: Ravi Garg [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, July 10, 2003 4:19 PM Subject: What is the default scope of an ActionForm. Hi all, can any of you tell me if I donnot specify any scope of Form in Struts-config.xml then for which scope does the instance of form persists?? For example: action-mappings action path=/testing type=test.action.TestingAction name=TestingForm input=/jsp/Testing.jsp forward name=success path=/jsp/Test.jsp/ forward name=invalid path=/jsp/Testing.jsp/ /action /action-mappings What will be the scope of TestingForm? Regards, Ravi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Design question: Confirm action after validation ?
Hello Adam I have one doubt. You have base action class for all your subaction classes. What is the responsibility of this base action class. Do your base action class checks which button is clicked? If there are say 10 buttons in one form (say, GO, ADD, SAVE, NEXT, etc) are there 10 if statements in your class. Or it is sub action class resposibility to check this.? are there 10 or (any no) of if statements in subaction classes.? How to eliminate those if statements? any idea? Pls reply Shashank - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:52 PM Subject: Re: Design question: Confirm action after validation ? I have an Action base class which all my other Action classes inherit. In the execute() of this base class I check whether the user clicked cancel, before I call the child class execute(). I presume it would be easy enough to store the originating URL in the session, and if cancel is clicked, roll your own Action Forward back to this URL. Since it is all in the base class, it could work for every action as long as you are careful to watch the parameters or ids. Ajay Patil wrote: Hello, In my Struts application, the validation is done on server-side for every page. If the validation is successful, the user would like to see a page to confirm his action. The Confirm page should also have a Cancel button allowing him to go back to the previous page showing the data entered so far. This functionality is needed for every action. I am thinking if there is a generic way by which I can achieve this functionality. I also realize that I might end up making scope=session for every form, in trying to implement this requirement. (and I am worried about this too). Any ideas, pointers and/or thoughts will be very useful. Ajay Ajay Patil Vertex Software Pvt. Ltd. [EMAIL PROTECTED] http://www.vertex.co.in - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Design question: Confirm action after validation ?
Hi again Are you using EJBs?? If you are using EJB, where is the connection pool? At webserver side or app server side. Or where datasource is defined. at web server or app server? How you are taking data(Value Objects) from webserver to appserver Shashank - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 3:26 PM Subject: Re: Design question: Confirm action after validation ? my base action class sorts out all the general objects and variables that the child actions need - this is the child action's execute() signature: public String executeList(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, BlackSailUser user, Locale locale, MessageResources messages, ActionErrors errors, Connection conn) throws Exception I guess the list of responsibilites for the base action superclass is: (1) establish the action to carry out (your GO, ADD, SAVE etc) which is a token that is set by any of a request parameter, request attribute, action mapping parameter, or cancel button. (2) get a jdbc connection object from pool (3) get message resources from request (4) get locale from request (5) get user object from session (6) get errors from request (7) error handling (I don't have any in my subclasses) (8) get any lists for drop-down boxes (a seperate call to subclass) Had to check that out by looking at the code. It served me fine since my first struts app. Shashank Dixit wrote: Hello Adam I have one doubt. You have base action class for all your subaction classes. What is the responsibility of this base action class. Do your base action class checks which button is clicked? If there are say 10 buttons in one form (say, GO, ADD, SAVE, NEXT, etc) are there 10 if statements in your class. Or it is sub action class resposibility to check this.? are there 10 or (any no) of if statements in subaction classes.? How to eliminate those if statements? any idea? Pls reply Shashank - Original Message - From: Adam Hardy [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Wednesday, July 09, 2003 2:52 PM Subject: Re: Design question: Confirm action after validation ? I have an Action base class which all my other Action classes inherit. In the execute() of this base class I check whether the user clicked cancel, before I call the child class execute(). I presume it would be easy enough to store the originating URL in the session, and if cancel is clicked, roll your own Action Forward back to this URL. Since it is all in the base class, it could work for every action as long as you are careful to watch the parameters or ids. Ajay Patil wrote: Hello, In my Struts application, the validation is done on server-side for every page. If the validation is successful, the user would like to see a page to confirm his action. The Confirm page should also have a Cancel button allowing him to go back to the previous page showing the data entered so far. This functionality is needed for every action. I am thinking if there is a generic way by which I can achieve this functionality. I also realize that I might end up making scope=session for every form, in trying to implement this requirement. (and I am worried about this too). Any ideas, pointers and/or thoughts will be very useful. Ajay Ajay Patil Vertex Software Pvt. Ltd. [EMAIL PROTECTED] http://www.vertex.co.in - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
About Value Object
Hello All I am designing a framework using struts which involvs support for EJB too. I got one prob of sending value objects to app servr and taking it back. I am creating value objects from FORM beans and then sending it to AppServer. Then after EJB call and whatever is the business logic, The App Server returns another value object which is a RESULT OBJECT. Should this RESULT OBJECT is to be set in request? Where is the place for it? If I want to retrieve value in JSP page in Html FORM then What is I create RESULT OBJECT as a part of FORM beans. Can anybody suggest something on this. Thanks in advance Shashank
Re: site root going straight to a .do
Hi Simon We specify welcome file in web.xml file and not in struts-config.xml. Since the web server or app server doesnt hv any idea about struts config, putting a struts related action or file in web.xml will not help. What you can do is you can have a jsp as a welcome file which then redirects control to the action. Hope this helps Shashank - Original Message - From: Simon Kelly To: Struts Users Mailing List Sent: Monday, June 30, 2003 6:16 PM Subject: site root going straight to a .do Hi all, Sorry about the subject line, it's the best I can do in one sentance. What I'm trying to do, is set up the wecome file, so that instead of having to go via a html or jsp page, I can go straight to an action class! Any ideas? If someone types in htt://our.site.com/ourapp then it should go straight to the welcome.do Action and not a html file. I'm using struts1.1 and stxx. Cheers Simon I have often wondered how it is that every man loves himself more than all the rest of men, but yet sets less value on his own opinion of himself than on the opinion of others. -- Georg Christoph Lichtenberg Institut fuer Prozessdatenverarbeitung und Elektronik, Forschungszentrum Karlsruhe GmbH, Postfach 3640, D-76021 Karlsruhe, Germany. Tel: (+49)/7247 82-4042 E-mail : [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logic:iterate
I have set the list attribute list as follows. result.getArticleListDate returns ArrayList of ValueObjects com.dl.bi.vo.ArticleVo pageContext.setAttribute(list, result.getArticleListData(), PageContext.PAGE_SCOPE); And then I did the following logic:iterate id=myCollectionElement name=list type=com.dl.bi.vo.ArticleVo scope=page bean:write name=myCollectionElement property=articleId/ bean:write name=myCollectionElement property=title/br / /logic:iterate But i got the error myCollectionElement not found in any scope. What is the mistake? Shashank S. Dixit Senior Software Engineer Datamatics Ltd. Contact: 28291253 ext 133 Mobile: 9820930075 Be brave against all odds. Never give up. - Original Message - From: Nagendra Kumar O V S To: [EMAIL PROTECTED] Sent: Friday, June 20, 2003 11:53 AM Subject: Re: Logic:iterate HI, where is ur list coming from?? ---Original Message--- From: Struts Users Mailing List Date: Friday, June 20, 2003 11:22:39 AM To: Struts Users Mailing List Subject: Logic:iterate Hello All Can somebody pls explain how to use Logic:iterate I am using following code logic:iterate id=myCollectionElement name=list type=com.dl.bi.vo.ArticleVo scope=page bean:write name=myCollectionElement property=articleId/ bean:write name=myCollectionElement property=title/br / /logic:iterate What I understood from the documents is myCollection element will be create when in doStartTag of logic:iterate. And it will be stored in pageContext so that WriteTag will access it. But I got the error that myCollectionElement is not found in any scope Can somebody pls explain this. or correct me if I am wrong. Thanks in advance Shashank S. Dixit Senior Software Engineer Datamatics Ltd. Contact: 28291253 ext 133 Mobile: 9820930075 Be brave against all odds. Never give up. IncrediMail - Email has finally evolved - Click Here
Logic:Iterate - Pls Help.........
Hello All Can somebody pls explain how to use Logic:iterate I am using following code logic:iterate id=myCollectionElement name=list type=com.dl.bi.vo.ArticleVo scope=page bean:write name=myCollectionElement property=articleId/ bean:write name=myCollectionElement property=title/br / /logic:iterate What I understood from the documents is myCollection element will be create when in doStartTag of logic:iterate. And it will be stored in pageContext so that WriteTag will access it. But I got the error that myCollectionElement is not found in any scope Can somebody pls explain this. or correct me if I am wrong. Thanks in advance Shashank S. Dixit Senior Software Engineer Datamatics Ltd. Contact: 28291253 ext 133 Mobile: 9820930075 Be brave against all odds. Never give up.
Logic:iterate
Hello All Can somebody pls explain how to use Logic:iterate I am using following code logic:iterate id=myCollectionElement name=list type=com.dl.bi.vo.ArticleVo scope=page bean:write name=myCollectionElement property=articleId/ bean:write name=myCollectionElement property=title/br / /logic:iterate What I understood from the documents is myCollection element will be create when in doStartTag of logic:iterate. And it will be stored in pageContext so that WriteTag will access it. But I got the error that myCollectionElement is not found in any scope Can somebody pls explain this. or correct me if I am wrong. Thanks in advance Shashank S. Dixit Senior Software Engineer Datamatics Ltd. Contact: 28291253 ext 133 Mobile: 9820930075 Be brave against all odds. Never give up.
Re: Struts Validation Question
Test msg .. pls ignore Shashank S. Dixit Senior Software Engineer Datamatics Ltd. Contact: 28291253 ext 133 Mobile: 9820930075 - Original Message - From: Bailey, Shane C. [EMAIL PROTECTED] To: 'Struts Users Mailing List' [EMAIL PROTECTED] Sent: Monday, June 02, 2003 7:32 PM Subject: RE: Struts Validation Question What does your action mapping look like in the struts-config? Also, I believe, by the time you are in the action validation will already be performed (once you have it working properly). So you don't have a call to validate() or anything to do with validation in the action. -Original Message- From: Ranj Nadarajah [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2003 10:03 AM To: [EMAIL PROTECTED] Subject: Struts Validation Question I've been trying to make validator work with our application. However, I've not been very successful. Here is what I did. Please let me know if I missed anything. I've created a form with firstName and LastName fields. The validator should see if that the form is not empty. Howver, when I don't fill in and submit, I get to the next page. I don't see the validator checking for errors and reporting. I followed the guidelines in http://www.onjava.com/lpt/a/2912 1) Put the commons-validator.jar,jakarta-oro.jar and the struts.jar in the lib folder 2) Put the validator-rules.xml file in the web-inf directory. 3) created the validator.xml file in the web-inf directory and put the following in the validation.xml file: form-validation !-- == Default Language Form Definitions = -- formset form name=com.gdm.form.FBOrder field property=firstName depends=required,minlength arg0 key=orderForm.firstname.displayname/ arg1 name=minlength key=${var:minlength} resource=false/ var var-nameminLength/var-name var-value5/var-value /var /field /form /formset /form-validation 4) Created the ActionForm class and extended it from validator.form 5) Called the ((FBOrder)form).validate(..) method from the action class 6) Created the following code in struts-config.xml plug-in className=org.apache.struts.validator.ValidatorPlugIn set-property property=pathnames vaue=/WEB-INF/validator-rules.xml, /WEB-INF/validation.xml / /plug-in 7) put the following code in the jsp page. logic:messagesPresent bean:message key=errors.header/ ul html:messages id=error libean:write name=error//li /html:messages /ulhr /logic:messagesPresent 7) Put the following in the applicationresources.properties file. button.cancel=Cancel button.confirm=Confirm button.reset=Reset button.save=Save # Errors errors.footer= errors.header=h3font color=redValidation Error/font/h3You must correct the following error(s) before proceeding: errors.ioException=I/O exception rendering error messages: {0} error.database.missing=liUser database is missing, cannot validate logon credentials/li errors.required={0} is required. errors.minlength={0} can not be less than {1} characters. errors.maxlength={0} can not be greater than {1} characters. errors.invalid={0} is invalid. errors.byte={0} must be an byte. errors.short={0} must be an short. errors.integer={0} must be an integer. errors.long={0} must be an long. errors.float={0} must be an float. errors.double={0} must be an double. errors.date={0} is not a date. errors.range={0} is not in the range {1} through {2}. errors.creditcard={0} is not a valid credit card number. errors.email={0} is an invalid e-mail address. #Order Form orderForm.firstname.displayname=First Name orderForm.lastname.displayname=Last Name _ Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Test
Test Msg... Pls ignore Shashank S. Dixit Senior Software Engineer Datamatics Ltd. Contact: 28291253 ext 133 Mobile: 9820930075