Hi

I posted a while ago about ways of creating users automatically (I have 5000 i need to create based on details held in a CSV file). Willhelm Berger very kindly sent me some code which parses a CSV file and then posts it using jakarta.commons HttpClient.

I have modified his code to match the parameters I need (as based on the URL below):

URL - /site/administration/?do=users&sub=processCreate

With parameters - actionType=save&username=Andrew&firstname=Andy&lastname=Cargill&
email=&organization=&passwd=hispassword&passwdconfirm=hispassword&homePageLabel=none


And it doesn't work.. The output on the command line is as follows:

Login URL: http://x/site/Jahia/engineName/login/pid/1??username=x&password=x&loginChoice=1&screen=save
Post URL: http://x/site/administration/?do=users&sub=processCreate
Response Code Login: 200
start reading csv file
processing line + 1:Adam,Alexander,1047,...
09-May-2005 09:55:01 org.apache.commons.httpclient.HttpMethodBase processResponseHeaders
WARNING: Invalid cookie header: "JSESSIONID=84B88BABB82D42AA80637A5AC48F20D9; Path=". Missing value for path attribute
Response Code: 200


So it seems to login fine, but the create doesn't work even though it gives me a 200.

Does anyone have any ideas why this is not working?

cheers
Edd

--
Edd Dawson
Head of Development

MitchellConnerSearson
3-5 High Pavement
The Lace Market
Nottingham  NG1 1HF
Tel +44 (0)115 959 6455
Fax +44 (0)115 959 6456
Direct +44 (0)115 959 6463
www.choosemcs.co.uk <http://www.choosemcs.co.uk/>

Confidentiality: This e-mail and its attachments are intended for the above 
named only and may be confidential. If they have come to you in error you must 
take no action based on them, nor must you copy or show them to anyone; please 
reply to this e-mail and highlight the error.

Security Warning: Please note that this e-mail has been created in the 
knowledge that Internet e-mail is not a 100% secure communications medium. We 
advise that you understand and observe this lack of security when e-mailing us.

Viruses: Although we have taken steps to ensure that this e-mail and 
attachments are free from any virus, we advise that in keeping with good 
computing practice the recipient should ensure they are actually virus free.




Reply via email to