Easy way of getting basic AUTH username and password from the request.

2014-04-14 Thread Klaus Berkling


I manually implemented this in an app a while ago and thought it may make a 
good addition to Wonder:

Added code that gets username and password from the HTTP header if an…

Suppose this goes along with it:

Added code that set the auth realm which causes a 401 status and WWW-…

Here is a small sample app to go with it:

BasicAuthExample



kib

"We keep moving forward, opening new doors, and doing new things, because we're 
curious and curiosity keeps leading us down new paths."
Walt Disney

Klaus Berkling
www.berkling.us | @kiberkli | Buy My iPhone app 





smime.p7s
Description: S/MIME cryptographic signature
 ___
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: ERXApplication.replaceApplicationPath doesn't work

2014-04-14 Thread George Domurot
It looks right.

Breakpoint/log Application._rewriteURL to see what’s up.

-G



On Apr 14, 2014, at 4:56 PM, Christoph Wick  wrote:

> Hi list,
> 
> in one of my applications, ERXApplication.replaceApplicationPath doesn't work.
> 
> As usual, I wrote into my Properties file:
> 
> er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/ProPilotsMgmtApp.woa
> er.extensions.ERXApplication.replaceApplicationPath.replace=/ProPilotsManagementApp
> 
> The values are read, as the startup log shows:
> 
>>  ...
>>  er.extensions.ERPrototypes.hasLocalization=false
>>  
>> er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/ProPilotsMgmtApp.woa
>>  
>> er.extensions.ERXApplication.replaceApplicationPath.replace=/ProPilotsManagementApp
>>  er.extensions.ERXComponentActionRedirector.enabled=false
>>  ...
> 
> But the WO-generated HTML contains always the 
> "/cgi-bin/WebObjects/ProPilotsMgmtApp.woa".
> 
> Has anyone an idea what could make the replacements not working?
> 
> I have no glue where to look further ...
> 
> C.U.CW
> 
> P.S.: Apache rewrite rules work. 
> -- 
> What are the three enemies of a programmer? Sunlight, oxygen, and the 
> appalling roar of the birds.
> 
> ___
> 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/mastermind%40knuckleheads.net
> 
> This email sent to masterm...@knuckleheads.net


 ___
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

ERXApplication.replaceApplicationPath doesn't work

2014-04-14 Thread Christoph Wick
Hi list,

in one of my applications, ERXApplication.replaceApplicationPath doesn't work.

As usual, I wrote into my Properties file:

er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/ProPilotsMgmtApp.woa
er.extensions.ERXApplication.replaceApplicationPath.replace=/ProPilotsManagementApp

The values are read, as the startup log shows:

>   ...
>   er.extensions.ERPrototypes.hasLocalization=false
>   
> er.extensions.ERXApplication.replaceApplicationPath.pattern=/cgi-bin/WebObjects/ProPilotsMgmtApp.woa
>   
> er.extensions.ERXApplication.replaceApplicationPath.replace=/ProPilotsManagementApp
>   er.extensions.ERXComponentActionRedirector.enabled=false
>   ...

But the WO-generated HTML contains always the 
"/cgi-bin/WebObjects/ProPilotsMgmtApp.woa".

Has anyone an idea what could make the replacements not working?

I have no glue where to look further ...

C.U.CW

P.S.: Apache rewrite rules work. 
-- 
What are the three enemies of a programmer? Sunlight, oxygen, and the appalling 
roar of the birds.

 ___
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

To-Many Qualifiers

2014-04-14 Thread Kevin Hinkson
Hello,

I was hoping someone would be able to point me in the direction of how to 
handle generating a to many qualifier that involves a key path (not just a 
single key).

A code example:

