RE: Another Locale problem
Hello, What version of struts do you use? If you use the 0.5 version of struts, you have to store the locale key in your session, like this "% if (session.getAttribute(Action.LOCALE_KEY) == null) session.setAttribute(Action.LOCALE_KEY, request.getLocale()); %" This worked fine for me. Later versions of struts allow you doing this by setting the locale parameter of the controller servlet, like this: init-param param-namelocale/param-name param-valuetrue/param-value /init-param Arjan Kok. -Original Message- From: Laufer, Michael [mailto:[EMAIL PROTECTED]] Sent: Monday, November 13, 2000 5:31 PM To: 'Struts' Subject: Another Locale problem Hi, I've just looked through the mail-archieve of this mailing-list to find a solution for my problem, but I still haven't figured out the solution ... I'm running web-applications with Struts and Tomcat. Now I wanted to use diffeent resource bundles for different languages exactly the way it is described in the user's guide. But my browser just doesn't handle it correctly. E.G. the default ressource bundle is called ApplicationResources.properties (which is set through the web.xml file of the webapplication, am I right??) and I store different ApplicationResources_XX.properties files in the same directory. fr for France, ge for Germany and so on ... But my browsers just display the files the language od the default properties file or when I adjusted the browser to German the German properties. I just haven't figured out, what to do to see for example the French version. So why am I only able to see default or German ??? I'm using German versions for my browser, but as I understood it, that shouldn't matter, or ?? I've thought it depends on the adjusted languages in preferences of the browser ?? If not I'm getting something terribly wrong. Any help would be appreciated. Thanks in advance, Mike
RE: Get the whole picture of Struts
Title: RE: Get the whole picture of Struts I too would be interested in seeing what Johnny is looking for. If anyone manages to create/find something, please post your work here. Thanks! --shawn -Original Message- From: Johnny Yu [mailto:[EMAIL PROTECTED]] Sent: Monday, November 13, 2000 10:03 PM To: [EMAIL PROTECTED] Subject: Get the whole picture of Struts All, How can I get the WHOLE picture of struts? eg. the Class diagram. I'd like make the architecture of Struts as a reference while building our own web application framework. I tried to REVERSE the source code into a Class Diagram with Rose, but get a lot errors like: Error Resolving qualified name TagSupport occurred in File D:\. . Is there anyone who had tried the same procedure? Or Is there any other means to get the Whole pricture and a more detail instruction on struts? the users_guide.html is not enough I think. thanks. Johnny
RE: Get the whole picture of Struts
Title: RE: Get the whole picture of Struts Sorry, I thought that I had turned HTML off... --shawn -Original Message- From: McKisson, Shawn [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 14, 2000 6:59 AM To: '[EMAIL PROTECTED]' Subject: RE: Get the whole picture of Struts I too would be interested in seeing what Johnny is looking for. If anyone manages to create/find something, please post your work here. Thanks! --shawn -Original Message- From: Johnny Yu [mailto:[EMAIL PROTECTED]] Sent: Monday, November 13, 2000 10:03 PM To: [EMAIL PROTECTED] Subject: Get the whole picture of Struts All, How can I get the WHOLE picture of struts? eg. the Class diagram. I'd like make the architecture of Struts as a reference while building our own web application framework. I tried to REVERSE the source code into a Class Diagram with Rose, but get a lot errors like: Error Resolving qualified name TagSupport occurred in File D:\. . Is there anyone who had tried the same procedure? Or Is there any other means to get the Whole pricture and a more detail instruction on struts? the users_guide.html is not enough I think. thanks. Johnny
RE: Get the whole picture of Struts
Try TogetherSoft's TogetherJ - this is much better than Rose for this sort of thing. I think you can download a trial version at their website which should have enough functionality enabled to allow you to do this (although I think printing is disabled). http://www.togethersoft.com/ Neil Houghton. -Original Message- From: Johnny Yu [mailto:[EMAIL PROTECTED]] Sent: 14 November 2000 04:03 To: [EMAIL PROTECTED] Subject: Get the whole picture of Struts All, How can I get the WHOLE picture of struts? eg. the Class diagram. I'd like make the architecture of Struts as a reference while building our own web application framework. I tried to REVERSE the source code into a Class Diagram with Rose, but get a lot errors like: "Error Resolving qualified name TagSupport occurred in File D:\." . Is there anyone who had tried the same procedure? Or Is there any other means to get the Whole pricture and a more detail instruction on struts? the users_guide.html is not enough I think. thanks. Johnny
Re: Get the whole picture of Struts
I've reverse engineered the action package of the struts in TogetherJ and generated the docs. You can get it at my web site: http://home1.gte.net/pfeiffer/struts-docs/struts-docs.zip It does require some form of java on the browser. It works in both netscape 4.x and IE 5.x. Bill Pfeiffer - Original Message - From: "Houghton,Neil" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 14, 2000 8:20 AM Subject: RE: Get the whole picture of Struts Try TogetherSoft's TogetherJ - this is much better than Rose for this sort of thing. I think you can download a trial version at their website which should have enough functionality enabled to allow you to do this (although I think printing is disabled). http://www.togethersoft.com/ Neil Houghton. -Original Message- From: Johnny Yu [mailto:[EMAIL PROTECTED]] Sent: 14 November 2000 04:03 To: [EMAIL PROTECTED] Subject: Get the whole picture of Struts All, How can I get the WHOLE picture of struts? eg. the Class diagram. I'd like make the architecture of Struts as a reference while building our own web application framework. I tried to REVERSE the source code into a Class Diagram with Rose, but get a lot errors like: "Error Resolving qualified name TagSupport occurred in File D:\." . Is there anyone who had tried the same procedure? Or Is there any other means to get the Whole pricture and a more detail instruction on struts? the users_guide.html is not enough I think. thanks. Johnny
Architecture question: Beans and application-level resources
Hi all, I'm fairly new to Servlets/JSP/Struts and I'm trying to set up a basic generic framework that I can use to build webapps on. The MVC pattern makes a lot of sense to me and Struts seems to be a very well thought out implementation, but I have a question regarding application architecture. One of the great advantages of server-side java is that some resources can be shared at the application level, as an example I have a servlet which loads on startup and instantiates a connection pool class and stores it in the application space. My question is: if I forward my requests to non-servlet beans (through Action classes, in this case) for business-logic processing, how can I make those application-level resources (or Session-level resources) available to beans further on down the chain? Is possible/advisable to pass a reference to the ServletContext down the line? I am very interested to know what you think, and I would very much appreciate any articles or tutorials which have examples of dealing with this subject. Cheers, *** Mac Ferguson, 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: Architecture question: Beans and application-level resources
I can think of 3 arhcitectual choices here: 1. Use the architecture set up for the action classes, which provides the request, and get the ServletContext. If you've stored your connection pool info here, you can get at it. Downside is, you mix you business logic with your action classes knowledge of the ServletContext. This can be ok for trivial app logic. 2. Obtain your connection in the action class and pass it into your business objects (beans). Your business object need only know that it is getting a connection, NOT where it came from. I think this approach is best for larger scale apps. The action object talks to the business object at a high level. Your business objects stay concerned with the business, not the context. 3. Write your connection pooling as a singleton. Your business object can then get at it directly via the class itself. Again your business object is only aware of the business, but this is a little too close to a global variable for me. Puts your business object into the business of being aware of the singleton class(this is still a context, just not the same as a ServletContext). I'm sure there are more approaches; these are my initial thoughts based on work I've done already. HTH, Bill Pfeiffer - Original Message - From: "Malcolm Ferguson" [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, November 14, 2000 11:57 AM Subject: Architecture question: Beans and application-level resources Hi all, I'm fairly new to Servlets/JSP/Struts and I'm trying to set up a basic generic framework that I can use to build webapps on. The MVC pattern makes a lot of sense to me and Struts seems to be a very well thought out implementation, but I have a question regarding application architecture. One of the great advantages of server-side java is that some resources can be shared at the application level, as an example I have a servlet which loads on startup and instantiates a connection pool class and stores it in the application space. My question is: if I forward my requests to non-servlet beans (through Action classes, in this case) for business-logic processing, how can I make those application-level resources (or Session-level resources) available to beans further on down the chain? Is possible/advisable to pass a reference to the ServletContext down the line? I am very interested to know what you think, and I would very much appreciate any articles or tutorials which have examples of dealing with this subject. Cheers, *** Mac Ferguson, 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: *.jsp back door issue
Joel Schneider wrote: Description of Problem: A typical Struts based web site might be configured to have requests matching the pattern"*.do" sent to the ActionServlet. After a request is handled by its Action class, processing is typically forwarded to a .jsp page. However, it's also possible for users to directly request a .jsp page. When this happens, the JSP container (in my case, Orion) will process the .jsp page without any involvement by the ActionServlet. Some .jsp pages may yield unexpected results when called in this manner. Put those JSP pages in a directory under WEB-INF; for example, WEB-INF/jsp. Files under the WEB-INF directory cannot be directly accessed. david
struts form tag and submit()
Hi, Can someone confirm or deny for me whether or not I should be able to submit a form built by a struts form tag using a javascript document.formname.submit() command? It *looks* like it ought to work, but the attempt gives me a browser error saying "object doesn't support this property or method". Other properties of the form seem to be available as with any other form. I'm using IE5.0 and Struts 0.5. Couldn't find anything in the archives... Thanks! George Phillips University of Miami Information Technology 1365 Memorial Drive Rm. 202-H Coral Gables, FL 33146 Phone: 305-284-5143 Email: [EMAIL PROTECTED]
Re: *.jsp back door issue
On Tue, 14 Nov 2000, David Geary wrote: Joel Schneider wrote: Description of Problem: A typical Struts based web site might be configured to have requests matching the pattern"*.do" sent to the ActionServlet. After a request is handled by its Action class, processing is typically forwarded to a .jsp page. However, it's also possible for users to directly request a .jsp page. When this happens, the JSP container (in my case, Orion) will process the .jsp page without any involvement by the ActionServlet. Some .jsp pages may yield unexpected results when called in this manner. Put those JSP pages in a directory under WEB-INF; for example, WEB-INF/jsp. Files under the WEB-INF directory cannot be directly accessed. david Thanks for the excellent tip!! Joel