Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Francois Fournel
HTTP link request causing a blank content (HTTP error 400)
December 8, 2011 12:30 AM
Answer

Francois Fournel

Rank: Junior Member

Posts: 99

Join Date: April 15, 2010

Recent Posts

Hi everyone,

I have a strange bug when requesting my liferay server.
On a page, there is a custom portlet.
In this portlet, when I click a certain link, it opens a popup thanks to the following kind of URL

1http://localhost:9090/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displaySimulator&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_idFormPattern=1301


All works ok. I reclick the link 10 times and the popup open 10 times...but at X+1 time, the popup content goes blank with the error HTTP 400 (bad request error).
My generated request never change (I debug it) !
Why at X+1 try, the content of the popup goes blank ?

PS : no log error on server side.

Solution : I need to restart completely the navigator and so the link works again.
Jelmer Kuperus
RE: HTTP link request causing a blank content (HTTP error 400)
December 7, 2011 12:43 PM
Answer

Jelmer Kuperus

Rank: Liferay Legend

Posts: 1192

Join Date: March 10, 2010

Recent Posts

Two questions :

Is there an apache instance infront of your servlet container ?
Do you use https ?
Francois Fournel
RE: HTTP link request causing a blank content (HTTP error 400)
December 8, 2011 12:31 AM
Answer

Francois Fournel

Rank: Junior Member

Posts: 99

Join Date: April 15, 2010

Recent Posts

No. Tomcat from Liferay CE 606 bundle only.
No. Only HTTP.
Raja Nagendra Kumar
RE: HTTP link request causing a blank content (HTTP error 400)
December 8, 2011 12:38 AM
Answer

Raja Nagendra Kumar

Rank: Expert

Posts: 484

Join Date: March 1, 2006

Recent Posts

> solfea/editer-un-dossier

is this your application.. if yes, check the code.. people may not have Courtesy to throw exceptions.. or log the exception.. there may be some masked exception..

Based on the scenario you are explaining.. may be it is the speed..at which which tomcat server can handle your request.. is creating the issue..may be because your application is too slow.. or tomcat server is configured to accept just 10 concurrency connections only..

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
-Liferay Adoption Excellence
Francois Fournel
RE: HTTP link request causing a blank content (HTTP error 400)
December 8, 2011 9:39 AM
Answer

Francois Fournel

Rank: Junior Member

Posts: 99

Join Date: April 15, 2010

Recent Posts

ok thanks for your answers.
I go into debug of my ajax request, and error code was called indeed at the X+1 time.
I tried to log ajax variables, and below the result :
1
2readyState = undefined
3status = undefined
4statusText = undefined
5responseText = undefined


Very strange.
The method which should be called on server side was not called (first line in method is a log line).
Why at X+1 times this method is not called....I'am going to study in deep this point.

Stay tuned ;)

Thanks
Francois Fournel
RE: HTTP link request causing a blank content (HTTP error 400)
December 9, 2011 1:20 AM
Answer

Francois Fournel

Rank: Junior Member

Posts: 99

Join Date: April 15, 2010

Recent Posts