// Generates a qualifier for the Profile for this account and the Profiles of 
any account on the same team (or that is the intention)
public static EOQualifier visibleToAccountQualifier(Account account)
{
EOQualifier profilesDirectlyTiedToAccount = Profile.ACCOUNT.eq(account);
String teamProfilesKeyPath = ERXQ.keyPath(Profile.ACCOUNT_KEY, 
Account.TEAMS_KEY, Team.ACCOUNTS_KEY);
EOQualifier teamProfilesQualifier = ERXQ.has(teamProfilesKeyPath, new 
NSArray(account));
return ERXQ.or(profilesDirectlyTiedToAccount, teamProfilesQualifier);
}

Performing a fetch with this qualifier generates the following error.

EvaluateExpression failed: :
Next exception:SQL State:42601 -- error code: 0 -- msg: ERROR: syntax error 
at or near "null"
  Position: 281.

There is a null in there where there shouldn't be one (on the inner select). Am 
I using this qualifier incorrectly or is this indicative of a modelling error 
or even a bug? If it helps, I'm using PostgreSQL.
 ___
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: Frameworks/Ajax/Ajax/WebServerResources in Wonder

2014-04-14 Thread Chuck Hill
Yes, they are created by the build.  I am not sure why they are under source 
control.

On 2014-04-14, 2:50 PM, "Klaus Berkling" wrote:


Can someone confirm that wondaculous-min.js and wondaculous.js in 
Frameworks/Ajax/Ajax/WebServerResources is auto-updated by some other task?
I'm asking because the files changed from under me. I'm guessing ant will 
update it ether running 'ant frameworks' or 'and frameworks.install'?

(Same seems to apply to 'Frameworks/Misc/WOJRebel/manifest.mf')

Thanks.



kib

"We keep moving forward, opening new doors, and doing new things, because we're 
curious and curiosity keeps leading us down new paths."
Walt Disney

Klaus Berkling
www.berkling.us | @kiberkli | Buy My iPhone 
app



 ___
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: Frameworks/Ajax/Ajax/WebServerResources in Wonder

2014-04-14 Thread Klaus Berkling

On Apr 14, 2014, at 2:56 PM, Chuck Hill  wrote:

> Yes, they are created by the build.  I am not sure why they are under source 
> control.

Ah, good to know. Thanks



kib

"Some people never see the light, Till it shines through bullet holes."
Tropic Moon, Burce Cockburn

Klaus Berkling
www.berkling.us | @kiberkli | Buy My iPhone app 






smime.p7s
Description: S/MIME cryptographic signature
 ___
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

Frameworks/Ajax/Ajax/WebServerResources in Wonder

2014-04-14 Thread Klaus Berkling

Can someone confirm that wondaculous-min.js and wondaculous.js in 
Frameworks/Ajax/Ajax/WebServerResources is auto-updated by some other task?
I'm asking because the files changed from under me. I'm guessing ant will 
update it ether running 'ant frameworks' or 'and frameworks.install'?

(Same seems to apply to 'Frameworks/Misc/WOJRebel/manifest.mf')

Thanks.



kib

"We keep moving forward, opening new doors, and doing new things, because we're 
curious and curiosity keeps leading us down new paths."
Walt Disney

Klaus Berkling
www.berkling.us | @kiberkli | Buy My iPhone app 





smime.p7s
Description: S/MIME cryptographic signature
 ___
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: WOLips strange behavior

2014-04-14 Thread Ray Kiddy

How did you get your WOLips?

I always do the install through the update manager. Currently, I am
using eclipse version 3.7.2 (Build id: I20110613-1736) and I have
WOLips version 4.2.20130127.7.

I did not read your earlier e-mail carefully because messages that have
"WOLips strangeness" in the title are singing an old, old song. But.
Data loss errors in eclipse/WOLips are unusual. And bad.

I do not know if you would be willing to do it, but if this was me, I
would move aside my workspace and start eclipse and re-create the
workspace and re-create my projects. If data from files is being lost,
what else is to be done? Not losing data is pretty basic. I have
screwed up my eclipse installations many times yet I have not seen a
data loss error.

I assume you are not running out of disk space. It is hard to know what
else could cause this. If you re-create the workspace and it still
happens, give a holler off-line because this really would need to be
looked at more seriously.

