You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Alex <al...@optonline.net> on 2006/04/06 12:21:54 UTC

[commons-httpclient3.0] Java Script enabling

I establish connection to a site and I get 

"In order to use this application, you must have Java Scripting enabled"

"In order to use this application, you must have Cookies enabled."

 

I set client 

 client.getParams().setParameter("http.useragent","MSIE 6.0");   

 client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);

 

does any one know how to set it, so that site thinks java script and cookies
are enabled

 

Thanks


Re: [commons-httpclient3.0] Java Script enabling

Posted by Nicolas De Loof <ni...@capgemini.com>.
Some site use a little Javascript on welcome page to detect browser support.
As commons-httpclient only handle the HTTP layer (not HTML neither 
Javascript) this test will fail.

You may take a look at tools like HttpUnit that handle HTML pages and 
execute JS in a 100% Java internal pseudo-browser.

Alex a écrit :
> I establish connection to a site and I get 
>
> "In order to use this application, you must have Java Scripting enabled"
>
> "In order to use this application, you must have Cookies enabled."
>
>  
>
> I set client 
>
>  client.getParams().setParameter("http.useragent","MSIE 6.0");   
>
>  client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
>
>  
>
> does any one know how to set it, so that site thinks java script and cookies
> are enabled
>
>  
>
> Thanks
>
>
>   

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [email] org.apache.commons.mail.EmailException: Missing local name

Posted by Barrie Selack <bs...@digipixart.com>.
>Got a stack trace for us?

In getting the stack trace.. I found the problem. 

Sorry for the confusion. I'm doing a copy and filter in my Ant build to
replace e-mail addresses properties. (which works fine) Then during
development, I occasionally just command line copy changed template files
over to the webapp side. In my copying these files, I was inadvertently
overwriting the filtered e-mail properties with the @...@ values. (I was
copying a directory I should not have been!) 

That was causing an 

javax.mail.internet.AddressException: Missing local name in string
``@mail.order-processing.email@''

which in turn caused the 

org.apache.commons.mail.EmailException: Missing local name

Thanks,

Barrie

>
>On 4/7/06, Barrie Selack <bs...@digipixart.com> wrote:
>>
>> When I'm running my application local (on localhost) it sometimes works
>> fine, and other times give this error:
>>
>> org.apache.commons.mail.EmailException: Missing local name
>>
>> and fails sending the e-mail.
>>
>> It runs fine on other boxes (our test and production site)
>>
>> I'm sure it has something to do with the local machine name/setup, but
>> it's strange that it works sometimes, and sometime not, with no changes,
>> besides restarting the application.
>>
>> (the hosts file...)
>>
>> ##
>> # Host Database
>> #
>> # localhost is used to configure the loopback interface
>> # when the system is booting.  Do not change this entry.
>> ##
>> 127.0.0.1       localhost
>> 127.0.0.1       local.ourdomain.com
>>
>> Any suggestions? or anyone else with this problem?
>>
>> I'm on Mac OS X 10.3.9
>>
>> Thanks,
>>
>> Barrie
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>>
>>
>
>
>--
>http://www.multitask.com.au/people/dion/
>Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid
>of the dark, but because the dark is afraid of Chuck Norris



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [email] org.apache.commons.mail.EmailException: Missing local name

Posted by Dion Gillard <di...@gmail.com>.
Got a stack trace for us?

On 4/7/06, Barrie Selack <bs...@digipixart.com> wrote:
>
> When I'm running my application local (on localhost) it sometimes works
> fine, and other times give this error:
>
> org.apache.commons.mail.EmailException: Missing local name
>
> and fails sending the e-mail.
>
> It runs fine on other boxes (our test and production site)
>
> I'm sure it has something to do with the local machine name/setup, but
> it's strange that it works sometimes, and sometime not, with no changes,
> besides restarting the application.
>
> (the hosts file...)
>
> ##
> # Host Database
> #
> # localhost is used to configure the loopback interface
> # when the system is booting.  Do not change this entry.
> ##
> 127.0.0.1       localhost
> 127.0.0.1       local.ourdomain.com
>
> Any suggestions? or anyone else with this problem?
>
> I'm on Mac OS X 10.3.9
>
> Thanks,
>
> Barrie
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


--
http://www.multitask.com.au/people/dion/
Chuck Norris sleeps with a night light. Not because Chuck Norris is afraid
of the dark, but because the dark is afraid of Chuck Norris

[email] org.apache.commons.mail.EmailException: Missing local name

Posted by Barrie Selack <bs...@digipixart.com>.
When I'm running my application local (on localhost) it sometimes works
fine, and other times give this error:

org.apache.commons.mail.EmailException: Missing local name

and fails sending the e-mail.

It runs fine on other boxes (our test and production site)

I'm sure it has something to do with the local machine name/setup, but
it's strange that it works sometimes, and sometime not, with no changes,
besides restarting the application.

(the hosts file...)

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1       localhost
127.0.0.1       local.ourdomain.com

Any suggestions? or anyone else with this problem?

I'm on Mac OS X 10.3.9

Thanks,

Barrie



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


RE: [commons-httpclient3.0] Java Script enabling

Posted by Alex <al...@optonline.net>.
Thanks Nicolas

-----Original Message-----
From: Nicolas De Loof [mailto:nicolas.deloof@capgemini.com] 
Sent: Thursday, April 06, 2006 7:35 AM
To: Jakarta Commons Users List
Subject: Re: [commons-httpclient3.0] Java Script enabling


You will have two options :
- use a tool that handle HTML + Javascript like a real browser (see 
HttpUnit)
- understand the way the site detects Javascript support. The welcome 
page may have a little script block that does some "window.location=..." 
or any other Form update / submission so that teh server can detect JS 
support.

Alex a écrit :
> In my previous message
> client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
> this seems to be working
> but
> Is there a way to set property or something so that browser thinks "Java
> Scripting" is enabled?
>
> I need to connect to a site (with java script being enabled) and read it's
> html source (whatever it is)
>
> Any help is appreciated
>
> Thanks
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>   

This message contains information that may be privileged or confidential and
is the property of the Capgemini Group. It is intended only for the person
to whom it is addressed. If you are not the intended recipient,  you are not
authorized to read, print, retain, copy, disseminate,  distribute, or use
this message or any part thereof. If you receive this  message in error,
please notify the sender immediately and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Re: [commons-httpclient3.0] Java Script enabling

Posted by Nicolas De Loof <ni...@capgemini.com>.
You will have two options :
- use a tool that handle HTML + Javascript like a real browser (see 
HttpUnit)
- understand the way the site detects Javascript support. The welcome 
page may have a little script block that does some "window.location=..." 
or any other Form update / submission so that teh server can detect JS 
support.

Alex a écrit :
> In my previous message
> client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
> this seems to be working
> but
> Is there a way to set property or something so that browser thinks "Java
> Scripting" is enabled?
>
> I need to connect to a site (with java script being enabled) and read it's
> html source (whatever it is)
>
> Any help is appreciated
>
> Thanks
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>   

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient,  you are not authorized to read, print, retain, copy, disseminate,  distribute, or use this message or any part thereof. If you receive this  message in error, please notify the sender immediately and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


RE: [commons-httpclient3.0] Java Script enabling

Posted by Alex <al...@optonline.net>.
In my previous message
client.getParams().setCookiePolicy(CookiePolicy.BROWSER_COMPATIBILITY);
this seems to be working
but
Is there a way to set property or something so that browser thinks "Java
Scripting" is enabled?

I need to connect to a site (with java script being enabled) and read it's
html source (whatever it is)

Any help is appreciated

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org