Re: El Capitan - setting java timezone

2015-10-26 Thread Adalbert Winkler

you could set up a (default) timezone at app startup

if (System.getProperty("user.timezone") == null) {
System.setProperty("user.timezone", "EST");
}

Am 23.10.15 um 22:24 schrieb Calven Eggert:
I’ve been working on a new install of El Capitan.  I found a problem 
with running the app inside Eclipse until it was discovered that the 
java timezone was not set and therefore, not allowing a connection to 
the database.  This was fixed by adding an argument to the Run 
Configuration “-Duser.timezone=EST”.


After building my .woa using the “WOLips Ant Tools/Install”, the 
application cannot connect to a database.  it’s the same problem 
because if I type:


./APPNAME -Duser.timezone=EST

the application works as expected. Does anyone know how to set the 
timezone in eclipse so that I don’t need to add the parameter on the 
command line??


Calven





  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/adalbert%40helios.de

This email sent to adalb...@helios.de


--
Best Regards,

Adalbert Winkler


--
HELIOS Software GmbH
Adalbert Winkler
Steinriede 3
30827 Garbsen
Germany

Phone:  05131 709320
Fax:05131 709325
E-Mail: adalb...@helios.de

 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: best way to create date/time

2013-01-17 Thread Adalbert Winkler



Calendar cal = cal.getInstance(your timezone);
or
Calendar cal = cal.getInstance(); // default time zone

cal.set(Calendar.HOUR_OF_DAY, 9 );

NSTimestamp n = new NSTimestamp(cal.getTime());

Regards, Adalbert

On 17.01.13 15:48, Theodore Petrosky wrote:

What is the best way to create today's day at 9:00

new NSTimestamp() will give me today and the time is at the moment of creation. 
so the end result I want is (regardless of when in the day I create it):

new Timestamp(today at 9am);
2013-01-17 09:00 Etc/GMT

I am doing it rather convolutedly. Maybe there is a simple WO way.

Ted
  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/adalbert%40helios.de

This email sent to adalb...@helios.de


___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Rewrite WO app URL

2012-09-11 Thread Adalbert Winkler

Try it with WOAdaptorURL


On 11.09.12 11:09, Raymond NANEON wrote:

Hi List,

I want to rewrite my new app url 
*http://myserver/cgi-bin/WebObjects/myapp* to *http::/myserver/myapp*. 
Which parameter can I use in properties file to change it?


Thanks for your help.
Envoyé depuis iCloud


  ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/adalbert%40helios.de