Sorry I cannot think of anything else to help you out.

cheers - ray

 On Fri, 11 Apr 2014 12:09:30 +0200
Filippo Lauria  wrote:

> 2014-04-10 21:01 GMT+02:00 Aaron Rosenzweig :
> 
> > Hi Filippo,
> >
> Hi Aaron, thanks for reply.
> 
> Probably you upgraded your WO plugin for Eclipse called "WOLips" or
> maybe
> > you even upgraded Eclipse too.
> >
> I don't.
> I'm an Ubuntu WebObjects developer [ I think the last one on the
> earth :) ] and
> I'm using eclipse 3.7 + WOLips 3.7.
> 
> >
> > Sometimes they are written to handle line endings and things
> > differently and will modify old files just by opening them if
> > you've upgraded WOLips.
> >
> The problem is that WOLips is not just trimming spaces, or stripping
> line endings or \soft stuff\ like this, it is \brutally\ cutting off
> lines of code!
> 
> I was just wondering if there was someone else who experimented this,
> or I'm the only one?
> 
> Thank you all,
>  Filippo
> 
>   *Aaron Rosenzweig* / Chat 'n Bike 
> > *e:*  aa...@chatnbike.com  *t:*  (301) 956-2319   [image: Chat 'n
> > Bike]  [image: Chat 'n Bike]
> >
> > On Apr 10, 2014, at 6:16 AM, Filippo Lauria
> >  wrote:
> >
> > Hello,
> > I'm facing an issue that it's really driving me crazy.
> >
> > Here it is a brief explanation:
> >
> > I have a component from one of my WO framework: EditAssignmentPage.
> > I was not touching it anymore, since my focus moved to other
> > components of my WO framework as well.
> > I did few changes to my framework, added components, modified
> > EOModel, etc.
> >
> > Few days ago I was wondering to change something on
> > EditAssignmentPage Component. I opened it and /magically/ it just
> > modified itself.
> >
> > I soon noticed issues in the java file, since an ERXDisplayGroup
> > lost his parametrization.
> > After few looks I noticed too, that woo file automatically changed
> > from something like this:
> > --
> > {
> >"WebObjects Release" = "WebObjects 5.0";
> >encoding = NSUTF8StringEncoding;
> > variables = {
> >  offeringGroup = { ... };
> >  scriptDisplayGroup = { ... };
> > submissionProfileDisplayGroup = { ... };
> > ...
> > --
> >
> > to something similar, but different:
> > --
> > {
> >"WebObjects Release" = "WebObjects 5.0";
> >encoding = NSUTF8StringEncoding;
> > variables = {
> >  offeringGroup = { ... };
> > ...
> > --
> >
> > Is there a logical explanation of why is this happening?
> >
> >
> > Luckly, I committed EditAssignmentPage in a consi
> > stent state, but I can start to modify component since it runs to
> > inconsistent version.
> >
> > Any ideas?
> >
> > Thank you for reading (and hopefully for answering).
> >
> > --
> > Filippo Lauria
> >  ___
> > 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/aaron%40chatnbike.com
> >
> > This email sent to aa...@chatnbike.com
> >
> >
> >

 ___
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: WOLips strange behavior

2014-04-14 Thread Filippo Lauria
2014-04-11 22:23 GMT+02:00 Aaron Rosenzweig :

> Hi Filippo,
>
> I’m sure you are not the only one who develops on Ubuntu (Linux). I think
> I saw a post that Ray Kiddy does too.
>
> Are you using Git, SVN, or something to manage revisions in your code?
> Maybe just try reverting and assume this is a fluke. Probably something
> else occurred. I would’t lose any sleep on it unless it happens again.
>

​Yes, I'm using Git.​



> Sorry it happened to you though.
>
Sometimes Eclipse, our OS, or just computers are flaky. Two days ago
> Eclipse wouldn’t start up for me, it would get stuck midway in the splash
> screen. I had to clean out some settings to get it to work again.
> Inexplicable stuff happens sometimes.
>

Mmm.​. of course, this mail it's just to highlight the problem.
Thank god the way to avoid the problem exists, but it is a workaround:
replace trashed files, with that ones coming from a previous (stable)
commit and don't change them again -.-'


>   *Aaron Rosenzweig* / Chat 'n Bike 
> *e:*  aa...@chatnbike.com  *t:*  (301) 956-2319   [image: Chat 'n Bike]  
> [image:
> Chat 'n Bike]
>
> On Apr 11, 2014, at 6:09 AM, Filippo Lauria 
> wrote:
>
> 2014-04-10 21:01 GMT+02:00 Aaron Rosenzweig :
>
>> Hi Filippo,
>>
> Hi Aaron, thanks for reply.
>
> Probably you upgraded your WO plugin for Eclipse called “WOLips” or maybe
>> you even upgraded Eclipse too.
>>
> I don't.
> I'm an Ubuntu WebObjects developer [ I think the last one on the earth :)
> ] and
> I'm using eclipse 3.7 + WOLips 3.7.
>
>>
>> Sometimes they are written to handle line endings and things differently
>> and will modify old files just by opening them if you’ve upgraded WOLips.
>>
> The problem is that WOLips is not just trimming spaces, or stripping line
> endings or \soft stuff\ like this, it is \brutally\ cutting off lines of
> code!
>
> I was just wondering if there was someone else who experimented this, or
> I'm the only one?
>
> Thank you all,
>  Filippo
>
>   *Aaron Rosenzweig* / Chat 'n Bike 
>> *e:*  aa...@chatnbike.com  *t:*  (301) 956-2319   [image: Chat 'n Bike]  
>> [image:
>> Chat 'n Bike]
>>
>> On Apr 10, 2014, at 6:16 AM, Filippo Lauria 
>> wrote:
>>
>> Hello,
>> I'm facing an issue that it's really driving me crazy.
>>
>> Here it is a brief explanation:
>>
>> I have a component from one of my WO framework: EditAssignmentPage.
>> I was not touching it anymore, since my focus moved to other components
>> of my WO framework as well.
>> I did few changes to my framework, added components, modified EOModel,
>> etc.
>>
>> Few days ago I was wondering to change something on EditAssignmentPage
>> Component. I opened it and /magically/ it just modified itself.
>>
>> I soon noticed issues in the java file, since an ERXDisplayGroup lost his
>> parametrization.
>> After few looks I noticed too, that woo file automatically changed from
>> something like this:
>> --
>> {
>>"WebObjects Release" = "WebObjects 5.0";
>>encoding = NSUTF8StringEncoding;
>> variables = {
>>  offeringGroup = { ... };
>>  scriptDisplayGroup = { ... };
>> submissionProfileDisplayGroup = { ... };
>> ...
>> --
>>
>> to something similar, but different:
>> --
>> {
>>"WebObjects Release" = "WebObjects 5.0";
>>encoding = NSUTF8StringEncoding;
>> variables = {
>>  offeringGroup = { ... };
>> ...
>> --
>>
>> Is there a logical explanation of why is this happening?
>>
>>
>> Luckly, I committed EditAssignmentPage in a consi
>> stent state, but I can start to modify component since it runs to
>> inconsistent version.
>>
>> Any ideas?
>>
>> Thank you for reading (and hopefully for answering).
>>
>> --
>> Filippo Lauria
>>  ___
>> 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/aaron%40chatnbike.com
>>
>> This email sent to aa...@chatnbike.com
>>
>>
>>
>


-- 
Filippo Lauria
Scholarship holder at
Department of Information Engineering,
University of Pisa
Largo Lucio Lazzarino 1,
56122 Pisa - Italy
Ph. (+39) 050-2217.456 (direct)
Skype ID: filippomarialauria
LinkedIn: http://it.linkedin.com/pub/filippo-laur%C3%ACa/26/966/981
Stackoverflow: http://stackoverflow.com/users/2299414/filippo-lauria
 ___
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