Skip to Content
0
Former Member
Mar 12, 2015 at 01:09 PM

Bad URL HTTP STatus 400 error.

211 Views

Hi, I am working on an enhancement to B2B Accelerator(Release 5.2) in which I need to set a country for a B2B Customer and set multiple languages and single currency for the country. Once the B2B customer logs in he should see the page in his currency and any one of the languages for his country. Also he should see the dropdown in header for languages for his country. For the customer to see the page in his currency and one of the defined languages I have made changes to AbstractPageController to identify non-anonymous user and set his dropdown languages,page display language and currency as follows: @ModelAttribute("languages") public Collection<LanguageData> getLanguages() { if (userFacade.isAnonymousUser()) { return storeSessionFacade.getAllLanguages(); } else { final Collection<LanguageData> colLangData = getCustomerFacade().getCurrentB2BCustomer().getCountry().getLanguages(); final LanguageData[] ld = new LanguageData[100]; colLangData.toArray(ld); final LanguageData ld1 = ld[0]; storeSessionFacade.setCurrentLanguage(ld1.getIsocode()); userFacade.syncSessionLanguage(); return getCustomerFacade().getCurrentB2BCustomer().getCountry().getLanguages(); } } @ModelAttribute("currencies") public Collection<CurrencyData> getCurrencies() { if (userFacade.isAnonymousUser()) { return storeSessionFacade.getAllCurrencies(); } else { final Collection<CurrencyData> currency = new ArrayList<CurrencyData>(); final CurrencyData cd = getCustomerFacade().getCurrentB2BCustomer().getCountry().getCurrency(); currency.add(cd); // final String previousLanguage = storeSessionFacade.getCurrentLanguage().getIsocode(); storeSessionFacade.setCurrentCurrency(cd.getIsocode()); userFacade.syncSessionLanguage(); return currency; } } WIth the above changes, after the customer logs in he is able to see the page in his language and currency and dropdown with the country's languages is also visible. But when I select a language other than the page's language there is HTTP STatus 400 error. WHich means its bad URL. Also the URL displayed on the error page is - http://localhost:9001/b2bstore/powertools/de/JPY/_s/language.

I am not able to crack this issue. Will be glad if someone can throw light on the same.