I simplified my ajax method call on server side at maximum. The method do :

 1@RenderMapping(params = "command=displayUpdateSimulatorConfig")
 2    public void updateSimulatorConfig(
 3            @RequestParam(value = "idFormInstance", required = true) Integer pIdFormInstance,
 4            @RequestParam(value = "simCfg", required = true) String pSimCfg,
 5            WebRequest pWebRequest, RenderResponse pResponse) {
 6try
 7        {
 8            log.debug( "Debut Update sim cfg" );
 9            String lRet = "{\"config\":{\"properties\":{},\"objects\":{\"param0\":{\"properties\":{\"monthly_with_insurance\":\"\"},\"objects\":{}},\"param1\":{\"properties\":{\"monthly_without_insurance\":\"120\"},\"objects\":{}},\"param11\":{\"properties\":{\"binsurance\":\"0\"},\"objects\":{}},\"param2\":{\"properties\":{\"duration\":\"17\"},\"objects\":{}},\"param10\":{\"properties\":{\"insurance_cost\":\"0\"},\"objects\":{}},\"param13\":{\"properties\":{\"amount\":\"2000\"},\"objects\":{}},\"param3\":{\"properties\":{\"deadlines\":\"17\"},\"objects\":{}},\"param4\":{\"properties\":{\"teg\":\"1\"},\"objects\":{}},\"param12\":{\"properties\":{\"cbinsurance\":\"0\"},\"objects\":{}},\"param5\":{\"properties\":{\"lending_rate\":\"0.9955\"},\"objects\":{}},\"param6\":{\"properties\":{\"cost_with_insurance\":\"\"},\"objects\":{}},\"param7\":{\"properties\":{\"cost_without_insurance\":\"15\"},\"objects\":{}},\"param8\":{\"properties\":{\"amount_with_insurance\":\"\"},\"objects\":{}},\"param9\":{\"properties\":{\"amount_without_insurance\":\"2015\"},\"objects\":{}},\"param14\":{\"properties\":{\"column\":\"0\"},\"objects\":{}}}}}";
10            pResponse.setContentType( "text/json; charset=utf-8" );
11            pResponse.getWriter().write( lRet );
12            pResponse.getWriter().close();
13        }
14        catch (Exception e)
15        {
16            e.printStackTrace();
17        }
18
19    }



As you can see it just returns a json string (hard coded) and the problem still occurs at X+1 times.
The ajax request (done with jquery) fail at X+1 times going into error return code :

The ajax request was :

1http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displayUpdateSimulatorConfig


