RE: Simple Java Doubts
alternatively make the singleton stateless. Then you pass in everything you need when the method is called. Everything is a local varible and so has no threading problems. -Original Message- From: Alex Paransky [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 6:41 PM To: Orion-Interest Subject: RE: Simple Java Doubts 1. Use synchronization with the synchronized keyword 2. Since a server cannot open an http port to the remote client, I don't think HTTP can be used from the server side to notify client of changes. Client would have to either: a. Use polling, by making http requests every so often b. Use persistent socket connection to the server c. Use open http request strategy to always keep an http request outstanding -AP_ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Santosh Kumar Sent: Tuesday, May 08, 2001 8:17 AM To: Orion-Interest Subject: Simple Java Doubts Question 1: How does an elementary Singleton pattern based Object behave in a multi-threaded environment? What is this phenomenon called? How do you make such a Singleton Object thread safe? Question 2: What are the two methods typically employed to notify remote clients distributed over the Internet of events that take place on a central server? Like changes in the price of options, market depth, or an order execution? What are the relative advantages/disadvantages of each of these strategies? Specifically, how can they be implemented in Java to allow for firewall tunneling over HTTP?
Re: Share sessions????
Suppose you could try to make your own session object and then issue the session object as a multipartrequest to the other app via POST method. But that is not what you want, but it might work. Just make sure the class file you use for datapassing is serializable and resides in orion/lib Johan - Original Message - From: Daniel Lopez [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 8:23 AM Subject: Re: Share sessions Hi Tomas, AFAIK, you can't do what you want to do, as sessions are not shared between different applications. When you try... disp=context.getRequestDispatcher(/app2/app2.jsp); disp.forward(request,response); from inside your app1 application, you are really forwarding to /app1/app2/app2.jsp, hence the 404 not found. And when you try sendRedirect(), you are asking the BROWSER to issue a call to the second page, and the browser knows nothing about server side sessions so that's why your attribute doesn't get through. Unless both jsp pertain to the same application, I don't know of any standard way of directly sharing objects between webapps. You might have to use something external. I guess the philosophy behind that is if they have to share, they should be part of the same webapp which can be seen, IMO, as a security feature and a limitation. As a non standard way of doing it, you might be able to use the parent attribute in the orion server.xml configuration (http://www.orionserver.com/docs/server.xml.html), but I'm not sure it allows you to do what you want to, as I have never used it. Does anyone know if there is a standard solution for this? regards, Dan Tomas Anderson wrote: Hello. I hope someone can help me with this basic question. I have 2 separate applications, app1 and app2. One jsp and one servlet in each. From the jsp I send some parameters to the servlet. I prosess them and put the answer in a session variable like this: servlet1.java: String strP1 = request.getParameter(param1); String strP2 = request.getParameter(param2); ... procsess them String strAnswer = strP1 + strP2; Get the session. session = request.getSession(true); Put a session variable. session.setAttribute(result, strAnswer); ... Now I want to send the session to the other application, app2, where the jsp file reads the session variable and displays it. jsp2.jsp: % String str = (String)session.getAttribute(result); out.println(result: + str); % I have put shared=true in both web-app tags. web-app application=App1 name=App1-web root=/app1 shared=true / web-app application=App2 name=App2-web root=/app2 shared=true / Ok. If I do in sevlet1.java: disp=context.getRequestDispatcher(/app2/app2.jsp); disp.forward(request,response); I get a: 404 Not Found... If I use sendRedirect(..,..) the session is not shared, it is empty. How can I connect the 2 applications? Did I miss andy configuration setting? And how to send the session to the other application. It seem setting shared=true means something else than I thought. Greatfull for any hint. Tomas
Re: Re: RE: Simple Java Doubts
Resistance is futile, you will be assimilated. Johan - Original Message - From: John Hogan [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 9:55 PM Subject: Re: Re: RE: Simple Java Doubts Santosh, Is the original disclaimer a secret plot to own all content on the orion list? Somehow doesn't seem appropriate. *** Disclaimer : The information contained and transmitted in this e-mail is confidential information, and is intended only for the named recipient to which it is addressed. The content of this e-mail may not have been sent with the authority of the company. If the reader of this message is not the named recipient or a person responsible for delivering it to the named recipient, you are notified that the review, dissemination, distribution, transmission, printing or copying, forwarding, or any other use of this message or any part of it, including any attachments, is strictly prohibited. If you have received this communication in error, please delete the e-mail and destroy all record of this communication. Thank you for your assistance. ** Begin Original Message From: John Hogan [EMAIL PROTECTED] Sent: Wed, 9 May 2001 08:03:18 -0400 To: Orion-Interest [EMAIL PROTECTED] Subject: Re: RE: Simple Java Doubts On response 2, if the remote client is actually a web server, the scheme will work nicely. No polling would be necessary, an http request would only be issued on event. John Hogan _ Get your free E-mail at http://www.ireland.com End Original Message _ Get your free E-mail at http://www.ireland.com
SV: Re: RE: Simple Java Doubts
Title: SV: Re: RE: Simple Java Doubts THEY just informed me that the Frog is leaping through tiny blue loops. SOMEONE tells me that the Bavarian Illuminati has teamed up with BORG and are involved in this affair in SOME WAY. Fnord! -Ursprungligt meddelande- Från: Johan Fredriksson [mailto:[EMAIL PROTECTED]] Skickat: den 10 maj 2001 01:03 Till: Orion-Interest Ämne: Re: Re: RE: Simple Java Doubts Resistance is futile, you will be assimilated. Johan - Original Message - From: John Hogan [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 9:55 PM Subject: Re: Re: RE: Simple Java Doubts Santosh, Is the original disclaimer a secret plot to own all content on the orion list? Somehow doesn't seem appropriate. *** Disclaimer : The information contained and transmitted in this e-mail is confidential information, and is intended only for the named recipient to which it is addressed. The content of this e-mail may not have been sent with the authority of the company. If the reader of this message is not the named recipient or a person responsible for delivering it to the named recipient, you are notified that the review, dissemination, distribution, transmission, printing or copying, forwarding, or any other use of this message or any part of it, including any attachments, is strictly prohibited. If you have received this communication in error, please delete the e-mail and destroy all record of this communication. Thank you for your assistance. ** Begin Original Message From: John Hogan [EMAIL PROTECTED] Sent: Wed, 9 May 2001 08:03:18 -0400 To: Orion-Interest [EMAIL PROTECTED] Subject: Re: RE: Simple Java Doubts On response 2, if the remote client is actually a web server, the scheme will work nicely. No polling would be necessary, an http request would only be issued on event. John Hogan _ Get your free E-mail at http://www.ireland.com End Original Message _ Get your free E-mail at http://www.ireland.com
Re: common practice for configuring orion app/web-site
I don't know what the others do, but we split different projects in different servers(orion instances), as we want to be able to stop/start applications without affecting the rest. Now that hot deployment is becoming a reality, we might start concentrating them using different applications inside the same container instance. As we use a proxy server in the port 80, the external URL will be exactly the same so no problem. Of course, in our case we prefer paying the extra step, the proxy, because our performance requirements are not too high. Just my 2ec, D. darl zero wrote: Hi, This might be sort of a newbie question or just a very general one. I tried looking through archives before posting but no luck, maybe someone has a quick anwser. I would like to know if most of you break up your projects into a lot of small apps and bind this to a web-site, or do most of you just pile all the apps into one big one.. so that there is only one application running on one default-web-site. -p
Re: BIG Problem with SSL
Not exactly. The shared=true attribute is designed for a SINGLE web app to be deployed to two DIFFERENT places, and be able to share session information. In other words, make sure the https://... pages and the http://... pages are within the same application, by mapping both URLs to point to the same web app, with shared=true for them both. That way, the session information will be shareable between the two views of the same application. Orion does not support shared sessions between different web applications. Regards, Dan. At 09:06 10/05/2001 +1000, you wrote: robert, check out the shared attribute of a web app in the orion docs. it's designed allow two different web apps to share sessions. i.e. in the appname-web-site.xml file, set web-site web-app shared=true/ /web-site for both the secure and non-secure apps. cheers, greg - Original Message - From: Robert S. Sfeir [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 5:19 AM Subject: BIG Problem with SSL When I setup SSL under Orion and I hit: http://www.domain.com then hit https://www.domain.com they both come up fine, but it looks like Orion is starting a new session!!! This is bad because if someone is logged in under https, it doesn't look like they're logged in when they're under the http server. Am I missing a setting with SSL or is this normal Orion behavior? Thanks for any prompt response you might have. R -- Dan North Support Team - Cadrion Consulting Ltd - +44 (0)20 7440 9550 CONFIDENTIALITY This e-mail and any attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose, or store or copy the information in any medium
RE: Re: RE: Simple Java Doubts
mama feeel ayyava?? -Original Message- From: Johan Fredriksson [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 1:33 PM To: Orion-Interest Subject: Re: Re: RE: Simple Java Doubts Resistance is futile, you will be assimilated. Johan - Original Message - From: John Hogan [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 9:55 PM Subject: Re: Re: RE: Simple Java Doubts Santosh, Is the original disclaimer a secret plot to own all content on the orion list? Somehow doesn't seem appropriate. *** Disclaimer : The information contained and transmitted in this e-mail is confidential information, and is intended only for the named recipient to which it is addressed. The content of this e-mail may not have been sent with the authority of the company. If the reader of this message is not the named recipient or a person responsible for delivering it to the named recipient, you are notified that the review, dissemination, distribution, transmission, printing or copying, forwarding, or any other use of this message or any part of it, including any attachments, is strictly prohibited. If you have received this communication in error, please delete the e-mail and destroy all record of this communication. Thank you for your assistance. ** Begin Original Message From: John Hogan [EMAIL PROTECTED] Sent: Wed, 9 May 2001 08:03:18 -0400 To: Orion-Interest [EMAIL PROTECTED] Subject: Re: RE: Simple Java Doubts On response 2, if the remote client is actually a web server, the scheme will work nicely. No polling would be necessary, an http request would only be issued on event. John Hogan _ Get your free E-mail at http://www.ireland.com End Original Message _ Get your free E-mail at http://www.ireland.com
Re: Simple Java Doubts
The force be with you...
RE: Re: RE: Simple Java Doubts
Title: SV: Re: RE: Simple Java Doubts That's an evil communist lie. Please report to the nearest termination center. The computer is your friend! -Original Message-From: Magnus Rydin [mailto:[EMAIL PROTECTED]]Sent: 10. mai 2001 10:41To: Orion-InterestSubject: SV: Re: RE: Simple Java Doubts THEY just "informed" me that the Frog is leaping through tiny blue loops. SOMEONE tells me that the Bavarian Illuminati has teamed up with BORG and are involved in this affair in SOME WAY. Fnord! -Ursprungligt meddelande- Från: Johan Fredriksson [mailto:[EMAIL PROTECTED]] Skickat: den 10 maj 2001 01:03 Till: Orion-Interest Ämne: Re: Re: RE: Simple Java DoubtsResistance is futile, you will be assimilated. Johan - Original Message - From: "John Hogan" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 9:55 PM Subject: Re: Re: RE: Simple Java Doubts Santosh, Is the original disclaimer a secret plot to own all content on the orion list? Somehow doesn't seem appropriate. *** Disclaimer : The information contained and transmitted in this e-mail is confidential information, and is intended only for the named recipient to which it is addressed. The content of this e-mail may not have been sent with the authority of the company. If the reader of this message is not the named recipient or a person responsible for delivering it to the named recipient, you are notified that the review, dissemination, distribution, transmission, printing or copying, forwarding, or any other use of this message or any part of it, including any attachments, is strictly prohibited. If you have received this communication in error, please delete the e-mail and destroy all record of this communication. Thank you for your assistance. ** Begin Original Message From: "John Hogan" [EMAIL PROTECTED] Sent: Wed, 9 May 2001 08:03:18 -0400 To: Orion-Interest [EMAIL PROTECTED] Subject: Re: RE: Simple Java Doubts On response 2, if the remote client is actually a web server, the scheme will work nicely. No polling would be necessary, an http request would only be issued on event. John Hogan _ Get your free E-mail at http://www.ireland.com End Original Message _ Get your free E-mail at http://www.ireland.com
RE: Fun with compound primary keys
Can someone explain this question to me? -Original Message- From: Tin Hoc Pt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 10, 2000 1:25 PM To: Orion-Interest Subject: RE: Fun with compound primary keys mkgjfkgjfkgnjkjgfgrfg
Truncated data
Why does MsSQL server complain about truncating data? com.jnetdirect.jsql.m: String or binary data would be truncated.at com.jnetdirect.jsql.af.a(Unknown Source)at com.jnetdirect.jsql.w.a(Unknown Source)at com.jnetdirect.jsql.w.a(Unknown Source)at com.jnetdirect.jsql.w.executeQuery(Unknown Source)at com.jnetdirect.jsql.z.executeQuery(Unknown Source)at com.evermind._oj.executeQuery(Unknown Source)at se.flowinteractive.aller.bean.ImageHandler.saveImage(ImageHandler.java:528)at __jspPage6_test_imgadmin_image_save_jsp._jspService(__jspPage6_test_imgadmin_image_save_jsp.java:74)at com.orionserver.http.OrionHttpJspPage.service(Unknown Source)at com.evermind._aj._nxd(Unknown Source)at com.evermind.server.http.JSPServlet.service(Unknown Source)at com.evermind._iib._vfd(Unknown Source)at com.evermind._iib._qjc(Unknown Source)at com.evermind._kj._qbc(Unknown Source)at com.evermind._kj._oa(Unknown Source)at com.evermind._jw.run(Unknown Source) I'm using a setString on a varchar(5) Is this not legal? (yes I know this is not orionspecific, and therefore I should not ask this question here, but there are a lot of bright people out there who might have ran into this before and can give me a quick solution.) Johan
RE: Fun with compound primary keys
I think it will become clearer when someone removes the gaffa tape from his mouth Something to do with EJB deployment is my guess. At 07:39 10/05/2001 -0500, you wrote: Can someone explain this question to me? -Original Message- From: Tin Hoc Pt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 10, 2000 1:25 PM To: Orion-Interest Subject: RE: Fun with compound primary keys mkgjfkgjfkgnjkjgfgrfg -- Dan North Development Team - Cadrion Consulting Ltd - +44 (0)20 7440 9550 CONFIDENTIALITY This e-mail and any attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose, or store or copy the information in any medium
Fw: Truncated data
My question is of course, is there a way to tell MsSQLserver that it is ok to truncate...? That was NOT clear in my email... Sorry about that. Johan - Original Message - From: Johan Fredriksson To: Orion-Interest Sent: Thursday, May 10, 2001 4:20 PM Subject: Truncated data Why does MsSQL server complain about truncating data? com.jnetdirect.jsql.m: String or binary data would be truncated.at com.jnetdirect.jsql.af.a(Unknown Source)at com.jnetdirect.jsql.w.a(Unknown Source)at com.jnetdirect.jsql.w.a(Unknown Source)at com.jnetdirect.jsql.w.executeQuery(Unknown Source)at com.jnetdirect.jsql.z.executeQuery(Unknown Source)at com.evermind._oj.executeQuery(Unknown Source)at se.flowinteractive.aller.bean.ImageHandler.saveImage(ImageHandler.java:528)at __jspPage6_test_imgadmin_image_save_jsp._jspService(__jspPage6_test_imgadmin_image_save_jsp.java:74)at com.orionserver.http.OrionHttpJspPage.service(Unknown Source)at com.evermind._aj._nxd(Unknown Source)at com.evermind.server.http.JSPServlet.service(Unknown Source)at com.evermind._iib._vfd(Unknown Source)at com.evermind._iib._qjc(Unknown Source)at com.evermind._kj._qbc(Unknown Source)at com.evermind._kj._oa(Unknown Source)at com.evermind._jw.run(Unknown Source) I'm using a setString on a varchar(5) Is this not legal? (yes I know this is not orionspecific, and therefore I should not ask this question here, but there are a lot of bright people out there who might have ran into this before and can give me a quick solution.) Johan
Crimson Crash
This popped up on about my third sever restart after upgrading to 1.4.8. Given Sun's interest in this event, I thought Magnus, et al, might also be interested. Ironically, the url below for advising sun returns an Internal server error :-) - A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL relocation target' has occurred in : 'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method. Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi Warning: Error reading transaction-log file (/C:/orion/persistence/transaction.state) for recovery: premature end of fileForced or abrubt (crash etc) server shutdown detected, starting recovery process...Recovery completed, 0 connections committed and 0 rolled back...Orion/1.4.8 initialized - Incidentally, I'm in the process of debugging a front servlet that does forwarding - no deiberate exploitation of Crimson's features. Hope I dont see this again :-( Bill.
Re: Re: RE: Simple Java Doubts
This is not a test. If you do not heed this warning, it may happen to you. This is not a test. On Thu, May 10, 2001 at 02:11:25PM +0200, [EMAIL PROTECTED] wrote: That's an evil communist lie. Please report to the nearest termination center. The computer is your friend! -Original Message- From: Magnus Rydin [mailto:[EMAIL PROTECTED]] Sent: 10. mai 2001 10:41 To: Orion-Interest Subject: SV: Re: RE: Simple Java Doubts THEY just informed me that the Frog is leaping through tiny blue loops. SOMEONE tells me that the Bavarian Illuminati has teamed up with BORG and are involved in this affair in SOME WAY. Fnord! -Ursprungligt meddelande- Fr?n: Johan Fredriksson [ mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] ] Skickat: den 10 maj 2001 01:03 Till: Orion-Interest ?mne: Re: Re: RE: Simple Java Doubts Resistance is futile, you will be assimilated. Johan - Original Message - From: John Hogan [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 9:55 PM Subject: Re: Re: RE: Simple Java Doubts Santosh, Is the original disclaimer a secret plot to own all content on the orion list? Somehow doesn't seem appropriate. *** Disclaimer : The information contained and transmitted in this e-mail is confidential information, and is intended only for the named recipient to which it is addressed. The content of this e-mail may not have been sent with the authority of the company. If the reader of this message is not the named recipient or a person responsible for delivering it to the named recipient, you are notified that the review, dissemination, distribution, transmission, printing or copying, forwarding, or any other use of this message or any part of it, including any attachments, is strictly prohibited. If you have received this communication in error, please delete the e-mail and destroy all record of this communication. Thank you for your assistance. ** Begin Original Message From: John Hogan [EMAIL PROTECTED] Sent: Wed, 9 May 2001 08:03:18 -0400 To: Orion-Interest [EMAIL PROTECTED] Subject: Re: RE: Simple Java Doubts On response 2, if the remote client is actually a web server, the scheme will work nicely. No polling would be necessary, an http request would only be issued on event. John Hogan _ Get your free E-mail at http://www.ireland.com http://www.ireland.com End Original Message _ Get your free E-mail at http://www.ireland.com http://www.ireland.com -- --- Joseph B. Ottinger [EMAIL PROTECTED] http://winter.ajacency.com/ IT Consultant
TO THE DEVELOPERS: java.net.SocketException: socket closed
java.net.SocketException: socket closed at java.net.PlainDatagramSocketImpl.receive(Native Method) at java.net.DatagramSocket.receive(DatagramSocket.java:392) at com.evermind.net.jc.ar0(JAX) at com.evermind.server.jms.ca.run(JAX) at java.lang.Thread.run(Thread.java:484) More: Using Win2k, Orion 1.4.5 (1.4.8), RMI clustering turned on. Explanation: My research points, that Orion is using one and the same port to multicast and receive multicasting messages. However, if one tries to close the sending socket, the receiving one is also closed (not in all 100% of the cases. Approximately that happens every 25%, something to do with the synchroinization I think). Conducting the following experiment: Server: An application that listens to MultiCast packets and prints them. Client: An application, that opens a multicast socketon the same port as the server is receiving on, and after sendin, closes the socket. If the client, and the server live on one and the same machine roughly every one of four receivings the server gets the SocketException. Basic solution: Don't close the sending socket, anyway you don't need to. Better solution: You don't have to send from the same port number. When creating the MultiCast socket just leave the port selection to the underlying software and hardware. Solution three: Use one socket for receiving, and another for sending. Leave port selection for the sending socket to the framework. Thus you have only one port reserved for sending (in sollution two you get a different port for every sending socket you create). Can't help more. No source :) BTW. I'm still curious how to cluster RMIs on a couple of Orions... Be well. Lachezar Dobrev May the shade of the tree strengthen you.
Re: Apache + Orion
Hi, you can find this file in the config directory of orion and the file name is default-web-site.xml, and just couple of lines. 1. Change the port that you mentioned in the httpd.conf 2. add this line, frontend host=id address of apache port = port number of apache / Subrah --- SERGEY VOROPAY [EMAIL PROTECTED] wrote: Could somebody please provide with a workable set of instructions on how to integrate orion and apache. I followed the instructions available on orionsupport.com and got the apache proxy part to work, but url rewriting is still not working. I'm also not quite clear where the web-site.xml file goes in this configuration. Your response is greatly appreciated. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
RE: Fun with compound primary keys
Clearly this is a cryptography problem. I have applied advanced cryptographic techniques to this message (a character shifting algorythm, actually) and decoded the message as follows: CIPHERTEXT mkgjfkgjfkgnjkjgfgrfg PLAIN TEXT: omilhjilhjipljlihithi Obviously. --- Dan North [EMAIL PROTECTED] wrote: I think it will become clearer when someone removes the gaffa tape from his mouth Something to do with EJB deployment is my guess. At 07:39 10/05/2001 -0500, you wrote: Can someone explain this question to me? -Original Message- From: Tin Hoc Pt [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 10, 2000 1:25 PM To: Orion-Interest Subject: RE: Fun with compound primary keys mkgjfkgjfkgnjkjgfgrfg = - Mr Lauren Commons A person of moderate zeal __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
does JSP request.getParameterNames() work in Orion 1.4.5?
I'm passing a parameter to a JSP via: jsp:include page=includedPage.jsp flush=true jsp:param name=test value=abc/ Yet in includedPage.jsp, request.getParameterNames() seems to be empty, and the following returns false: request.getParameterNames().hasMoreElements() Yet I can access parameters directly using, for example, request.getParameter(test). Does request.getParameterNames() work in Orion 1.4.5? Thanks, Garret
Re: Truncated data
Hi Johan. You are trying to squeeze too much data into one little field! Typically, this happens when you use the default deployment for a String field or similar for a bean which stores strings too long for the table. Check the default type mappings in [orion]/config/database-schemas/ms-sql.xml. You should see a line like: type-mapping type=java.lang.String name=nvarchar(50) / If you need a particular field to be wider than this, you have two options: 1) Change the figure here, but this will be a global change so it will affect all of your tables. 2) In the orion-ejb-jar.xml for your bean, add the line: cmp-field-mapping name=nameOfWideField persistence-type=nvarchar(100) / (or however wide you need) inside the appropriate entity-deployment tag. Then drop the table and redeploy the jar. This will change the mapping just for that field. Or in your setter code, you can check the length of the string and truncate it there if it is too long, or throw an exception. Cheers, Dan. At 16:20 10/05/2001 +0200, you wrote: Why does MsSQL server complain about truncating data? com.jnetdirect.jsql.m: String or binary data would be truncated. at com.jnetdirect.jsql.af.a(Unknown Source) at com.jnetdirect.jsql.w.a(Unknown Source) at com.jnetdirect.jsql.w.a(Unknown Source) at com.jnetdirect.jsql.w.executeQuery(Unknown Source) at com.jnetdirect.jsql.z.executeQuery(Unknown Source) at com.evermind._oj.executeQuery(Unknown Source) at se.flowinteractive.aller.bean.ImageHandler.saveImage(ImageHandler.java:528) at __jspPage6_test_imgadmin_image_save_jsp._jspService(__jspPage6_test_imgadmin_image_save_jsp.java:74) at com.orionserver.http.OrionHttpJspPage.service(Unknown Source) at com.evermind._aj._nxd(Unknown Source) at com.evermind.server.http.JSPServlet.service(Unknown Source) at com.evermind._iib._vfd(Unknown Source) at com.evermind._iib._qjc(Unknown Source) at com.evermind._kj._qbc(Unknown Source) at com.evermind._kj._oa(Unknown Source) at com.evermind._jw.run(Unknown Source) I'm using a setString on a varchar(5) Is this not legal? (yes I know this is not orionspecific, and therefore I should not ask this question here, but there are a lot of bright people out there who might have ran into this before and can give me a quick solution.) Johan -- Dan North Support Team - Cadrion Consulting Ltd - +44 (0)20 7440 9550 CONFIDENTIALITY This e-mail and any attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose, or store or copy the information in any medium
Re: does JSP request.getParameterNames() work in Orion 1.4.5?
Actually, request.getParameterNames() works fine -- I just realized I was modifying one page and testing another. However, I was using request.getParameterNames() to try to find the source of my *real* problem. My JSP parameters really look like this: jsp:include page=menubar.jsp flush=true jsp:param name=test1 value=abc/ jsp:param name=%=WebConstants.SELECTED_SECTION_PARAM_NAME% value=%=WebConstants.ABOUT_SECTION%/ jsp:param name=test2 value=def/ /jsp:include That is, I'm dynamically inluding a parameter name and its value. The request.getParameterNames() enumeration returns, in the following order, test2 and test1, not the middle parameter name which should be selectedSection. If I hard-code in selectedSection (but leave the value dynamically included), it works. Why? Garret - Original Message - From: Garret Wilson [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Thursday, May 10, 2001 9:48 AM Subject: does JSP request.getParameterNames() work in Orion 1.4.5? I'm passing a parameter to a JSP via: jsp:include page=includedPage.jsp flush=true jsp:param name=test value=abc/ Yet in includedPage.jsp, request.getParameterNames() seems to be empty, and the following returns false: request.getParameterNames().hasMoreElements() Yet I can access parameters directly using, for example, request.getParameter(test). Does request.getParameterNames() work in Orion 1.4.5? Thanks, Garret
Re: TO THE DEVELOPERS: java.net.SocketException: socket closed
I am not sure, but this may actually be a bug in the JVM. I say this becuase I documented a Socket bug three years ago that involved the closing of one side of a Socket connection. For example, in the UNIX RSH protocol, the Socket used in the protocol appears as stdio. In other words, stdin, stdout, and stderr (on a second socket). RSH is designed to run commands, and many UNIX commands use end of file (EOF) on stdin to signal the completion of processing. For instance, the cat program reads data from stdin, and writes the data to stdout, until it sees EOF on stdin. Thus, the RSH protocol can not run cat unless it can signal EOF on its stdout, which is the server-side program's (cat in this case) stdin. HOWEVER, the only way to signal EOF on a socket is to close the socket. Now, sockets have two sides, and you are able to close one side or the other, while continuing to use the other side. Thus, in theory, the RSH client program should be able to close its stdout (cat's stdin) to signal EOF, while continuing to read its stdin (cat's stdout) to read the output from cat. ALAS, when the client closes its stdout side of the Socket, the JVM actually closes BOTH sides of the socket connection, which is a bug. It prevents the client from reading cat's output! Supposedly, this bug was fixed in Java 1.3.1, but I have not had time to verify this. Thus, if you are not using the 1.3.1 JVM, you may want to try it to see if you get the same behavior. tim. java.net.SocketException: socket closed at java.net.PlainDatagramSocketImpl.receive(Native Method) at java.net.DatagramSocket.receive(DatagramSocket.java:392) at com.evermind.net.jc.ar0(JAX) at com.evermind.server.jms.ca.run(JAX) at java.lang.Thread.run(Thread.java:484) More: Using Win2k, Orion 1.4.5 (1.4.8), RMI clustering turned on. Explanation: My research points, that Orion is using one and the same port to multicast and receive multicasting messages. However, if one tries to close the sending socket, the receiving one is also closed (not in all 100% of the cases. Approximately that happens every 25%, something to do with the synchroinization I think).
RE: Crimson Crash
Bill, You should log this one at the Sun bug parade web site. The url is: http://developer.java.sun.com/developer/bugParade/index.jshtml They are interested in bugs with java and orion. I have one bug open now about rh 7.1 , 1.3.1rc2 and orion. This is a problem with your jdk. Regards, The elephantwalker -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill WinspurSent: Wednesday, May 09, 2001 8:14 AMTo: Orion-InterestSubject: Crimson Crash This popped up on about my third sever restart after upgrading to 1.4.8. Given Sun's interest in this event, I thought Magnus, et al, might also be interested. Ironically, the url below for advising sun returns an Internal server error :-) - A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL relocation target' has occurred in : 'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method. Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi Warning: Error reading transaction-log file (/C:/orion/persistence/transaction.state) for recovery: premature end of fileForced or abrubt (crash etc) server shutdown detected, starting recovery process...Recovery completed, 0 connections committed and 0 rolled back...Orion/1.4.8 initialized - Incidentally, I'm in the process of debugging a front servlet that does forwarding - no deiberate exploitation of Crimson's features. Hope I dont see this again :-( Bill.
ear file
I noticed that the cmb tutorials' indicate that Orion needs write access to the directory where an ear is located. Is this true? I thought that orion expanded the ear in the application-deployments directory, and therefore only needs read access to the ear file. Regards, the elephantwalker
RE: Username/password in principals.xml
I found it used for connecting to an EJB via a remote client. I'm not sure what other uses it may have. - Terrance Davis Software Engineer emWare, Inc. (801) 993-7224 [EMAIL PROTECTED] -Original Message- From: Chaya Ramanujam [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 12:55 PM To: Orion-Interest Subject: Username/password in principals.xml When I installed Orion, it prompted me for a username/password and I find this information listed in my principals.xml file - user username=admin password=admin descriptionThe default administrator/description group-membership group=users / group-membership group=guests / group-membership group=administrators / /user Is this username/password used to administer/configure the orion webserver? I find that I can start Orion/ change configuration parameters, shutdown Orion etc without ever needing to enter an username/password. When is this used and how? Is it used for remote shutdown/startup only? Thanks! --CR. _ Get your FREE download of MSN Explorer at http://explorer.msn.com
CLUSTERING PROBLEM FINALLY SOLVED!! web-module
With the help of Jeff Hubbach, we were finally able to get orion http clustering to work for all our applications, not just the default-web-app. So what was the problem?? A) Although the orion docs say otherwise, you MUST manually add the cluster-config / tag to the orion/application-deployments/myapp/myapp-web/orion-web.xml file. B)B was the main problem for us, since even before we got it working, we had manually added the cluster-config tag. What we were missing was the following tag in orion/config/application.xml: web-module id="myapp" path="../applications/myapp/" / None of us here have EVER read ANYTHING in the orion docs that say you must have an entry for your web app in config/application.xml. Where is config/application.xml mentioned in the orion primer??? Where is it mentioned in application-creation-howto.html??? It isn't!! I find the fact that this isn't mentioned in the docs cited above OR!! the docs for http clustering to be a horrible oversight on the part of the orion doc writers and orion authors. The fact we had to spend overs 2 weeks trying to solve thisproblem is absolutely horrible. They REALLY REALLY REALLY need to fully document the server PROPERLY!! before they addONE new feature. Anyways, thanks to everyone who helped us out, it was greatly appreciated. Michael N. ChristoffDeveloper, Eldan Software, Ltd.Toronto, Canadawww.eldan.com
Orion doesn't understand HEAD request
I was trying to use the HEAD request of HTTP I am expectingI will get only the header information of the request. But I am getting whole content of the request. There is no difference in serving GET request and HEAD request. Is this a bug in orion? I am using orion 1.4.8 on WinNT. Kesav Kumar Software Engineer Voquette, Inc. 650 356 3740 mailto:[EMAIL PROTECTED] http://www.voquette.com Voquette...Delivering Sound Information
Re: Serious problem with Orion transaction processing: multiple connecti
I would like to know if this issue has been resolved. I encountered the same problem with my application and would like to know if it is an orion bug or an error in my datasources configuration. Here is the run down: Same method in a session bean does this (simplified here): Contact contact = contactHome.create(contactData); contactHome.findByPrimaryKey(pk)// WORKS FINE contactHome.findByUsername(username) // Finder Exception Please let me know if there is a solution for this problem. - Eduardo Estefano Integrated Information Systems 480.317.8549
Re: Crimson Crash
FYI: Every time Orion starts up now, the previously posted message appears: --- A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL relocation target' has occurred in : 'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method. Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi --- Apart from this Orion seems to be doing what I expect it to do. Sun will be contacting me. Bill. - Original Message - From: Bill Winspur To: Orion-Interest Sent: Wednesday, May 09, 2001 9:13 AM Subject: Crimson Crash This popped up on about my third sever restart after upgrading to 1.4.8. Given Sun's interest in this event, I thought Magnus, et al, might also be interested. Ironically, the url below for advising sun returns an Internal server error :-) - A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL relocation target' has occurred in : 'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method. Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi Warning: Error reading transaction-log file (/C:/orion/persistence/transaction.state) for recovery: premature end of fileForced or abrubt (crash etc) server shutdown detected, starting recovery process...Recovery completed, 0 connections committed and 0 rolled back...Orion/1.4.8 initialized - Incidentally, I'm in the process of debugging a front servlet that does forwarding - no deiberate exploitation of Crimson's features. Hope I dont see this again :-( Bill.
Standar Template
I want to create a web app in which every page on the site has a standard header along the top and a standard menu along the left edge (a pretty standard thing). I came up with 2 ways of doing this: 1. Use a table tag and jsp:include tags on EVERY page: table tr tdjsp:include page=standardHeader.jsp//td /tr tr td colspan=2 table tr td valign=topjsp:include page=/menu.jsp //td td valign=top THIS IS WHERE THE PAGE-SPECIFIC CONTENT (i.e. the body)* /td /tr /table /td /tr /table 2. Invert the above solution to create one master template (or controller) and have the content page name passed in as a parameter. Here would be the master template-controller page: table tr tdjsp:include page=standardHeader.jsp//td /tr tr td colspan=2 table tr td valign=topjsp:include page=/menu.jsp //td td valign=top jsp:include page=%=request.getParameter(contentPage)% /* /td /tr /table /td /tr /table The key difference between these two architectures are best understood by looking at the 2 lines with the * at the end. Also, in option 2, there is only one copy of the above code. In option 1, there is one copy per content page Q1: Does anyone have any preference between options 1 and 2? Q2: Is there a better way of achieving this result? Q3: Do either have any negetive drawback I need to consider? (I will be converting an entire site) By the way, I'm currently achieving this effect VERY easily using good old client-side html frames. But due to popular demand, framse must go. Dave Ford Smart Soft - The Java Training Company http://www.smart-soft.com
SV: Serious problem with Orion transaction processing: multiple c onnecti
Title: SV: Serious problem with Orion transaction processing: multiple c onnecti What exactly seems to be the problem? -Ursprungligt meddelande- Från: Eduardo Estefano [mailto:[EMAIL PROTECTED]] Skickat: den 10 maj 2001 20:35 Till: Orion-Interest Ämne: Re: Serious problem with Orion transaction processing: multiple c onnecti I would like to know if this issue has been resolved. I encountered the same problem with my application and would like to know if it is an orion bug or an error in my datasources configuration. Here is the run down: Same method in a session bean does this (simplified here): Contact contact = contactHome.create(contactData); contactHome.findByPrimaryKey(pk) // WORKS FINE contactHome.findByUsername(username) // Finder Exception Please let me know if there is a solution for this problem. - Eduardo Estefano Integrated Information Systems 480.317.8549
Re: does JSP request.getParameterNames() work in Orion 1.4.5?
From reading the JSP 1.1 spec (Sec. 2.13.6.1, p. 69): jsp:param name=name value=value/ This action has two mandatory attributes: name and value. Name indicates the name of the parameter; value, which may be a request-time expression, indicates its value. It's not particularly clearly worded, but the implication seems to be that only the value can be computed at request time. The name has to be constant. Attila - Original Message - From: Garret Wilson [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Thursday, May 10, 2001 9:59 AM Subject: Re: does JSP request.getParameterNames() work in Orion 1.4.5? Actually, request.getParameterNames() works fine -- I just realized I was modifying one page and testing another. However, I was using request.getParameterNames() to try to find the source of my *real* problem. My JSP parameters really look like this: jsp:include page=menubar.jsp flush=true jsp:param name=test1 value=abc/ jsp:param name=%=WebConstants.SELECTED_SECTION_PARAM_NAME% value=%=WebConstants.ABOUT_SECTION%/ jsp:param name=test2 value=def/ /jsp:include That is, I'm dynamically inluding a parameter name and its value. The request.getParameterNames() enumeration returns, in the following order, test2 and test1, not the middle parameter name which should be selectedSection. If I hard-code in selectedSection (but leave the value dynamically included), it works. Why? Garret - Original Message - From: Garret Wilson [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Thursday, May 10, 2001 9:48 AM Subject: does JSP request.getParameterNames() work in Orion 1.4.5? I'm passing a parameter to a JSP via: jsp:include page=includedPage.jsp flush=true jsp:param name=test value=abc/ Yet in includedPage.jsp, request.getParameterNames() seems to be empty, and the following returns false: request.getParameterNames().hasMoreElements() Yet I can access parameters directly using, for example, request.getParameter(test). Does request.getParameterNames() work in Orion 1.4.5? Thanks, Garret
Which parser orion1.4.8 use?
Title: Which parser orion1.4.8 use? I found crimson.jar parser.jar xerces.jar xalan.jar out of them which parsers orion1.4.8 use for SAX and TRAX(XSL transformation)? Kesav Kumar Software Engineer Voquette, Inc. 650 356 3740 mailto:[EMAIL PROTECTED] http://www.voquette.com Voquette...Delivering Sound Information
RE: Standar Template
I've iterated through several solutions to this problem and can offer some advice: I started out using option 1 as you describe. I quickly noticed that *every* page contains the definition of the layout and look of the website. What if I wanted to put the navigation bar on the right instead of the left? I would have to modify *every single page* in my website. Yuck. My next step was to put the container code in separate head/foot JSP files and @include them like this: %@ include file=head_stuff.jsp % p My content /p %@ include file=foot_stuff.jsp % Which at least puts all the look and feel stuff in a handful of places. But my site has different templates for the logged in user vs the welcome/signup screens and a few other special cases as well. It quickly became a pain to keep track of all the different headers and footers, and in any case opening tags in one file and closing them in another really sucks. Yuck. Next step was option 2 as you describe. I created template_inside.jsp, template_outside.jsp, etc which contain all the layout structure and then include the appropriate content file based on a parameter. Since I'm using an MVC framework, this is pretty easy to do. This is the best option I've described so far, and it works. But it's not very sophisticated, and it doesn't make having multiple layers very easy. Fortunately I'm working on my own time, so now I'm moving on to the fourth generation of my website content: This sort of templating is where XSLT really shines. Rather than creating templating layers from the top down, XSLT allows you to start at the bottom and build up, successively transforming the input. Wrapping (in a layout template) is just one kind of transformation. Each step has no need to know anything specific about the previous step; it's all just based on transformation rules. I'm still near the bottom of the XSLT learning curve, but I'm already amazed at how powerful it is. It's also a lot easier to pick up than I had expected from first looking at a sample. The only problem with using XSLT in a web application is the lack of framework support. Cocoon did not make a favorable impression on me (to say the least). I wanted something that provides a simple MVC paradigm like WebWork or (not-so-simple) Struts but uses XSLT for the view templating. So I (and a friend) sat down and wrote it. Tomorrow we'll send out a link to the sourceforge site; we're still working on the documentation and examples. In summary: For a simple approach, Option 2 as you describe isn't bad. For (IMNSHO) a more elegant and powerful approach, it's worth looking into XSLT. Jeff Schnitzer [EMAIL PROTECTED] http://www.similarity.com (still using WebWork, but not for long :-) -Original Message- From: Dave Ford [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 12:17 PM To: Orion-Interest Cc: Dan Tharp Subject: Standar Template I want to create a web app in which every page on the site has a standard header along the top and a standard menu along the left edge (a pretty standard thing). I came up with 2 ways of doing this: 1. Use a table tag and jsp:include tags on EVERY page: table tr tdjsp:include page=standardHeader.jsp//td /tr tr td colspan=2 table tr td valign=topjsp:include page=/menu.jsp //td td valign=top THIS IS WHERE THE PAGE-SPECIFIC CONTENT (i.e. the body)* /td /tr /table /td /tr /table 2. Invert the above solution to create one master template (or controller) and have the content page name passed in as a parameter. Here would be the master template-controller page: table tr tdjsp:include page=standardHeader.jsp//td /tr tr td colspan=2 table tr td valign=topjsp:include page=/menu.jsp //td td valign=top jsp:include page=%=request.getParameter(contentPage)% /* /td /tr /table /td /tr /table The key difference between these two architectures are best understood by looking at the 2 lines with the * at the end. Also, in option 2, there is only one copy of the above code. In option 1, there is one copy per content page Q1: Does anyone have any preference between options 1 and 2? Q2: Is there a better way of achieving this result? Q3: Do either have any negetive drawback I need to consider? (I will be converting an entire site) By the way, I'm currently achieving this effect VERY easily using good old client-side html frames. But due to popular demand, framse must go. Dave Ford Smart Soft - The Java Training Company http://www.smart-soft.com
RE: Username/password in principals.xml
It is used for J2EE authentication. Changing the config files and starting / killing the server (without using admin.jar) is not done via J2EE stuff and therefore: no admin login needed. On Thursday, May 10, 2001 7:43 PM, Terrance Davis [SMTP:[EMAIL PROTECTED]] wrote: I found it used for connecting to an EJB via a remote client. I'm not sure what other uses it may have. - Terrance Davis Software Engineer emWare, Inc. (801) 993-7224 [EMAIL PROTECTED] -Original Message- From: Chaya Ramanujam [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 08, 2001 12:55 PM To: Orion-Interest Subject: Username/password in principals.xml When I installed Orion, it prompted me for a username/password and I find this information listed in my principals.xml file - user username=admin password=admin descriptionThe default administrator/description group-membership group=users / group-membership group=guests / group-membership group=administrators / /user Is this username/password used to administer/configure the orion webserver? I find that I can start Orion/ change configuration parameters, shutdown Orion etc without ever needing to enter an username/password. When is this used and how? Is it used for remote shutdown/startup only? Thanks! --CR. _ Get your FREE download of MSN Explorer at http://explorer.msn.com
findByAll() ... finding everything!
Greetings! I have created a finder method in a CMP managed bean. It searches by many fields, not quite all, but any one I would want to search by. What I was hoping to accomplish from this was being able to specify diffrent fields to search by. Here's what I mean... This is my search.jsp page: form name: input type=text name=name value=% city: input type=text name=city value=% state: input type=text name=state value=% input type=submit /form My search-results.jsp: myEjbHome.findAll(request.getParameter(name),.request.getParameter(state)); what this does is returns all records no matter what I enter into my form. I guess I am seeking a little guidance. If this is the best way to do what I am wishing, what could I check to see why it's failing? Or is there a better way of doing this? Thanks! Jeremy - [EMAIL PROTECTED]
RE: does JSP request.getParameterNames() work in Orion 1.4.5?
Title: RE: does JSP request.getParameterNames() work in Orion 1.4.5? Atilla Bodis wrote: From reading the JSP 1.1 spec (Sec. 2.13.6.1, p. 69): jsp:param name=name value=value/ This action has two mandatory attributes: name and value. Name indicates the name of the parameter; value, which may be a request-time expression, indicates its value. It's not particularly clearly worded, but the implication seems to be that only the value can be computed at request time. The name has to be constant. On page 58, it lists the attributes that are permitted to be dynamic. To quote: Most attributes in the actions defined in the JSP 1.1 specification have page translation-time semantics. The following attributes accept request-time attribute expressions: · The value and beanName attributes of jsp:setProperty (2.13.2). · The page attribute of jsp:include (2.13.4). · The page attribute of jsp:forward (2.13.5). · The value attribute of jsp:param (2.13.6). Robert. -- Duct tape is like the Force: it has a light side, a dark side, and it holds the universe together Robert Watkins [EMAIL PROTECTED] [EMAIL PROTECTED]
RE: Standar Template
Noo - XML/XSL is too slow / fugly to actually use day to day (IMHO) I'd advise you to check out SiteMesh - it's built for this exact purpose! http://www.opensymphony.com/sitemesh Quite simply you provide JSP based decorators which are mapped to URIs. Download and install the sample app, it's the only way to learn about it. $10 says you're using it within a week ;) -mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jeff Schnitzer Sent: Friday, May 11, 2001 7:12 AM To: Orion-Interest Subject: RE: Standar Template I've iterated through several solutions to this problem and can offer some advice: I started out using option 1 as you describe. I quickly noticed that *every* page contains the definition of the layout and look of the website. What if I wanted to put the navigation bar on the right instead of the left? I would have to modify *every single page* in my website. Yuck. My next step was to put the container code in separate head/foot JSP files and @include them like this: %@ include file=head_stuff.jsp % p My content /p %@ include file=foot_stuff.jsp % Which at least puts all the look and feel stuff in a handful of places. But my site has different templates for the logged in user vs the welcome/signup screens and a few other special cases as well. It quickly became a pain to keep track of all the different headers and footers, and in any case opening tags in one file and closing them in another really sucks. Yuck. Next step was option 2 as you describe. I created template_inside.jsp, template_outside.jsp, etc which contain all the layout structure and then include the appropriate content file based on a parameter. Since I'm using an MVC framework, this is pretty easy to do. This is the best option I've described so far, and it works. But it's not very sophisticated, and it doesn't make having multiple layers very easy. Fortunately I'm working on my own time, so now I'm moving on to the fourth generation of my website content: This sort of templating is where XSLT really shines. Rather than creating templating layers from the top down, XSLT allows you to start at the bottom and build up, successively transforming the input. Wrapping (in a layout template) is just one kind of transformation. Each step has no need to know anything specific about the previous step; it's all just based on transformation rules. I'm still near the bottom of the XSLT learning curve, but I'm already amazed at how powerful it is. It's also a lot easier to pick up than I had expected from first looking at a sample. The only problem with using XSLT in a web application is the lack of framework support. Cocoon did not make a favorable impression on me (to say the least). I wanted something that provides a simple MVC paradigm like WebWork or (not-so-simple) Struts but uses XSLT for the view templating. So I (and a friend) sat down and wrote it. Tomorrow we'll send out a link to the sourceforge site; we're still working on the documentation and examples. In summary: For a simple approach, Option 2 as you describe isn't bad. For (IMNSHO) a more elegant and powerful approach, it's worth looking into XSLT. Jeff Schnitzer [EMAIL PROTECTED] http://www.similarity.com (still using WebWork, but not for long :-) -Original Message- From: Dave Ford [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 12:17 PM To: Orion-Interest Cc: Dan Tharp Subject: Standar Template I want to create a web app in which every page on the site has a standard header along the top and a standard menu along the left edge (a pretty standard thing). I came up with 2 ways of doing this: 1. Use a table tag and jsp:include tags on EVERY page: table tr tdjsp:include page=standardHeader.jsp//td /tr tr td colspan=2 table tr td valign=topjsp:include page=/menu.jsp //td td valign=top THIS IS WHERE THE PAGE-SPECIFIC CONTENT (i.e. the body)* /td /tr /table /td /tr /table 2. Invert the above solution to create one master template (or controller) and have the content page name passed in as a parameter. Here would be the master template-controller page: table tr tdjsp:include page=standardHeader.jsp//td /tr tr td colspan=2 table tr td valign=topjsp:include page=/menu.jsp //td td valign=top jsp:include page=%=request.getParameter(contentPage)% /* /td /tr /table /td /tr /table The key difference between these two architectures are best understood by looking at the 2 lines with the * at the end. Also, in option 2, there is only one copy of the above code. In option 1, there is one copy per content page
Re: Standar Template
Dan, Take a look at this article: http://developer.java.sun.com/developer/technicalArticles/javaserverpages/js p_templates/ I think it provides a solution you should consider. I've built my own version of the taglib (I wanted default values for the parameters) and it works well. Regards, Gordon. -Original Message- From: Dave Ford [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 10, 2001 12:17 PM To: Orion-Interest Cc: Dan Tharp Subject: Standar Template I want to create a web app in which every page on the site has a standard header along the top and a standard menu along the left edge (a pretty standard thing). I came up with 2 ways of doing this: 1. Use a table tag and jsp:include tags on EVERY page: table tr tdjsp:include page=standardHeader.jsp//td /tr tr td colspan=2 table tr td valign=topjsp:include page=/menu.jsp //td td valign=top THIS IS WHERE THE PAGE-SPECIFIC CONTENT (i.e. the body)* /td /tr /table /td /tr /table 2. Invert the above solution to create one master template (or controller) and have the content page name passed in as a parameter. Here would be the master template-controller page: table tr tdjsp:include page=standardHeader.jsp//td /tr tr td colspan=2 table tr td valign=topjsp:include page=/menu.jsp //td td valign=top jsp:include page=%=request.getParameter(contentPage)% /* /td /tr /table /td /tr /table The key difference between these two architectures are best understood by looking at the 2 lines with the * at the end. Also, in option 2, there is only one copy of the above code. In option 1, there is one copy per content page Q1: Does anyone have any preference between options 1 and 2? Q2: Is there a better way of achieving this result? Q3: Do either have any negetive drawback I need to consider? (I will be converting an entire site) By the way, I'm currently achieving this effect VERY easily using good old client-side html frames. But due to popular demand, framse must go. Dave Ford Smart Soft - The Java Training Company http://www.smart-soft.com
FW: Caching XLS style sheets
-Original Message-From: Ted R. Rice Sent: Wednesday, May 09, 2001 8:15 AMTo: 'Orion-Interest'Subject: RE: Caching XLS style sheets in actuality, caching pre-compiled stylesheets and then using them repeatedly is very possible and you will see large performance gains via this mechanism. in terms of applying the XSL, the general model is to create JSP Pages which produce XML content and have this content either be handled by a JSP Tag Extension, which you place inside the JSP Page, or a Servlet set up as content filter for all XML Content. The Servlet method is only available in spec 2.3 However, regardless of the implementation, caching can be performed by static cache shared across all instances of your object. When a JSP Page is processed, you can generate a unique key for this page based upon the servletPath(i.e., request.getServletPath()) and user-Agent header in the request (only applicable if applying different XSL stylesheets for different browser agents). Once you exctract the appropriate XSL Stylesheet from the XML and compile it, you can cache the compiled version using the generated key. In our case what we cache is a Saxon TransformManager. Then, using the dynamic content generated by the JSP Page, you can always look up and apply the pre-compiled style-sheet for the unique JSP Page - Browser Agent combination. Please note, the stylesheet is compiled and cached in a lazy manner, meaning it is done the first time a request for a particular stylesheet is made. This could easily be retrofitted to build all needed stylesheets at startup. hope that helps. Ted -Original Message-From: Vic Cekvenich [mailto:[EMAIL PROTECTED]]Sent: Sunday, May 06, 2001 5:55 PMTo: Orion-InterestSubject: Caching XLS style sheets I asked a question on an MVC application architecture using XLS, and got advice to cache XLS / XSLT style sheets, and pre compile them. Can someone give me some more background on this. How? What if the content is dynamic? (2 million items and 100,000 of styles + with any combination) Thanks in advance, Vic
Re: common practice for configuring orion app/web-site
I prefer to do lots of little apps tied togoether by the data they share in an enterprise database (I'll admit the term enterprise database is optimistic but I've just done two years at a client who started his IT shop from scratch, so I'm spoiled). The many apps to one db patttern was practical, even pre-j2ee, and I find the the servlet/jsp/jdbc paradigm conceptually covers that pattern and allows better implementation patterns (eg front servlet) in the middle tier. I'm just getting into ejbs and expect to share them between web-tier apps. Discussion on this list indicates that it can be done, using orion. Thus, in the ideal world, I expect to develop lots of little apps using fewer ejbs against very few enterprise databases. Unless there are technology constraints I dont know about, I will DEFINITELY NOT go down the path of one humongous app. That way lies maintenance madness. Much better to learn techniques for efficiently sharing extensions, ejbs, database, etc. in a deliberately modular way. My 2c Bill. - Original Message - From: darl zero [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 2:42 PM Subject: common practice for configuring orion app/web-site Hi, This might be sort of a newbie question or just a very general one. I tried looking through archives before posting but no luck, maybe someone has a quick anwser. I would like to know if most of you break up your projects into a lot of small apps and bind this to a web-site, or do most of you just pile all the apps into one big one.. so that there is only one application running on one default-web-site. -p __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/