How to get started ?
Hi All! I have been trying to get something going with Struts, but am having no go. I am not an expert @ JSP/Servlets but am decent at programming in Java. I have written a few servlets and am getting started with JSP. All the same, I want to get something going with STRUTS. I have seen the doco on the website, but it's not helping me much. I want to see an example of a SIMPLE MVC app where someone can point and say "That's the MODEL, that's the VIEW and that's the CONTROLLER". I understand that I may lack some fundamental knowledge, but can someone please point me to a good starting point ? TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: ejb's and tomcat
Hi Ajay ! Apache Tomcat does not include an EJB container. You may want to try OpenEJB Container System (http://www.openejb.org) as a plugin to Tomcat and deploy EJBs. Another option would be to use JBoss(http://www.jboss.org) which includes the EJB Container. Kunal -Original Message- From: ajay brar [mailto:[EMAIL PROTECTED] Sent: Wednesday, 8 October 2003 11:51 To: [EMAIL PROTECTED] Subject: ejb's and tomcat Hi! does tomcat support ejb's. I'm building a web app which uses struts. i'm using ejb's for the model part. can i deploy the ejb component on tomcat? what other alternate ways are there to do so? thanks cheers ajay _ ninemsn Premium transforms your e-mail with colours, photos and animated text. Click here http://ninemsn.com.au/premium/landing.asp - 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: ejb's and tomcat
Hi Andrew, Mark, and ALL! The CMP2.x spec allows declaring EJBs as local objects. The advantage of the local EJB objects is that they don't get serialized/deserialized(I think) and pass-by-reference and not by-value. Effectively, If you use a LocalEJB, you have the flexibitly of making the REMOTE with very few changes to code. People, please correct me if I am wrong. Kunal -Original Message- From: Andrew Hill [mailto:[EMAIL PROTECTED] Sent: Wednesday, 8 October 2003 21:20 To: Struts Users Mailing List Subject: RE: ejb's and tomcat Nonsense! In the same way acronyms look great on resumes, they also look just super on product brochures. If you use EJBs you can proudly proclaim that your application is "based on J2EE EJB technology"! This is useful for impressing clueless manager types even if EJBs confer no actual technical advantage (and often many disadvantages) to what your trying to do. btw: afaik its not just distributed stuff but also transaction type stuff its good for (but lets face it - most dbs do enough in that regards for most apps transaction needs already) -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Wednesday, 8 October 2003 19:04 To: Struts Users Mailing List Subject: RE: ejb's and tomcat If you are asking these questions, you probably should not be using EJB. The ONLY reason to use EJB is if you are developing a distributed application; anything else is overkill. If you simply need data persistence, use JDBC and use DAO, or one of the persistence frameworks: Ibatus, Hibernate, or Kodo-JDO. Mark -Original Message- From: ajay brar [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 07, 2003 9:51 PM To: [EMAIL PROTECTED] Subject: ejb's and tomcat Hi! does tomcat support ejb's. I'm building a web app which uses struts. i'm using ejb's for the model part. can i deploy the ejb component on tomcat? what other alternate ways are there to do so? thanks cheers ajay _ ninemsn Premium transforms your e-mail with colours, photos and animated text. Click here http://ninemsn.com.au/premium/landing.asp - 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]
HOW and WHERE do I call my EJB from
Hi All ! I am trying to start out with struts. I have successfully deployed an EJB in JBOSS and want to call it from my Struts-based web app. My current setup: ActionForm: GetSearchCriteriaForm extends org.apache.struts.action.ActionForm Action: SearchAction extends org.apache.struts.action.Action SearchAction.execute( ... ) { String vehicleID = ((au.com.carsales.carsales.GetSearchCriteriaForm)form).getVehicleID(); request.setAttribute( "vehicleID", vehicleID ); return( mapping.findForward("searchUsedCars" ) ); } Effectively (from the code above), I have a form, from where the user enters the vehicleID and set it as a session attribute. Now, I want to call my UsedVehicleEJB's findByPrimaryKey() method with the vehicleID as the parameter. My Questions: = 1. Should I call my EJB from the execute method and set the attributes of the UsedVehicleEJB as session variables? 1.1 Can I make the entire EJB a session variable? 2. Should I be using the bean tag library in my view "searchUsedCars.jsp" to call my EJB ? What I think: = Given that the view should be independent of the model, I should not call the EJB from "searchUsedCars.jsp" and hence, I should call the EJB from the execute method. Please comment. TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie
Hi Gaurav ! Perhaps you should get started by reading "Read Me First - A path for newbies" available @ http://jakarta.apache.org/struts/resources/1st.html I would also recommend StrutsStudio from http://www.exadel.com to start with as a tool and look at the struts-config file it generates. StrutsStudio provides a good visual representation of the struts-config file. To understand the MVC architecture, I recommend reading the Struts API comments, which are greatly useful. These are available @ http://jakarta.apache.org/struts/api/index.html The classes that you should look at are "Action", "ActionForm", and "ActionServlet" to begin with. HTH, Kunal -Original Message- From: Gaurav Vaish [mailto:[EMAIL PROTECTED] Sent: Sunday, 12 October 2003 18:04 To: Struts Users Subject: Newbie Hi, I am new to struts (read: novice). How and from where do I start? I mean... how do I go about implementing the MVC thing? Cheers, Gaurav - 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: [Slightly OT] Where/how to start?
Hi Andy ! If you follow the "Read Me First - A path for newbies", it'll get you on to JSPs, Servlets and the lot. It has some good links to "pre-requisites" also. Hence, if you follow the "Newbie path" you will find your way. HTH, Kunal -Original Message- From: Andy Engle [mailto:[EMAIL PROTECTED] Sent: Tuesday, 14 October 2003 08:27 To: [EMAIL PROTECTED] Subject: [Slightly OT] Where/how to start? Hi all, I have a strong Perl/CGI background, but my JSP/Servlet/J2EE experience is related only to what I did in college. My job entails C development, but I really want to get more into this J2EE stuff. It's so much more enjoyable than this C work I am doing, but I can't seem to get my foot in the door. In looking for a J2EE development job, I keep hearing that I need more experience, which is perfectly understandable. But, I can't get experience without getting a job doing it first. My question is, how do I get my foot in the door so I can split my boring job and do what I really want to do? Do I need to go full tilt and get a certification or something like that? Any ideas would be most helpful. Even more helpful would be a J2EE job in the Chicago area where I could develop my professional career in this area. Thanks very much! Best Regards, Andy - 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]
Application Module Configuration
Hi All! I am attempting to setup an application module named "my-module" as follows. However, whenever I send a request as http://127.0.0.1/my-app/my-module/action/index/ I get a 404 page returned. Now, when I send a request to the default module, i.e. http://127.0.0.1/my-app/action/index/ the appropriate jsp page is displayed. Also, when I just do http://127.0.0.1/my-app/my-module/action/, I still get a 404 error, whilst, from my understanding, I should get a 400 error. The following is the additional configuration I have added for my new application module. === web.xml === ... config /WEB-INF/struts-config.xml config/my-module /WEB-INF/struts-config-my-module.xml ... ... === web.xml === Is there anything else that I need to do ? Thanks in advance (TIA), Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
SOLVED --> RE: Application Module Configuration
Hi All! I solved this problem myself. Being new to struts, I was attempting to use /action instead of *.do as the URL pattern. Thanks all, anyway! Kunal -Original Message- From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] Sent: Sunday, 11 January 2004 12:27 To: 'Struts Users Mailing List' Subject: Application Module Configuration Hi All! I am attempting to setup an application module named "my-module" as follows. However, whenever I send a request as http://127.0.0.1/my-app/my-module/action/index/ I get a 404 page returned. Now, when I send a request to the default module, i.e. http://127.0.0.1/my-app/action/index/ the appropriate jsp page is displayed. Also, when I just do http://127.0.0.1/my-app/my-module/action/, I still get a 404 error, whilst, from my understanding, I should get a 400 error. The following is the additional configuration I have added for my new application module. === web.xml === ... config /WEB-INF/struts-config.xml config/my-module /WEB-INF/struts-config-my-module.xml ... ... === web.xml === Is there anything else that I need to do ? Thanks in advance (TIA), Kunal - 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]
Tiles and website skinnability
Hi All! I am attempting to "tile" my website. However, I have a need to skin websites based on varied requirements, wherein, the "layout" of the site remains the same, with the exception of the graphics. What I additionally need to do, is call a different style sheet based on the URL. Can someone throw some light in this area ? TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: url pattern /do/* and modules
Can you discuss your ideas further ? TIA, Kunal -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Craig Laverty Sent: Tuesday, 24 February 2004 09:56 To: [EMAIL PROTECTED] Subject: Re: url pattern /do/* and modules Hubert Rabago yahoo.com> writes: > > From the Struts user guide: > "WARNING - If you are using the new module support in Struts 1.1, you should > be aware that only extension mapping is supported." > > http://jakarta.apache.org/struts/userGuide/configuration.html > Look for "5.4.2 Configure the Action Servlet Mapping" and check the warnings > at the bottom. > > - Hubert Thank you for the quick response and pointing out that only extension mapping is supported for modules. Now that I know it won't work as is, I may spend a bit more time trying to trick it with my own SwitchAction. Thanks Again, Craig. - 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]
Accessing struts module name from jsp
Hi All! I was wondering if a struts tag available that can retrieve the struts module name. TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Newbie Q
Hi All! Can someone tell me as to how do I call inside Example: ">Link Text I investigated a little abt nested tags, but I don't think that it is applicable here. TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Newbie Q
Will try this, but doesn't having <%=myProp%> mean that I am using a scriptlet ? And, shouldn't our JSP not include scriptlets as far as possible ? Thanks for the help! Kunal -Original Message- From: Daniel Henrique Alves Lima [mailto:[EMAIL PROTECTED] Sent: Wednesday, 10 March 2004 12:38 To: Struts Users Mailing List Subject: Re: Newbie Q I don't know if your construction is possible (i think it is). But try to use : Link Text Kunal H. Parikh wrote: >Hi All! > >Can someone tell me as to how do I call inside ...> > >Example: >">Link >Text > >I investigated a little abt nested tags, but I don't think that it is >applicable here. > > >TIA, > > >Kunal > > > >- >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]
Calling a tiles attribute from another attribute
Hi All! I am attempting to call a tiles:getAsString from a JSP page which is an attribute in the tiles definition. Example: === And, in /WEB-INF/jsp/html_head.jsp I have, === However, I am getting the following error: === [ServletException in:/WEB-INF/jsp/html_head.jsp] Error - tag.getAsString : attribute 'page_title' not found in context. Check tag syntax' javax.servlet.jsp.JspException: Error - tag.getAsString : attribute 'page_title' not found in context. Check tag syntax at org.apache.struts.taglib.tiles.GetAttributeTag.doEndTag(GetAttributeTag.java :204) === By the looks of it, I believe that I cannot do this? Is there an alternative available? Or am I doing something incorrectly ? Cheers and TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Struts Validator prints all javascript functions
Hi All! I am attempting to use Struts Validator. All works well, but I am only using the "required" validation in my code. However, the JavaScript that gets generated, include other functions like checkEmail, minLength, etc. etc. Is this expected behaviour? My code (FYI): === : == TIA, Kunal - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Struts Validator prints all javascript functions
I thought so too! My struts-config.xml reads as follows == ... ... = Do you think DynaValidatorActionForm could be creating the problem ? Kunal -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Marino A. Jonsson Sent: Monday, 15 March 2004 10:07 To: [EMAIL PROTECTED] Subject: Re: Struts Validator prints all javascript functions hmm ... that's not my experience - the dynamic parts are rendered as they should, but all the static javascript is then rendered too (instead of just the relevant static methods). I haven't tested 1.2 though. Marino "Joe Germuska" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > At 8:55 AM +1100 3/15/04, Kunal H. Parikh wrote: > >Hi All! > > > >I am attempting to use Struts Validator. > > > >All works well, but I am only using the "required" validation in my code. > > > >However, the JavaScript that gets generated, include other functions like > >checkEmail, minLength, etc. etc. > > > >Is this expected behaviour? > > This is what happens when the "formName" you specify in the > html:javascript tag is not found by the validator. > > Since Struts 1.2.0 (and a little before in the nightlies, of course), > this condition causes a JSPException to be thrown instead. > > Joe > > > -- > Joe Germuska > [EMAIL PROTECTED] > http://blog.germuska.com >"Imagine if every Thursday your shoes exploded if you tied them > the usual way. This happens to us all the time with computers, and > nobody thinks of complaining." > -- Jef Raskin - 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 Validator prints all javascript functions
Hi Guys ! Does anyone think that this could be happening because I am using Tiles ? Kunal -Original Message- From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] Sent: Monday, 15 March 2004 10:12 To: 'Struts Users Mailing List' Subject: RE: Struts Validator prints all javascript functions I thought so too! My struts-config.xml reads as follows == ... ... = Do you think DynaValidatorActionForm could be creating the problem ? Kunal -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Marino A. Jonsson Sent: Monday, 15 March 2004 10:07 To: [EMAIL PROTECTED] Subject: Re: Struts Validator prints all javascript functions hmm ... that's not my experience - the dynamic parts are rendered as they should, but all the static javascript is then rendered too (instead of just the relevant static methods). I haven't tested 1.2 though. Marino "Joe Germuska" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > At 8:55 AM +1100 3/15/04, Kunal H. Parikh wrote: > >Hi All! > > > >I am attempting to use Struts Validator. > > > >All works well, but I am only using the "required" validation in my code. > > > >However, the JavaScript that gets generated, include other functions like > >checkEmail, minLength, etc. etc. > > > >Is this expected behaviour? > > This is what happens when the "formName" you specify in the > html:javascript tag is not found by the validator. > > Since Struts 1.2.0 (and a little before in the nightlies, of course), > this condition causes a JSPException to be thrown instead. > > Joe > > > -- > Joe Germuska > [EMAIL PROTECTED] > http://blog.germuska.com >"Imagine if every Thursday your shoes exploded if you tied them > the usual way. This happens to us all the time with computers, and > nobody thinks of complaining." > -- Jef Raskin - 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: [SOLVED] Struts Validator prints all javascript functions
Hi All! After some debugging, I worked out that there are two variables "dynamicJavaScript" and "staticJavaScript" in the JavascriptValidatorTag class. By default, their values are "true". And Hence, the staticJavaScript also gets included in the response. i.e. to only display relevant JS methods, your tag should look like, cheers, kunal -----Original Message- From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] Sent: Monday, 15 March 2004 08:55 To: 'Struts Users Mailing List' Subject: Struts Validator prints all javascript functions Hi All! I am attempting to use Struts Validator. All works well, but I am only using the "required" validation in my code. However, the JavaScript that gets generated, include other functions like checkEmail, minLength, etc. etc. Is this expected behaviour? My code (FYI): === : == TIA, Kunal - 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: [SOLVED] Struts Validator prints all javascript functions
Whoops . that didn't quite solve the problem . the real javascript methods are not quite being appended to the response . My apologies! -Original Message- From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] Sent: Thursday, 18 March 2004 12:11 To: 'Struts Users Mailing List' Cc: 'Joe Germuska'; 'Theodosios Paschalidis' Subject: RE: [SOLVED] Struts Validator prints all javascript functions Hi All! After some debugging, I worked out that there are two variables "dynamicJavaScript" and "staticJavaScript" in the JavascriptValidatorTag class. By default, their values are "true". And Hence, the staticJavaScript also gets included in the response. i.e. to only display relevant JS methods, your tag should look like, ==== ==== cheers, kunal -Original Message- From: Kunal H. Parikh [mailto:[EMAIL PROTECTED] Sent: Monday, 15 March 2004 08:55 To: 'Struts Users Mailing List' Subject: Struts Validator prints all javascript functions Hi All! I am attempting to use Struts Validator. All works well, but I am only using the "required" validation in my code. However, the JavaScript that gets generated, include other functions like checkEmail, minLength, etc. etc. Is this expected behaviour? My code (FYI): === : == TIA, Kunal - 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]