known problems with SSL and IE5 and Orion?
Hi, has anyone else also strange problems with Struts based Applications and Orion/SSL and M$ IE 4.x/5.x? it seems, that the configured timeout value was completly ignored - after 1-2 min, the session was lost! thanks klaus -- Klaus Thiele - Personal Informatik AG mailto:[EMAIL PROTECTED] "There's got to be more to life than compile-and-go."
R: R: Help: struts on Orion 1.4.0 and JDK 1.3.0
Hi KLaus, What is wrong? Putting struts.jar in orion lib? This was the error I did if it wasn't clear in my post. Luciano -Messaggio originale- Da: Klaus Thiele [mailto:[EMAIL PROTECTED]] Inviato: venerdì 10 novembre 2000 10.22 A: [EMAIL PROTECTED] Oggetto: Re: R: Help: struts on Orion 1.4.0 and JDK 1.3.0 Montebove Luciano wrote: Hi all, Solved. The problem was generated putting struts.jar in orion/lib. thats wrong are you using struts-0.5? it works for me "out-of-the-box" with orion-1.4.x bye klaus -- Klaus Thiele - Personal Informatik AG mailto:[EMAIL PROTECTED] "There's got to be more to life than compile-and-go."
Struts on ATG Dynamo
Is anyone on this list running Struts apps on ATG Dynamo server? *** Mac Ferguson, Senior Developer, NKaos Interactive Media (http://www.nkaos.com), 579 Richmond Street West, Suite 400 Toronto, ON M5V 1Y6 (Phone) (416)504.8931 x316 (Fax) (416)504.8472 ***
RE: New struts user - status Qs
http://www.mail-archive.com/struts-user%40jakarta.apache.org/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, November 10, 2000 11:47 AM To: [EMAIL PROTECTED] Subject: New struts user - status Qs I just got a small system running using sturts on a mysql database. A few Qs: 1) Is there an archive of the email list anywhere ? 2) Anyone done anything to help rapidly create an application ? I created a QD application builder to help get started. It reads the structure of Mysql database and creates the Form/Action classes as well as a list and edit JSP and the action.xml -- any place I can put it for other users ? (note: it's in perl and uses the 0.5 release, and is probably written totally wrong, BUT it does creating working aps) Later ... Rich Roth --- On-the-Net Direct: Box 927, Northampton, MA 01061 Email: [EMAIL PROTECTED] Url: http://east.on-the-net.com ~~~ i-Depth lets you Add Instant Depth to your Website~~~ ~~~ 7 day free trial at: http://www.i-depth.com/signup.htm ~~~
Design question
Hi, I'm re-designing a web application that is mainly running with servlets/jsps/conn-pooling. I started using struts for prototypes, and I really like its architecture. The new design has to be robust and scalable because we expect considerable traffic. It is clear that the data tier should be implemented with entity beans, but I'm not sure yet about the web and business tier. One idea is to use struts (action classes+jsps+xml+xsl) to implement the web tier, and java beans and session EJBs for the business tier. But I have some questions for this architecture: 1. Is struts doing object pooling for action classes? (it's designed for high traffic?) If not, is there a way of doing this? 2. Is it right for action classes to use session EJBs as business beans? Is there any downside on this? 3. In the j2ee sample app. (the pet-store app.), Sun propose a design based on events and handlers for controlling the page flow. Is struts a valid replacement for this? 4. If combining struts with EJBs is fine, which is the best way of doing it? Thanks in advance for sharing your knowledge. Juan Gargiulo
Scripting variable from struts:message?
Hi, Is it possible to get a String from ApplicationResources.properties using struts:message and put it into a scripting variable to be used later in the jsp?? I wished to do the following: mytaglib:mytag name="struts:message key='mytag.name'/" attrib2=/ where mytag is a custom tag. This does not work for a custom tag though it works for a normal HTMl tag. I tried mytaglib:mytag name="%=struts:message key='mytag.name'/%" attrib2 =/ also. but that didn't work either. So I thought I would assign what is returned by struts:message to a variable say "name" and substitute it using jsp expression as : mytaglib:mytag name="%=name%" attrib2=/ Now the problem is how do I get the value in a variable?? Any help would be greatly appreciated. Thanks, Vandana
Re: Scripting variable from struts:message?
Hi Vandana, For very simple cases where I need to reuse the string, mainly related with JavaScript event handling, I put it in a JavaScript variable and I am able to reuse it from a JavaScript event: script language="javascript" var msg='struts:message key="hello.world" /'; /script mylib:printtag onMouseOver="alert(var);" / But that's not really clean. So I have developped an helper class to pick messages in the resource file, and I can use it everywhere JSP code is accepted: mylib:printtag msg="%= LocaleUtil.getMessage("hello.world") %" / I don't think you can rely on a custom tag as recursion into attributes is not permitted. Pierre Métras - Original Message - From: "Vandana Gupta/Raleigh/IBM" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, November 10, 2000 4:08 PM Subject: Scripting variable from struts:message? Hi, Is it possible to get a String from ApplicationResources.properties using struts:message and put it into a scripting variable to be used later in the jsp?? I wished to do the following: mytaglib:mytag name="struts:message key='mytag.name'/" attrib2=/ where mytag is a custom tag. This does not work for a custom tag though it works for a normal HTMl tag. I tried mytaglib:mytag name="%=struts:message key='mytag.name'/%" attrib2 =/ also. but that didn't work either. So I thought I would assign what is returned by struts:message to a variable say "name" and substitute it using jsp expression as : mytaglib:mytag name="%=name%" attrib2=/ Now the problem is how do I get the value in a variable?? Any help would be greatly appreciated. Thanks, Vandana
Re: Design question
Juan Gargiulo wrote: Hi, I'm re-designing a web application that is mainly running with servlets/jsps/conn-pooling. I started using struts for prototypes, and I really like its architecture. The new design has to be robust and scalable because we expect considerable traffic. It is clear that the data tier should be implemented with entity beans, but I'm not sure yet about the web and business tier. One idea is to use struts (action classes+jsps+xml+xsl) to implement the web tier, and java beans and session EJBs for the business tier. But I have some questions for this architecture: 1. Is struts doing object pooling for action classes? (it's designed for high traffic?) If not, is there a way of doing this? Struts uses one and only one instance of each action class. As long as you design your actions to be thread-safe (basically the same rule as for servlets), there is no need for more than one instance. The most important rule is to not use instance variables in your action classes, unless you want to share information between requests. 2. Is it right for action classes to use session EJBs as business beans? Is there any downside on this? Using session EJBs makes a lot of sense as business beans. The only caution I would have would be trying to use EJBs of either type as ActionForm beans -- you should create separate classes for that purpose. 3. In the j2ee sample app. (the pet-store app.), Sun propose a design based on events and handlers for controlling the page flow. Is struts a valid replacement for this? The design of Pet Store is quite similar to Struts, although it uses a JSP page as the "front component" -- the role that is played by the controller servlet in Struts. As time goes on, you will find that Struts and the Blueprints design (used by PetStore) will be getting closer together. I'm in active cooperation with the Blueprints folks at Sun. 4. If combining struts with EJBs is fine, which is the best way of doing it? The two ways that make the most sense to me are: * Encapsulate business logic in session EJBs. Then, your Action classes become primarily "adapters" in design pattern parlance, translating input parameters from an HTTP request into corresponding property settings and method calls on the session bean. * Use entity beans as the "model" beans you store as request attributes or session attributes, although you may have performance issues if the beans are actually remote -- it might be better to copy the relevant data you need for the presentation into regular JavaBeans that are local to the servlet container. Thanks in advance for sharing your knowledge. Juan Gargiulo Craig McClanahan
Re: Design question
shankar wrote: Hi,We have been using the Model 2 architecture , but have religously avoided the use of beans as we were using a lowend server(which was quite heavily loaded) and were anxious to avoid unnecessary object creation .This is what we did - Client requests go to a Servlet. The servlet uses a switch structure to evoke different methods(based on a input parameter) with the request object as a parameter. This method reads in parameters from the request object.It may evoke db methods if updation etc are necessary. The output ( from querying the db ) are added to the request object as attributes and forwarded to the JSP which handles the display.This approach is equivalent to the struts architecture, but it does'nt have much of OO design. We are now starting off on the design of another project and would like to improve on the current design. An action form bean is created for each input form(if it has'nt already been done) and added to the user session. Also system state beans are passed on to the business logic beans for processing. Our current design may not exactly promote code reuseability and all that , but I suppose it is not all that resource intensive. The basic question is -Won't the creation of so many obejcts affect the performance of the server ? Given the fact that we are using a lowend server, with quite a heavy load, would it be advisable to use the struts architecture ?Thanks,Shankar. Embedding the application logic in your servlet is certainly feasible in small scale applications -- although compared to Struts you don't really save a lot in terms of object creation. Struts only creates an instance of an Action class once, and then reuses it continually. (You will also find that, with more recent JVMs, object creation overhead has been pretty dramatically reduced -- it may not longer be the dominant factor in performance). The problem you will have is on a larger scale application -- particularly where there is more than one developer involved, and you are fighting over the right to update a single source file. ActionForm beans in Struts can be stored in the user's session (this was the original design), but also as request attributes. This is particularly useful when the entire form is displayed on one page, and the page contains every property as either a hidden field or a visible field. In such cases, there is no need to keep the form bean instance around in between requests. At the end of the day, though, you have to have an incredibly small server for the performance issues like single object versus lots of objects matter very much. Even in those cases where it does make a difference, it is usually a lot cheaper to buy a little bit more hardware than it is to pay the developer cost of creating and maintaining an application architecture that does not scale, or is not as amenable to changes. For quick and dirty, one-off projects, go for the quickest possible development time and be done with it. For applications that are will have a large scope, lots of users, and/or lots of changes over time, pick an application architecture strategy that minimizes the overall cost, not the cost of the hardware. But beware -- many projects start out being of the first type (quick and dirty) and then find themselves growing into an application of the second type, where maintainability becomes very important :-). Craig
Re: Design question
Juan Gargiulo wrote: Craig, Thanks a lot for your answer. I think that I'm very close of defining the architecture for my application. Using action classes as adapters and session EJBs for business logic sounds good. Yep. Also using EJBs as actionforms is a good idea because they are a good target for object reuse. But it is not clear to me how do this. I don't see how struts is going to know how to get one of this EJB-actionforms from the context. How I specify the name of the home for the EJB-form to the action class (to the struts descriptor)? Actually, I do *not* believe it is a good idea to re-use an EJB as an ActionForm. In fact, this will be somewhat more difficult in 1.0, now that ActionForm is a class rather than an interface. The reasoning behind my belief goes like this: * An ActionForm is part of the view layer of MVC, not the model layer like an EJB (or a regular JavaBean that represents persistent data). * The sole purpose of an ActionForm is to maintain the state of all the input variables on a particular form, so that you can reproduce the form pre-filled-in if the user made an error that they need to fix. This matches the expectations of users who are used to GUI-based client server apps, that never make you retype any input except the stuff you did wrong. * Because of the above, the "domain" of an ActionForm does not necessarily match any existing EJBs or model layer JavaBeans. It is not uncommon to have inputs from a single form that will ultimately cause updates to more than one undelrying EJB or model bean. * Using a separate class for the ActionForm means you can change the underlying organization of your model beans or EJBs without impacting the view layer (although there might be modest impacts on the Action classes that copy things back and forth). * In addition, most EJBs and model beans have validation rules internally that prevent them from accepting semantically invalid data. Such rules would prevent you from accomplishing the primary purpose of an ActionForm -- storing all of the user's input fields, so that you can reproduce the input screen. * Also, if your form is multiple pages and you were using the real EJB, let's say you start updating properties based on receiving the first page. Now, you've potentially started locking resources in the underlying database -- and you have to deal with the fact that the user may never come back and finish this transaction. So, my bottom line recommendation is that you plan on building simple JavaBeans for your ActionForms. Most of the time, an ActionForm will have just getters and setters, with no error checking (other than a validate() method if you want to use it, plus the reset() method). PropertyUtils also has a convenience function that can copy properties with like names from your EJB to the ActionForm bean (or vice versa), to reduce the amount of tedious code that this approach implies. And, at some future point, it's reasonable to expect a development tool to be able to auto-generate ActionForm beans for you. Using an EJB as a bean that provides data values used in the presentation, on the other hand, is pretty easy. Just store the client-side instance you get back from the EJB server as a request attribute or session attribute -- from the perspective of the Struts custom tags, this EJB just looks like a JavaBean with getter methods, so they don't care that it is really an EJB. NOTE: If the EJBs are really on a remote server this could have some performance impact -- you might be better served to copy data into local beans in that case. Thanks, juan Craig
RE: Design question
Craig, My understanding from what you responded me about ActionForm being EJBs was wrong, sorry about that. However, your explanation in the last email was extremely useful. Thanks, juan -Original Message- From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] Sent: Friday, November 10, 2000 4:35 PM To: [EMAIL PROTECTED] Subject: Re: Design question Juan Gargiulo wrote: Craig, Thanks a lot for your answer. I think that I'm very close of defining the architecture for my application. Using action classes as adapters and session EJBs for business logic sounds good. Yep. Also using EJBs as actionforms is a good idea because they are a good target for object reuse. But it is not clear to me how do this. I don't see how struts is going to know how to get one of this EJB-actionforms from the context. How I specify the name of the home for the EJB-form to the action class (to the struts descriptor)? Actually, I do *not* believe it is a good idea to re-use an EJB as an ActionForm. In fact, this will be somewhat more difficult in 1.0, now that ActionForm is a class rather than an interface. The reasoning behind my belief goes like this: * An ActionForm is part of the view layer of MVC, not the model layer like an EJB (or a regular JavaBean that represents persistent data). * The sole purpose of an ActionForm is to maintain the state of all the input variables on a particular form, so that you can reproduce the form pre-filled-in if the user made an error that they need to fix. This matches the expectations of users who are used to GUI-based client server apps, that never make you retype any input except the stuff you did wrong. * Because of the above, the "domain" of an ActionForm does not necessarily match any existing EJBs or model layer JavaBeans. It is not uncommon to have inputs from a single form that will ultimately cause updates to more than one undelrying EJB or model bean. * Using a separate class for the ActionForm means you can change the underlying organization of your model beans or EJBs without impacting the view layer (although there might be modest impacts on the Action classes that copy things back and forth). * In addition, most EJBs and model beans have validation rules internally that prevent them from accepting semantically invalid data. Such rules would prevent you from accomplishing the primary purpose of an ActionForm -- storing all of the user's input fields, so that you can reproduce the input screen. * Also, if your form is multiple pages and you were using the real EJB, let's say you start updating properties based on receiving the first page. Now, you've potentially started locking resources in the underlying database -- and you have to deal with the fact that the user may never come back and finish this transaction. So, my bottom line recommendation is that you plan on building simple JavaBeans for your ActionForms. Most of the time, an ActionForm will have just getters and setters, with no error checking (other than a validate() method if you want to use it, plus the reset() method). PropertyUtils also has a convenience function that can copy properties with like names from your EJB to the ActionForm bean (or vice versa), to reduce the amount of tedious code that this approach implies. And, at some future point, it's reasonable to expect a development tool to be able to auto-generate ActionForm beans for you. Using an EJB as a bean that provides data values used in the presentation, on the other hand, is pretty easy. Just store the client-side instance you get back from the EJB server as a request attribute or session attribute -- from the perspective of the Struts custom tags, this EJB just looks like a JavaBean with getter methods, so they don't care that it is really an EJB. NOTE: If the EJBs are really on a remote server this could have some performance impact -- you might be better served to copy data into local beans in that case. Thanks, juan Craig
When will Struts 1.0 going to be released ?
Hi, We are quite interested to use Struts in our in-house project. It is a very nice MVC framework that separates business logic from the JSP page. Can I know when Struts 1.0 be released ? Regards, SiowBoon
Re: When will Struts 1.0 going to be released ?
My goal is to release a 1.0 version of Struts by the end of November. The last major new features for 1.0 are being added now, so this should be a feasible target. Craig Tan Siow Boon wrote: Hi, We are quite interested to use Struts in our in-house project. It is a very nice MVC framework that separates business logic from the JSP page. Can I know when Struts 1.0 be released ? Regards, SiowBoon