This email sent to adalb...@helios.de


 ___
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list  (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Rewrite WO app URL

2012-09-11 Thread Adalbert Winkler
And if you use DirectConnect you can change you application url with the 
WOAdaptorURL Property.


Example:
..
   public static void main(String argv[]) {
...
if (System.getProperty(WOAdaptorURL) == null)
System.setProperty(WOAdaptorURL, http://localhost/newname;);
...

would turn your url  from

http://myserver/cgi-bin/WebObjects/myapp

to

http://myserver/newname/myapp




On 11.09.12 17:08, Pascal Robert wrote:

Le 2012-09-11 à 10:56, Raymond NANEON rnan...@me.com a écrit :


Hi Pascal,

I tried all possibilities but nothing work :(

apache.conf

LoadModule rewrite_module modules/mod_rewrite.so
LoadModule WebObjects_module modules/mod_WebObjects.so

...

RewriteEngine On
RewriteRule ^/Students(.*)$ /cgi-bin/WebObjects/Dossier-Etudiants.woa/wa$1 
[PT,L]

httpd.conf


LoadModule rewrite_module modules/mod_rewrite.so
LoadModule WebObjects_module modules/mod_WebObjects.so

webobjects.conf

LoadModule rewrite_module modules/mod_rewrite.so
LoadModule WebObjects_module modules/mod_WebObjects.so

...

RewriteEngine On
RewriteRule ^/Students(.*)$ /cgi-bin/WebObjects/Dossier-Etudiants.woa/wa$1 
[PT,L]


Result : 
http://agecanonix-form.utt.fr:43836/Students/myDefault/Dossier/Dossier/Dossier/Dossier/Dossier-Etudiants.woa/wa/myDefault


And you are 100% sure that you are not using direct connect and that the app is 
running with Apache, wotaskd and the adaptor?
=== I don't know it the server is using direct connect. I know if we turn off 
wotaskd, all apps continue to work. How can I configue my app to run with apache?

If you can access the app without the app 
(http://agecanonix-form.utt.fr/cgi-bin/WebObjects/Dossier-Etudiants.woa), 
Apache and wotaskd are taking care of it. If you can only access it by a 
special port, it's running on direct connect...


Thank
Envoyé depuis iCloud

Le 11 sep 2012 à 05:30, Pascal Robert prob...@macti.ca a écrit :


Le 2012-09-11 à 08:27, Raymond NANEON rnan...@me.com a écrit :


Hi Pascal,

I do all changes but nothing works for me. Do you load mod_rewrite.so in your 
apache conf?

Well, yes or it will not work… And it have to be loaded before the WebObjects 
module.


apache.conf :

RewriteRule ^/Students(.*)$ /cgi-bin/WebObjects/Dossier-Etudiants.woa/wa$1 
[PT,L]

Properties :

er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/Dossier-Etudiants.woa/wa
er.extensions.ERXApplication.replaceApplicationPath.replace=/Students

DirectAction.java :

public WOActionResults myDefaultAction() {
if (useCasService())
return loginCASPage();
else
return loginNoCasPage(null);
}

Result : 
http://agecanonix-form.utt.fr:40840/Students/myDefault/Dossier/Dossier/Dossier/Dossier-Etudiants.woa/wa/myDefault

And you are 100% sure that you are not using direct connect and that the app is 
running with Apache, wotaskd and the adaptor?


Envoyé depuis iCloud

Le 11 sep 2012 à 05:04, Pascal Robert prob...@macti.ca a écrit :


Le 2012-09-11 à 07:52, Raymond NANEON rnan...@me.com a écrit :


Hi Pascal,

I followed the wocommunity slide but It doesn't work :

Application.java

public String _rewriteURL(String url){
String processedURL = url;
if(url != null  _replaceApplicationPathPattern != null  
_replaceApplicationPathReplace != null){
processedURL = processedURL.replaceFirst(_replaceApplicationPathPattern, 
_replaceApplicationPathReplace);
}
return processedURL;
}

Apache.conf

RewriteEngine On
RewriteRule ^/Profil(.*)$ /cgi-bin/WebObjects/Dossier-Etudiants.woa/wa$1 [PT,L]

Properties file

er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/Dossier-Etudiants.woa
er.extensions.ERXApplication.replaceApplicationPath.replace=/Profil

In result I have this url : 
http://imac-cedre.utt.fr:1242/Profil/wa/myDefault/Dossier/Dossier/Dossier/Dossier/Dossier-Etudiants.woa/wa/myDefault
 instead of it : http://imac-cedre.utt.fr:1242/Profil

Your rules doesn't match. In Apache you say Dossier-Etudiants.woa/wa but in the 
properties you didn't put the /wa …

For WOCommunity.org, I use:

RewriteRule ^/page(.*)$ /apps/WebObjects/WOCommunityPublic.woa/wa$1 [PT,L]

Properties:

er.extensions.ERXApplication.replaceApplicationPath.pattern=/apps/WebObjects/WOCommunityPublic.woa/wa
er.extensions.ERXApplication.replaceApplicationPath.replace=/page

So everything matches. And the rewriting won't work with direct connect...


What am I doing wrong?

thanks
Envoyé depuis iCloud

Le 11 sep 2012 à 02:33, Raymond NANEON rnan...@me.com a écrit :


Thanks to Pascal and Adalbert for them reactivity. I go to see wocommunity 
slide to fix my problem.

Ray
Envoyé depuis iCloud

Le 11 sep 2012 à 02:20, Pascal Robert prob...@macti.ca a écrit :


http://fr.slideshare.net/wocommunity/errest (page 32)

http://fr.slideshare.net/wocommunity/hidden-treasures-in-project-wonder (page 
13)

http://wiki.wocommunity.org/display/documentation/Configuring+Apache+for+WebObjects


Hi List,

I want to rewrite my new app url http://myserver/cgi-bin/WebObjects/myapp to