and the error code was called at X+1 times :

 1$.ajax({
 2        type: "post",
 3        dataType: "text/json",
 4        url: pUrl,
 5        data: {idFormInstance:pIdFormInstance,simCfg:newSimCfg},
 6        context: document.body,
 7        error: function(event,jqXHR, ajaxSettings, thrownError){
 8            //var r = JSON.parse(jqXHR.responseText);
 9            alert("ajax error");
10            console.log("readyState = " + jqXHR.readyState);
11            console.log("status = " + jqXHR.status);
12            console.log("statusText = " + jqXHR.statusText);
13            console.log("responseText = " + jqXHR.responseText);
14            console.log("getAllResponseHeaders = " + jqXHR.getAllResponseHeaders());
15            console.log("getResponseHeader = " + jqXHR.getResponseHeader());
16//            console.log( jqXHR.abort();
17
18            
19            console.log('[event:' + event + '], [jqXHR:' + jqXHR + '], [ajaxSettings:' + ajaxSettings + '], [thrownError:' + thrownError + '])');
20            //alert("jqXHR.responseText: " + jqXHR.responseText);
21             // alert("Message: " + r.Message);
22              //alert("StackTrace: " + r.StackTrace);
23              //alert("ExceptionType: " + r.ExceptionType);
24            //alert("Erreur de mise a jour des données issues du simulateur: " + textStatus + "response: " + jqXHR.responseText );
25          },
26        success: function(data, textStatus, jqXHR) {
27...
28}


all console.log print "undefined", the problem was clearly the request itself (not the code) which was going wrong like a connection lost (I don't know)

Is there something wrong in the server method ?



EDIT : below the firebug console logs :

 1
 2popup url=http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displaySimulator&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_idFormPattern=1301
 3editer...cycle=0 (ligne 93)
 4Simulator xml output = <sol:config><sol:param name="monthly_with_insurance">-</sol:param><sol:param name="monthly_without_insurance">120 €</sol:param><sol:param name="duration">17 mois</sol:param><sol:param name="deadlines">17 mois</sol:param><sol:param name="teg">1 %</sol:param><sol:param name="lending_rate">0.9955 %</sol:param><sol:param name="cost_with_insurance">-</sol:param><sol:param name="cost_without_insurance">15 €</sol:param><sol:param name="amount_with_insurance">-</sol:param><sol:param name="amount_without_insurance">2015 €</sol:param><sol:param name="insurance_cost">0</sol:param><sol:param name="binsurance">0</sol:param><sol:param name="cbinsurance">0</sol:param><sol:param name="amount">2000</sol:param><sol:param name="column">0</sol:param></sol:config>
 5editer...cycle=0 (ligne 93)
 6URL ajax call = http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displayUpdateSimulatorConfig
 7main.j...1713222 (ligne 1)
 8POST http://localhost:9090/sv/web/solfea/editer-un-do...STANCE_jC1k_command=displayUpdateSimulatorConfig
 9   
10200 OK
11        40ms   
12data success = {"config":{"properties":{},"objects":{"param0":{"properties":{"monthly_with_insurance":""},"objects":{}},"param1":{"properties":{"monthly_without_insurance":"120"},"objects":{}},"param11":{"properties":{"binsurance":"0"},"objects":{}},"param2":{"properties":{"duration":"17"},"objects":{}},"param10":{"properties":{"insurance_cost":"0"},"objects":{}},"param13":{"properties":{"amount":"2000"},"objects":{}},"param3":{"properties":{"deadlines":"17"},"objects":{}},"param4":{"properties":{"teg":"1"},"objects":{}},"param12":{"properties":{"cbinsurance":"0"},"objects":{}},"param5":{"properties":{"lending_rate":"0.9955"},"objects":{}},"param6":{"properties":{"cost_with_insurance":""},"objects":{}},"param7":{"properties":{"cost_without_insurance":"15"},"objects":{}},"param8":{"properties":{"amount_with_insurance":""},"objects":{}},"param9":{"properties":{"amount_without_insurance":"2015"},"objects":{}},"param14":{"properties":{"column":"0"},"objects":{}}}}}
13main.j...1713222 (ligne 1)
14JSON success = {"config":{"properties":{},"objects":{"param0":{"properties":{"monthly_with_insurance":""},"objects":{}},"param1":{"properties":{"monthly_without_insurance":"120"},"objects":{}},"param11":{"properties":{"binsurance":"0"},"objects":{}},"param2":{"properties":{"duration":"17"},"objects":{}},"param10":{"properties":{"insurance_cost":"0"},"objects":{}},"param13":{"properties":{"amount":"2000"},"objects":{}},"param3":{"properties":{"deadlines":"17"},"objects":{}},"param4":{"properties":{"teg":"1"},"objects":{}},"param12":{"properties":{"cbinsurance":"0"},"objects":{}},"param5":{"properties":{"lending_rate":"0.9955"},"objects":{}},"param6":{"properties":{"cost_with_insurance":""},"objects":{}},"param7":{"properties":{"cost_without_insurance":"15"},"objects":{}},"param8":{"properties":{"amount_with_insurance":""},"objects":{}},"param9":{"properties":{"amount_without_insurance":"2015"},"objects":{}},"param14":{"properties":{"column":"0"},"objects":{}}}}}
15main.j...1713222 (ligne 1)
16popup url=http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displaySimulator&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_idFormPattern=1301
17editer...cycle=0 (ligne 93)
18Simulator xml output = <sol:config><sol:param name="monthly_with_insurance">-</sol:param><sol:param name="monthly_without_insurance">120 €</sol:param><sol:param name="duration">17 mois</sol:param><sol:param name="deadlines">17 mois</sol:param><sol:param name="teg">1 %</sol:param><sol:param name="lending_rate">0.9955 %</sol:param><sol:param name="cost_with_insurance">-</sol:param><sol:param name="cost_without_insurance">15 €</sol:param><sol:param name="amount_with_insurance">-</sol:param><sol:param name="amount_without_insurance">2015 €</sol:param><sol:param name="insurance_cost">0</sol:param><sol:param name="binsurance">0</sol:param><sol:param name="cbinsurance">0</sol:param><sol:param name="amount">2000</sol:param><sol:param name="column">0</sol:param></sol:config>
19editer...cycle=0 (ligne 93)
20URL ajax call = http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displayUpdateSimulatorConfig
21main.j...1713222 (ligne 1)
22POST http://localhost:9090/sv/web/solfea/editer-un-do...STANCE_jC1k_command=displayUpdateSimulatorConfig
23   
24200 OK
25        43ms   
26data success = {"config":{"properties":{},"objects":{"param0":{"properties":{"monthly_with_insurance":""},"objects":{}},"param1":{"properties":{"monthly_without_insurance":"120"},"objects":{}},"param11":{"properties":{"binsurance":"0"},"objects":{}},"param2":{"properties":{"duration":"17"},"objects":{}},"param10":{"properties":{"insurance_cost":"0"},"objects":{}},"param13":{"properties":{"amount":"2000"},"objects":{}},"param3":{"properties":{"deadlines":"17"},"objects":{}},"param4":{"properties":{"teg":"1"},"objects":{}},"param12":{"properties":{"cbinsurance":"0"},"objects":{}},"param5":{"properties":{"lending_rate":"0.9955"},"objects":{}},"param6":{"properties":{"cost_with_insurance":""},"objects":{}},"param7":{"properties":{"cost_without_insurance":"15"},"objects":{}},"param8":{"properties":{"amount_with_insurance":""},"objects":{}},"param9":{"properties":{"amount_without_insurance":"2015"},"objects":{}},"param14":{"properties":{"column":"0"},"objects":{}}}}}
27main.j...1713222 (ligne 1)
28JSON success = {"config":{"properties":{},"objects":{"param0":{"properties":{"monthly_with_insurance":""},"objects":{}},"param1":{"properties":{"monthly_without_insurance":"120"},"objects":{}},"param11":{"properties":{"binsurance":"0"},"objects":{}},"param2":{"properties":{"duration":"17"},"objects":{}},"param10":{"properties":{"insurance_cost":"0"},"objects":{}},"param13":{"properties":{"amount":"2000"},"objects":{}},"param3":{"properties":{"deadlines":"17"},"objects":{}},"param4":{"properties":{"teg":"1"},"objects":{}},"param12":{"properties":{"cbinsurance":"0"},"objects":{}},"param5":{"properties":{"lending_rate":"0.9955"},"objects":{}},"param6":{"properties":{"cost_with_insurance":""},"objects":{}},"param7":{"properties":{"cost_without_insurance":"15"},"objects":{}},"param8":{"properties":{"amount_with_insurance":""},"objects":{}},"param9":{"properties":{"amount_without_insurance":"2015"},"objects":{}},"param14":{"properties":{"column":"0"},"objects":{}}}}}
29main.j...1713222 (ligne 1)
30popup url=http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displaySimulator&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_idFormPattern=1301
31editer...cycle=0 (ligne 93)
32Simulator xml output = <sol:config><sol:param name="monthly_with_insurance">-</sol:param><sol:param name="monthly_without_insurance">120 €</sol:param><sol:param name="duration">17 mois</sol:param><sol:param name="deadlines">17 mois</sol:param><sol:param name="teg">1 %</sol:param><sol:param name="lending_rate">0.9955 %</sol:param><sol:param name="cost_with_insurance">-</sol:param><sol:param name="cost_without_insurance">15 €</sol:param><sol:param name="amount_with_insurance">-</sol:param><sol:param name="amount_without_insurance">2015 €</sol:param><sol:param name="insurance_cost">0</sol:param><sol:param name="binsurance">0</sol:param><sol:param name="cbinsurance">0</sol:param><sol:param name="amount">2000</sol:param><sol:param name="column">0</sol:param></sol:config>
33editer...cycle=0 (ligne 93)
34URL ajax call = http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displayUpdateSimulatorConfig
35main.j...1713222 (ligne 1)
36POST http://localhost:9090/sv/web/solfea/editer-un-do...STANCE_jC1k_command=displayUpdateSimulatorConfig
37   
38200 OK
39        43ms   
40data success = {"config":{"properties":{},"objects":{"param0":{"properties":{"monthly_with_insurance":""},"objects":{}},"param1":{"properties":{"monthly_without_insurance":"120"},"objects":{}},"param11":{"properties":{"binsurance":"0"},"objects":{}},"param2":{"properties":{"duration":"17"},"objects":{}},"param10":{"properties":{"insurance_cost":"0"},"objects":{}},"param13":{"properties":{"amount":"2000"},"objects":{}},"param3":{"properties":{"deadlines":"17"},"objects":{}},"param4":{"properties":{"teg":"1"},"objects":{}},"param12":{"properties":{"cbinsurance":"0"},"objects":{}},"param5":{"properties":{"lending_rate":"0.9955"},"objects":{}},"param6":{"properties":{"cost_with_insurance":""},"objects":{}},"param7":{"properties":{"cost_without_insurance":"15"},"objects":{}},"param8":{"properties":{"amount_with_insurance":""},"objects":{}},"param9":{"properties":{"amount_without_insurance":"2015"},"objects":{}},"param14":{"properties":{"column":"0"},"objects":{}}}}}
41main.j...1713222 (ligne 1)
42JSON success = {"config":{"properties":{},"objects":{"param0":{"properties":{"monthly_with_insurance":""},"objects":{}},"param1":{"properties":{"monthly_without_insurance":"120"},"objects":{}},"param11":{"properties":{"binsurance":"0"},"objects":{}},"param2":{"properties":{"duration":"17"},"objects":{}},"param10":{"properties":{"insurance_cost":"0"},"objects":{}},"param13":{"properties":{"amount":"2000"},"objects":{}},"param3":{"properties":{"deadlines":"17"},"objects":{}},"param4":{"properties":{"teg":"1"},"objects":{}},"param12":{"properties":{"cbinsurance":"0"},"objects":{}},"param5":{"properties":{"lending_rate":"0.9955"},"objects":{}},"param6":{"properties":{"cost_with_insurance":""},"objects":{}},"param7":{"properties":{"cost_without_insurance":"15"},"objects":{}},"param8":{"properties":{"amount_with_insurance":""},"objects":{}},"param9":{"properties":{"amount_without_insurance":"2015"},"objects":{}},"param14":{"properties":{"column":"0"},"objects":{}}}}}
43main.j...1713222 (ligne 1)
44popup url=http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displaySimulator&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_idFormPattern=1301
45editer...cycle=0 (ligne 93)
46Simulator xml output = <sol:config><sol:param name="monthly_with_insurance">-</sol:param><sol:param name="monthly_without_insurance">120 €</sol:param><sol:param name="duration">17 mois</sol:param><sol:param name="deadlines">17 mois</sol:param><sol:param name="teg">1 %</sol:param><sol:param name="lending_rate">0.9955 %</sol:param><sol:param name="cost_with_insurance">-</sol:param><sol:param name="cost_without_insurance">15 €</sol:param><sol:param name="amount_with_insurance">-</sol:param><sol:param name="amount_without_insurance">2015 €</sol:param><sol:param name="insurance_cost">0</sol:param><sol:param name="binsurance">0</sol:param><sol:param name="cbinsurance">0</sol:param><sol:param name="amount">2000</sol:param><sol:param name="column">0</sol:param></sol:config>
47editer...cycle=0 (ligne 93)
48URL ajax call = http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displayUpdateSimulatorConfig
49main.j...1713222 (ligne 1)
50POST http://localhost:9090/sv/web/solfea/editer-un-do...STANCE_jC1k_command=displayUpdateSimulatorConfig
51   
52200 OK
53        43ms   
54data success = {"config":{"properties":{},"objects":{"param0":{"properties":{"monthly_with_insurance":""},"objects":{}},"param1":{"properties":{"monthly_without_insurance":"120"},"objects":{}},"param11":{"properties":{"binsurance":"0"},"objects":{}},"param2":{"properties":{"duration":"17"},"objects":{}},"param10":{"properties":{"insurance_cost":"0"},"objects":{}},"param13":{"properties":{"amount":"2000"},"objects":{}},"param3":{"properties":{"deadlines":"17"},"objects":{}},"param4":{"properties":{"teg":"1"},"objects":{}},"param12":{"properties":{"cbinsurance":"0"},"objects":{}},"param5":{"properties":{"lending_rate":"0.9955"},"objects":{}},"param6":{"properties":{"cost_with_insurance":""},"objects":{}},"param7":{"properties":{"cost_without_insurance":"15"},"objects":{}},"param8":{"properties":{"amount_with_insurance":""},"objects":{}},"param9":{"properties":{"amount_without_insurance":"2015"},"objects":{}},"param14":{"properties":{"column":"0"},"objects":{}}}}}
55main.j...1713222 (ligne 1)
56JSON success = {"config":{"properties":{},"objects":{"param0":{"properties":{"monthly_with_insurance":""},"objects":{}},"param1":{"properties":{"monthly_without_insurance":"120"},"objects":{}},"param11":{"properties":{"binsurance":"0"},"objects":{}},"param2":{"properties":{"duration":"17"},"objects":{}},"param10":{"properties":{"insurance_cost":"0"},"objects":{}},"param13":{"properties":{"amount":"2000"},"objects":{}},"param3":{"properties":{"deadlines":"17"},"objects":{}},"param4":{"properties":{"teg":"1"},"objects":{}},"param12":{"properties":{"cbinsurance":"0"},"objects":{}},"param5":{"properties":{"lending_rate":"0.9955"},"objects":{}},"param6":{"properties":{"cost_with_insurance":""},"objects":{}},"param7":{"properties":{"cost_without_insurance":"15"},"objects":{}},"param8":{"properties":{"amount_with_insurance":""},"objects":{}},"param9":{"properties":{"amount_without_insurance":"2015"},"objects":{}},"param14":{"properties":{"column":"0"},"objects":{}}}}}
57main.j...1713222 (ligne 1)
58popup url=http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displaySimulator&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_idFormPattern=1301
59editer...cycle=0 (ligne 93)
60Simulator xml output = <sol:config><sol:param name="monthly_with_insurance">-</sol:param><sol:param name="monthly_without_insurance">120 €</sol:param><sol:param name="duration">17 mois</sol:param><sol:param name="deadlines">17 mois</sol:param><sol:param name="teg">1 %</sol:param><sol:param name="lending_rate">0.9955 %</sol:param><sol:param name="cost_with_insurance">-</sol:param><sol:param name="cost_without_insurance">15 €</sol:param><sol:param name="amount_with_insurance">-</sol:param><sol:param name="amount_without_insurance">2015 €</sol:param><sol:param name="insurance_cost">0</sol:param><sol:param name="binsurance">0</sol:param><sol:param name="cbinsurance">0</sol:param><sol:param name="amount">2000</sol:param><sol:param name="column">0</sol:param></sol:config>
61editer...cycle=0 (ligne 93)
62URL ajax call = http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displayUpdateSimulatorConfig
63main.j...1713222 (ligne 1)
64POST http://localhost:9090/sv/web/solfea/editer-un-do...STANCE_jC1k_command=displayUpdateSimulatorConfig
65   
66200 OK
67        34ms   
68data success = {"config":{"properties":{},"objects":{"param0":{"properties":{"monthly_with_insurance":""},"objects":{}},"param1":{"properties":{"monthly_without_insurance":"120"},"objects":{}},"param11":{"properties":{"binsurance":"0"},"objects":{}},"param2":{"properties":{"duration":"17"},"objects":{}},"param10":{"properties":{"insurance_cost":"0"},"objects":{}},"param13":{"properties":{"amount":"2000"},"objects":{}},"param3":{"properties":{"deadlines":"17"},"objects":{}},"param4":{"properties":{"teg":"1"},"objects":{}},"param12":{"properties":{"cbinsurance":"0"},"objects":{}},"param5":{"properties":{"lending_rate":"0.9955"},"objects":{}},"param6":{"properties":{"cost_with_insurance":""},"objects":{}},"param7":{"properties":{"cost_without_insurance":"15"},"objects":{}},"param8":{"properties":{"amount_with_insurance":""},"objects":{}},"param9":{"properties":{"amount_without_insurance":"2015"},"objects":{}},"param14":{"properties":{"column":"0"},"objects":{}}}}}
69main.j...1713222 (ligne 1)
70JSON success = {"config":{"properties":{},"objects":{"param0":{"properties":{"monthly_with_insurance":""},"objects":{}},"param1":{"properties":{"monthly_without_insurance":"120"},"objects":{}},"param11":{"properties":{"binsurance":"0"},"objects":{}},"param2":{"properties":{"duration":"17"},"objects":{}},"param10":{"properties":{"insurance_cost":"0"},"objects":{}},"param13":{"properties":{"amount":"2000"},"objects":{}},"param3":{"properties":{"deadlines":"17"},"objects":{}},"param4":{"properties":{"teg":"1"},"objects":{}},"param12":{"properties":{"cbinsurance":"0"},"objects":{}},"param5":{"properties":{"lending_rate":"0.9955"},"objects":{}},"param6":{"properties":{"cost_with_insurance":""},"objects":{}},"param7":{"properties":{"cost_without_insurance":"15"},"objects":{}},"param8":{"properties":{"amount_with_insurance":""},"objects":{}},"param9":{"properties":{"amount_without_insurance":"2015"},"objects":{}},"param14":{"properties":{"column":"0"},"objects":{}}}}}
71main.j...1713222 (ligne 1)
72popup url=http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displaySimulator&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_idFormPattern=1301
73editer...cycle=0 (ligne 93)
74Simulator xml output = <sol:config><sol:param name="monthly_with_insurance">-</sol:param><sol:param name="monthly_without_insurance">120 €</sol:param><sol:param name="duration">17 mois</sol:param><sol:param name="deadlines">17 mois</sol:param><sol:param name="teg">1 %</sol:param><sol:param name="lending_rate">0.9955 %</sol:param><sol:param name="cost_with_insurance">-</sol:param><sol:param name="cost_without_insurance">15 €</sol:param><sol:param name="amount_with_insurance">-</sol:param><sol:param name="amount_without_insurance">2015 €</sol:param><sol:param name="insurance_cost">0</sol:param><sol:param name="binsurance">0</sol:param><sol:param name="cbinsurance">0</sol:param><sol:param name="amount">2000</sol:param><sol:param name="column">0</sol:param></sol:config>
75editer...cycle=0 (ligne 93)
76URL ajax call = http://localhost:9090/sv/web/solfea/editer-un-dossier?p_p_id=solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k&p_p_lifecycle=0&p_p_state=exclusive&p_p_mode=view&p_p_col_id=column-1&p_p_col_count=1&_solfeausereditfolder_WAR_solfeaportlet_INSTANCE_jC1k_command=displayUpdateSimulatorConfig
77main.j...1713222 (ligne 1)
78POST http://localhost:9090/sv/web/solfea/editer-un-do...STANCE_jC1k_command=displayUpdateSimulatorConfig
79   
80400 Mauvaise Requête
81        10ms   
82readyState = undefined
83main.j...1713222 (ligne 1)
84status = undefined
85main.j...1713222 (ligne 1)
86statusText = undefined
87main.j...1713222 (ligne 1)
88responseText = undefined
89main.j...1713222 (ligne 1)
90e.getAllResponseHeaders is not a function
91[Stopper sur une erreur] $(document).ready(function(a,b){$(".so...d){$("#"+c).removeAttr("disabled")})};
92main.j...1713222 (ligne 1)
Jelmer Kuperus
RE: HTTP link request causing a blank content (HTTP error 400)
December 11, 2011 2:11 AM
Answer

Jelmer Kuperus

Rank: Liferay Legend

Posts: 1192

Join Date: March 10, 2010

Recent Posts

There does not seem to be, though what you are doing isn't the smartest thing to do.

1. you should be using @ResourceMapping here instead of @RenderMapping with window state set to exclusive
2. you should be using some sort of json library to build that json, because you might end up with malformed json otherwise

Is there anything in the server log?
Are you using spring 3.0.5 or higher ?, older versions have some nasty bugs
Did you set up spring's logging properly ?

If you still can't sort it out and have a minimal testcase attach it to the thread and if i can find the time i'll take a look
Francois Fournel
RE: HTTP link request causing a blank content (HTTP error 400)
December 22, 2011 9:29 AM
Answer

Francois Fournel

Rank: Junior Member

Posts: 99

Join Date: April 15, 2010

Recent Posts

The origin of the problem comes from the url. I dynamically construct a URL like this :

1
2var popupURL="<portlet:renderURL  windowState='<%= LiferayWindowState.EXCLUSIVE.toString() %>'><portlet:param name='command' value='displaySimulator' /><portlet:param name='idFormPattern' value='dummy_idFormPattern' /></portlet:renderURL>";


And a javascript code call it into a popup (new windows).


So I tried to change with a resourceURL like you said, the called url becomes
1
2var popupURL="<portlet:resourceURL id='displaySimulator'><portlet:param name='idFormPattern' value='dummy_idFormPattern' /></portlet:resourceURL>";


But the problem still remains.

The error is in this URL call I suppose (HTTP error 400, bad request).
The content of the popup goes blank and the server does not respond anymore.


EDIT : I see that the "error" callback method of the ajax call is called , WHEREAS, the server method is not called at all. The server method is simply skipped.

EDIT2 : http://issues.liferay.com/browse/LPS-3584
Erko Hansar
RE: HTTP link request causing a blank content (HTTP error 400)
January 12, 2012 6:08 AM
Answer

Erko Hansar

Rank: New Member

Posts: 1

Join Date: January 12, 2012

Recent Posts

Did you find a solution to your problem?
Alejandro López
RE: HTTP link request causing a blank content (HTTP error 400)
March 5, 2012 7:04 AM
Answer

Alejandro López

Rank: Junior Member

Posts: 53

Join Date: July 8, 2011

Recent Posts

jelmer kuperus:
Two questions :

Is there an apache instance infront of your servlet container ?
Do you use https ?


Hi.

I have similar problem. A lot of pages runs ok, but certain pages I create above some time (the last pages I create), proudces HTTP 400.

I've Weblogic Servlet Container, with one apache instance infront.

¿Do you think is apache problem?
Krzysztof Makowski
RE: HTTP link request causing a blank content (HTTP error 400)
November 14, 2012 3:18 AM
Answer

Krzysztof Makowski

Rank: New Member

Posts: 2

Join Date: April 17, 2012

Recent Posts

Alejandro López:

I have similar problem. A lot of pages runs ok, but certain pages I create above some time (the last pages I create), proudces HTTP 400.



The same here. I am using liferay tomcat bundle 6.1.0.
Alejandro López
RE: HTTP link request causing a blank content (HTTP error 400)
December 10, 2012 3:56 AM
Answer

Alejandro López

Rank: Junior Member

Posts: 53

Join Date: July 8, 2011

Recent Posts

Krzysztof Makowski:
Alejandro López:

I have similar problem. A lot of pages runs ok, but certain pages I create above some time (the last pages I create), proudces HTTP 400.



The same here. I am using liferay tomcat bundle 6.1.0.



I don't remember very well. I think, my problem was that my tablespace were full. We increase tablespace size and the problem disappears.

Take a look.
Rubén García Tamayo
RE: HTTP link request causing a blank content (HTTP error 400)
November 29, 2012 3:55 AM
Answer

Rubén García Tamayo

Rank: New Member

Posts: 7

Join Date: October 10, 2011

Recent Posts

Hi jelmer Kuperus,

In this thread you asked about apache instance infront of tomcat, I'm experiencing a similar problem with bad request but I've got apache2 infront of tomcat.
Do you know what's happening?
I think my problem is in apache2 side but i can't get it work.

jelmer kuperus:
Two questions :

Is there an apache instance infront of your servlet container ?
Do you use https ?