HTTP Status 400 - Invalid path /AnalyticalReporting/WebiCreate was requeste

Hi,
I have a  BusinessObject Enterprise XI 3.1 installed on a Linux server.
When I try to create a New Web Intelligence Document, I get the following error.
HTTP Status 400 - Invalid path /AnalyticalReporting/WebiCreate was requeste
Do I need to install another module to activate this feature?
Thanks
/Yannick

Hello Yannick
Have a look at the following SAP note 1431655
https://bosap-support.wdf.sap.corp/sap/support/notes/1431655
Basically, you have to use the wdeploy command.
Another information: When you install a Service Pack or a Fix Pack, the war files need to be redeployed.
The installation program asks you if you want to do it manually or automatically.
Regards,
Philippe

Similar Messages

  • Business Objects XI 3.1 SP4 Infoview and IE9 HTTP Status 400 - Invalid path

    Hi There,
    When I working in Infoview with IE9 32Bit or 64Bit and I right click on any object i.e Crystal Report, Folder, Webi Report etc. and select properties I get the following Error
    HTTP Status 400 - Invalid path /PlatformServices/properties was requested
    Has any one got a workaround or a solution for this problem.
    Server - BOE XI 3.1 with SP4 running on a Windows Server 2008 R2 64 bit.
    Client PC`s\Laptops  - Windows 7 64 bit
    Kind Regards,
    Frikkie

    Dear all,
    Seems the issue is browser compatibility ans the below solution may work in your case
    HTTP 400 occurs because of URL difference between IE9 and older versions of supported IE. To resolve this issue, this error in Tomcat will be redirected to a HTML script that applies new URL format. Please follow this 3 steps process:
    STEP ONE: Solution in InfoViewAppActions Folder:
    1) Go to “D:\Business Objects\Tomcat55\webapps\InfoViewAppActions” folder. This folder already has httperror_404.htm and httperror_500.jsp by default.  Rename httperror_404.htm to httperror_404_backup.htm.
    2) Copy and paste the attached file from InfoViewAppActions folder (httperror_400.htm and httperror_404.htm) into “D:\Business Objects\Tomcat55\webapps\InfoViewAppActions” folder. Go to “D:\Business Objects\Tomcat55\webapps\InfoViewAppActions\WEB-INF”
    3) Take a backup of web.xml file and name it as web_backup.xml
    4) Open the file and paste the following script after the Error 404 error handling and save.
    Before:
    <error-page>
            <error-code>404</error-code>
    <location>/httperror_404.htm</location>
        </error-page>
    After:
    <error-page>
    <error-code>404</error-code>
    <location>/httperror_404.htm</location>
        </error-page>
        <error-page>
    <error-code>400</error-code>
    <location>/httperror_400.htm</location>
        </error-page>
    STEP TWO: Solution in AnalyticalReporting Folder:
    1) Go to “D:\Business Objects\Tomcat55\webapps\ AnalyticalReporting” folder. This folder already has httperror_404.htm and httperror_500.jsp by default.  Rename httperror_404.htm to httperror_404_backup.htm.
    2) Copy and paste the attached file from AnalyticalReporting folder (httperror_400.htm and httperror_404.htm) into “D:\Business Objects\Tomcat55\webapps\ AnalyticalReporting” folder. Go to “D:\Business Objects\Tomcat55\webapps\ AnalyticalReporting \WEB-INF”
    3) Take a backup of web.xml file and name it as web_backup.xml
    4) Open the file and paste the following script after the Error 404 error handling and save.
    Before:
    <error-page>
    <error-code>404</error-code>
    <location>/httperror_404.htm</location>
        </error-page>
    After:
    <error-page>
    <error-code>404</error-code>
    <location>/httperror_404.htm</location>
        </error-page>
        <error-page>
    <error-code>400</error-code>
    <location>/httperror_400.htm</location>
        </error-page>

  • 400   Bad Request - Invalid path /b2c/secure was requested

    Hi,
    I have two jsp pages. first page is included as a link in one of the inc.jsp in B2C application.
    This page has few input fields and upon submit button. I get error message
    400 Bad Request - Invalid path /b2c/secure was requested
    the action tag written in config.xml is like:
    <action path="/b2c/xyz" type="package_name.xyz">
              <forward name="success" path="/b2c/Page2.jsp"/>
              <forward name="failure" path="/b2c/Page2.jsp"/>
              </action>
    in web.xml:
    <servlet>
            <servlet-name>Page1.jsp</servlet-name>
            <jsp-file>/b2c/Page1.jsp</jsp-file>
            </servlet>
        <servlet>
            <servlet-name>Page2.jsp</servlet-name>
            <jsp-file>/b2c/Page2.jsp</jsp-file>
        </servlet>
    Please let me know if you could help me with the needful. Appreciate your earliest response.

    Hi Bharathi,
    If you are embedding a link in jsp where you are directly calling another jsp, its always better to code it like this
    <a href="<isa:webappsURL name="/b2c/Page1.jsp"/>" target="_new">
    There is no need to make any changes in web.xml file.
    If in your inc.jsp you want to call an action class on click on a link than call a javascript method onclick on that link
    test() is a javascript method where you will call your action class like
    function test() {
           isaTop().parent.location.href="<isa:webappsURL name='/b2c/xyz1.do'/>";
    Changes in config.xml should be like
    <action path="/b2c/xyz1" type="package_name.xyz">
              <forward name="success" path="/b2c/Page2.jsp"/>
              <forward name="failure" path="/b2c/Page2.jsp"/>
    </action>
    Make use of "<isa:webappsURL name='/test/test.jsp'/>" and it will work. Hope this helps you.
    Regards,
    Arshi
    Edited by: Arshi Arshi on Oct 3, 2009 9:50 AM

  • Invalid path /actions/register2 was requested

    Hi , I am new in struts, I following the guide in http://www.coreservlets.com/Apache-Struts-Tutorial/ and always got
    error
    The request sent by the client was syntactically incorrect (Invalid path /actions/register2 was requested).
    I havestruts-config.xml under TStruct\WEB-INF<action-mappings>
        <action path="/actions/register1"
                type="coreservlets.RegisterAction1">
          <forward name="success"
                   path="/WEB-INF/results/result1.jsp"/>
        </action>
        <action path="/actions/register2"
                type="coreservlets.RegisterAction2">
          <forward name="bad-address"
                   path="/WEB-INF/results/bad-address2.jsp"/>
          <forward name="bad-password"
                   path="/WEB-INF/results/bad-password2.jsp"/>
          <forward name="success"
                   path="/WEB-INF/results/result2.jsp"/>
        </action>i have RegisterAction2.class under coreservlets
    I have register2.jsp under webapps\TStruct\forms
    I have bad-address2.jsp.. TStruct\WEB-INF\results
    I suppose right, why i always have mistake??
    help to point out
    Thank you

    It work fine now. it just work like before it just not work, I don't why?

  • HTTP STatus 400: WebiView was requested

    Hi All
    I install BOE to my ZCM 11 Primary server(SLES11), and it install successfully.
    I click reporting service from ZCC, and generate anyone report,it's fail.
    The web shaow "HTTP Status 400 - Invalid path /AnalyticalReporting/WebiView was requested"
    Type: Status report
    Message: Invalid path /AnalyticalReporting/WebiView was requested
    Description: The request sent by the client was syntactically incorrect (Invalid path /AnalyticalReporting/WebiView was requested).
    Do I have patch for fix it ?
    wyld

    Originally Posted by wyld
    Hi All
    I install BOE to my ZCM 11 Primary server(SLES11), and it install successfully.
    I click reporting service from ZCC, and generate anyone report,it's fail.
    The web shaow "HTTP Status 400 - Invalid path /AnalyticalReporting/WebiView was requested"
    Type: Status report
    Message: Invalid path /AnalyticalReporting/WebiView was requested
    Description: The request sent by the client was syntactically incorrect (Invalid path /AnalyticalReporting/WebiView was requested).
    Do I have patch for fix it ?
    wyld
    What browser and version are you using?
    Thomas

  • Http Status 400

    Hi.
    First of all, If this is in the wrong part of the forum.
    A user is running windows 7, Since her PC was upgraded from XP she is unable to run any infoview reports. They reports are created in crystal reports. Other users are able to run the same report, She is the only person who has been upgraded to windows 7.
    She receives an error when running the report as below;
    https status 400 - invalid path \ crystalreports\view was requested
    Type : Status Report
    Message : invalid path\crystalreports\view was requested
    Description : The request sent by the client was syntactically incorrect (invalid path \ crystalreports\view was requested
    Does anyone have any idea how to resolve this error ?
    Thank you
    Leigh

    Hello and thanks for the reply and sorry for the delay responding.
    Installing chrome has worked for the users that this affects. Does anyone know what the problem with IE 9 is ? Our IT dept are rolling out IE 9 as part of the windows 7 upgrade. We have approx 60-70 business objects users and we can't install chrome as a seperate browser to use with buiness objects on each PC.
    Thanks
    Leigh

  • "The request failed with HTTP Status 400: Bad Request." when running reports

    Hi,
    I installed reporting services and the install went fine.  The Reporting Services are located on a different server.  I can see all the reports in SCCM but when I try to run them I get the "400" error with the following details:
    System.Net.WebException
    The request failed with HTTP status 400: Bad Request.
    Stack Trace:
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.ReportExecutionService.LoadReport2(String Report, String HistoryID)
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.<>c__DisplayClass2.<LoadReport>b__0()
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.ProxyMethodInvocation.Execute[TReturn](RSExecutionConnection connection, ProxyMethod`1 initialMethod, ProxyMethod`1 retryMethod)
       at Microsoft.Reporting.WinForms.Internal.Soap.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID)
       at Microsoft.Reporting.WinForms.ServerReport.EnsureExecutionSession()
       at Microsoft.Reporting.WinForms.ServerReport.SetParameters(IEnumerable`1 parameters)
       at Microsoft.ConfigurationManagement.AdminConsole.SrsReporting.ReportViewerWindowsForms.SetParameterValues_DoWork(Object sender, DoWorkEventArgs e)
    I can open the URL from the SCCM server but when I select a report I am unable to select any report options if available.  If no options are availble the report just doesn't run,  I don't get and error if I select "View Report" mutiple
    times.
    If I connect to the Reporting Services site on the computer where it is installed all the reports run fine.
    One thing I have noticed is that when I try to change or add a role assignment for Reporting Services the edited account always reverts back to the default settings and the added Domain user is dropped.
    Thanks

    I reviewed the topic and found a couple of steps I missed the first time around.  I had to "Configure Reports to Use Report Builder 3.0 and setting the "Log on Locally" permission. 
    I then uninstalled the role and reinstalled it.  I am still getting the 400 error.
    When I inspected the SmsAdminUI.log I noticed the Error on the last line 2151811598 (it repeats in the log).  I couldn't find anything specific related to it.  By reading a few "related" Internet posts I came accross a intial setup
    blog that noted some WMI firewall execptions (Async-in, DCOM-in and WMI-in) as require so I checked and they were not allowed on the SCCM server so I allowed them and tested with the same result.  I turned them off again. 
    Here is the tail end of the SmsAdminUI.log
    [19, PID:2684][01/24/2013 16:08:29] :[ReportProxy] - User-specified default Reporting Point [INC-SQL42.deccoinc.net] could not be found, [] is now the default Reporting Point.
    [4, PID:2684][01/24/2013 16:08:30] :[ReportProxy] - User-specified default Reporting Point [INC-SQL42.deccoinc.net] could not be found, [] is now the default Reporting Point.
    [15, PID:2684][01/24/2013 16:08:30] :[ReportProxy] - User-specified default Reporting Point [INC-SQL42.deccoinc.net] could not be found, [] is now the default Reporting Point.
    [1, PID:2684][01/24/2013 19:06:02] :System.Management.ManagementException\r\nNot found \r\n   at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
       at System.Management.ManagementObject.Initialize(Boolean getObject)
       at System.Management.ManagementBaseObject.get_wbemObject()
       at System.Management.PropertyData.RefreshPropertyInfo()
       at System.Management.PropertyDataCollection.get_Item(String propertyName)
       at System.Management.ManagementBaseObject.GetPropertyValue(String propertyName)
       at System.Management.ManagementBaseObject.get_Item(String propertyName)
       at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlConnectionManager.GetInstance(String objectPath)\r\nManagementException details:
    instance of SMS_ExtendedStatus
     Description = "Error retrieving object FileType=2";
     ErrorCode = 2151811598;
     File = "e:\\nts_sccm_release\\sms\\siteserver\\sdk_provider\\smsprov\\SspInterface.h";
     Line = 1208;
     Operation = "GetObject";
     ParameterInfo = "SMS_SCI_SysResUse.FileType=2,ItemName=\"[\\\"Display=\\\\\\\\INC-SQL42.deccoinc.net\\\\\\\"]MSWNET:[\\\"SMS_SITE=INC\\\"]\\\\\\\\INC-SQL42.deccoinc.net\\\\,SMS SRS Reporting Point\",ItemType=\"System Resource Usage\",SiteCode=\"INC\"";
     ProviderName = "ExtnProv";
     StatusCode = 2147749890;
    \r\n
    [1, PID:2684][01/24/2013 23:39:14] :System.NullReferenceException\r\nObject reference not set to an instance of an object.\r\n   at Microsoft.ConfigurationManagement.AdminConsole.SmsCustomDialog.get_LocaleIndependentIdentifier()
       at Microsoft.ConfigurationManagement.AdminConsole.ShowDialogTaskHandler.DoTask(NavigationModelNodeBase node, SccmTaskConfiguration sccmTask, PropertyDataUpdated dataUpdatedDelegate, Boolean readOnly)\r\n
    [1, PID:5008][01/25/2013 20:48:00] :System.Management.ManagementException\r\nNot found \r\n   at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
       at System.Management.ManagementObject.Initialize(Boolean getObject)
       at System.Management.ManagementBaseObject.get_wbemObject()
       at System.Management.PropertyData.RefreshPropertyInfo()
       at System.Management.PropertyDataCollection.get_Item(String propertyName)
       at System.Management.ManagementBaseObject.GetPropertyValue(String propertyName)
       at System.Management.ManagementBaseObject.get_Item(String propertyName)
       at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlConnectionManager.GetInstance(String objectPath)\r\nManagementException details:
    instance of SMS_ExtendedStatus
     Description = "Error retrieving object FileType=2";
     ErrorCode = 2151811598;
     File = "e:\\nts_sccm_release\\sms\\siteserver\\sdk_provider\\smsprov\\SspInterface.h";
     Line = 1208;
     Operation = "GetObject";
     ParameterInfo = "SMS_SCI_SysResUse.FileType=2,ItemName=\"[\\\"Display=\\\\\\\\INC-SQL42.deccoinc.net\\\\\\\"]MSWNET:[\\\"SMS_SITE=INC\\\"]\\\\\\\\INC-SQL42.deccoinc.net\\\\,SMS SRS Reporting Point\",ItemType=\"System Resource Usage\",SiteCode=\"INC\"";
     ProviderName = "ExtnProv";
     StatusCode = 2147749890;
    \r\n

  • GetItemsRequest failed with HTTP status 400

    At one of our customers we've got a strange error.
    The Login/Logout request works fine, but the getItemsRequest fails with status 400.
    Here is the soap request:
    ------- SoapRequest at 13:29:22 -------
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><session xmlns="http://schemas.novell.com/2005/01/GroupWise/types">BbOOBFebTkAxSffn</session></soap:Header><soap:Body><getItemsRequest xmlns="http://schemas.novell.com/2005/01/GroupWise/methods"><view>default id container @type message subject startDate endDate attachments recipients status</view><filter><element xsi:type="FilterGroup" xmlns="http://schemas.novell.com/2005/01/GroupWise/types"><op>and</op><element xsi:type="FilterEntry"><op>contains</op><field>subject</field><value>*</value></element></element></filter><items><item xmlns="http://schemas.novell.com/2005/01/GroupWise/types">4ECE5BEE.GWDOMNM.GWPOSTNM.100.1333466.1.16E BA.1</item></items><count>-1</count></getItemsRequest></soap:Body></soap:Envelope>
    POA is 8.0.2, any suggestions?

    There is not enough information.
    You could check the POA log file.
    You can turn on logging the soap requests in the POA log file
    to see if that shows the error around the time on the soap
    request.
    If you get an 8.0.x build after 98083, we put the engine
    error in an HTTP header line:
    X-GWError-Code: xxxx
    Preston
    >>> On Wednesday, January 04, 2012 at 6:26 AM,
    hkunze<[email protected]> wrote:
    > At one of our customers we've got a strange error.
    > The Login/Logout request works fine, but the getItemsRequest fails with
    > status 400.
    >
    > Here is the soap request:
    >
    > ‑‑‑‑‑‑‑ SoapRequest at 13:29:22 ‑‑‑‑‑‑‑
    >
    > <?xml version="1.0" encoding="utf‑8"?>
    > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
    > xmlns:xsi="http://www.w3.org/2001/XMLSchema‑instance"
    > xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Header><session
    > xmlns="http://schemas.novell.com/2005/01/GroupWise/types">BbOOBFebTkAxSff
    > n</session></soap:Header><soap:Body><getItemsRequest
    > xmlns="http://schemas.novell.com/2005/01/GroupWise/methods"><view>default
    > id container @type message subject startDate endDate attachments
    > recipients status</view><filter><element xsi:type="FilterGroup"
    >
    xmlns="http://schemas.novell.com/2005/01/GroupWise/types"><op>and</op><eleme
    nt
    >
    xsi:type="FilterEntry"><op>contains</op><field>subject</field><value>*</valu
    e></elemen
    > t></element></filter><items><item
    > xmlns="http://schemas.novell.com/2005/01/GroupWise/types">4ECE5BEE.GWDOMN
    >
    M.GWPOSTNM.100.1333466.1.16EBA.1</item></items><count>‑1</count></getItems
    Request></s
    > oap:Body></soap:Envelope>
    >
    > POA is 8.0.2, any suggestions?

  • BPC NW 7.5 - Request failed with HTTP status 400:  Bad Request

    Dear Experts,
    I am trying to upload a flat file to BPC server. I am getting the following error.
    " Request to transfer a file to the server failed (ERROR): The request failed with HTTP status 400: Bad Request"
    Could any of you please help?
    I am selecting BPC for excel >manage data > upload data file > selection for source file > selection of destination file > ok
    Thanks in advance
    Vipin Jain

    Hi Vipin,
    Glad to know that you have heard good about me.
    Can you try to upload the same file from some other system. If it doesnt work from any system, there might be some problem with the flat file. In that case, you can try to create a small and simple file and try to upload that.
    You might also get this error if there is a blank line at the end of the file.
    Hope this helps.

  • I am getting an error Bad Request Request too long HTTP Error 400. The size of the request headers is too long.

    When I sign into Methodintegration.com my data base I can get in ok. When I sign out I get the following error: I am getting an error Bad Request Request too long HTTP Error 400. The size of the request headers is too long. If I close Fire Fox and go back in it will work one time and then I get the same error message.

    That is usually a problem with corrupted cookies.
    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"

  • If I access the website of Cebu Pacific I get as reply upon entering a search request "HTTP Error 400. The size of the request headers is too long.", but if i use private browsing i do not get this reply. How do i resolve that?

    If I access the website of Cebu Pacific Air I get as reply upon entering a search request "HTTP Error 400. The size of the request headers is too long.", but if i use private browsing i do not get this reply. This refers to Firefox 5.0 on ubuntu 11.04
    I have tried to resolve this through deleting history and the cookies, but i always get the same reply. Although if i use firefox (ubuntu) private browsing or Firefox on Windows 7 i do not get this error message.
    What causes this error and how do i resolve this?

    Copied from the link mentioned below.
    ''That is usually a problem with corrupted cookies. Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies" ''
    https://support.mozilla.com/en-US/questions/785186?s=http+error+400&as=s
    Check and tell if its working.

  • Http status 400 error in the emulator

    I successfully have run the servlet (ImageAdapter.java). The servlet is suposed to convert GIF images into PNG images according to the clients display settings by using Sun's Jimi packages. It displays both gif and png type images in IE. Now, I am trying to run the midlet (ImageClient.java) in the J2ME toolkit 2.2. It displays the gif image in the emulator. But, when I try to display a png image it gives me a http 400 error. Why is this ? Can anyone help ?
    servlet code: ImageAdapter.java
    import com.sun.jimi.core.*;
    import com.sun.jimi.core.util.*;
    //import com.sun.jimi.util.*;
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.lang.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    * A simple example of a servlet that reads the image from
    * a given URL and uses Jimi to convert it to PNG format,
    * scaling it and recoloring it appropriately for the device.
    * Can be called using either GET or POST.  If GET, then the
    * request parameters are used to determine the URL of the
    * image to fetch and the scaling and color attributes.
    * If POST, the data is sent as UTF-encoded string pairs in the
    * request body.
    public class ImageAdapter extends HttpServlet {
        // The PNG MIME type
        static final String PNG_MIME = "image/png";
        // Convenience method
        static boolean getBooleanProperty( Properties p,
                                           String key,
                                           boolean def ){
            String  sval = p.getProperty( key );
            boolean bval = def;
            if( sval != null ){
                bval = ( sval.equalsIgnoreCase( "true" ) ||
                         sval.equals( "1" ) );
            return bval;
        // Convenience method
        static int getIntegerProperty( Properties p,
                                       String key,
                                       int def ){
            String sval = p.getProperty( key );
            int    ival = def;
            if( sval != null ){
                try {
                    ival = Integer.parseInt( sval );
                catch( NumberFormatException e ){
            return ival;
        // Process GET requests.  Sets up some defaults and then
        // overrides them with the request parameters.
        public void doGet( HttpServletRequest request,
                            HttpServletResponse response )
                throws IOException, ServletException {
            // Put in some defaults for testing with a browser
            Properties props = new Properties();
            props.put( "url",
                 "http://localhost:8080/img/Availability.png" );
            props.put( "colors", "256" );
            props.put( "minwidth", "200" );
            props.put( "maxwidth", "200" );
            props.put( "minheight", "200" );
            props.put( "maxheight", "200" );
            // Overwrite the default with any request parameters...
            Enumeration names = request.getParameterNames();
            while( names.hasMoreElements() ){
                String key = (String) names.nextElement();
                props.put( key, request.getParameter( key ) );
            // Now send back the image...
            adaptImage( props, response );
        // Process POST request.  Parameters are extracted from
        // the request body.
        public void doPost( HttpServletRequest request,
                            HttpServletResponse response )
                throws IOException, ServletException {
            // Get the input stream and read the data...
            ServletInputStream in = request.getInputStream();
            DataInputStream    din = new DataInputStream( in );
            Properties         props = new Properties();
            // Read in properties as sent by client.
            while( true ){
                try {
                    String key = din.readUTF();
                    if( key.length() == 0 ) break;
                    props.put( key, din.readUTF() );
                catch( IOException e ){
                    break;
            din.close();
            adaptImage( props, response );
        // Use Jimi to grab the original image and
        // then scale it and reduce its colors
        // based on the requested settings.
        private void adaptImage( Properties props,
                                 HttpServletResponse response )
                    throws IOException, ServletException {
            // Read in the parameters, with appropriate
            // defaults.
            String imageURL = props.getProperty( "url" );
            if( imageURL == null ){
                response.sendError( response.SC_BAD_REQUEST,
                                   "No 'url' specified" );
                return;
            int minWidth = getIntegerProperty( props,
                                               "minwidth",
                                               0 );
            int maxWidth = getIntegerProperty( props,
                                               "maxwidth",
                                               96 );
            int minHeight = getIntegerProperty( props,
                                                "minheight",
                                                0 );
            int maxHeight = getIntegerProperty( props,
                                                "maxheight",
                                                0 );
            int colors = getIntegerProperty( props,
                                             "colors", 2 );
            boolean dither = getBooleanProperty( props,
                                                 "dither",
                                                 true );
            boolean reduce = getBooleanProperty( props,
                                                 "reduce",
                                                 false );
            // Now read in the image using Jimi...
            URL url;
            try {
                url = new URL( imageURL );
            catch( MalformedURLException e ){
                response.sendError( response.SC_BAD_REQUEST,
                                    "Invalid image URL" );
                return;
            Image img = Jimi.getImage( url, Jimi.SYNCHRONOUS |
                                            Jimi.IN_MEMORY );
            if( img == null ){
                response.sendError( response.SC_BAD_REQUEST,
                                    "Bad image format" );
                return;
            // Now adjust the image, first by
            // scaling it if necessary....
            int     width = img.getWidth( null );
            int     height = img.getHeight( null );
            boolean scale = false;
            if( width < minWidth ){
                width = minWidth;
                scale = true;
            } else if( width > maxWidth){
                width = maxWidth;
                scale = true;
            if( height < minHeight ){
                height = minHeight;
                scale = true;
            } else if( height > maxHeight ){
                height = maxHeight;
                scale = true;
            if( scale ){
                img = img.getScaledInstance( width, height,
                           Image.SCALE_SMOOTH );
                GraphicsUtils.waitForImage( img );
            // Now adjust the color depth...
            if( reduce ){
                ColorReducer reducer = new ColorReducer( colors,
                                                         dither );
                try {
                    img = reducer.getColorReducedImage( img );
                catch( Exception e ){
                    response.sendError( response.SC_BAD_REQUEST,
                                        "Error reducing image" );
                    return;
                GraphicsUtils.waitForImage( img );
            // Convert it to PNG format
            ByteArrayOutputStream bout = new ByteArrayOutputStream();
            try {
                Jimi.putImage( PNG_MIME, img, bout );
            catch( Exception e ){
                response.sendError( response.SC_BAD_REQUEST,
                                    "Error converting image" );
                return;
            byte[] data = bout.toByteArray();
            // Send it out!
            response.setContentType( PNG_MIME );
            response.setContentLength( data.length );
            response.setStatus( response.SC_OK );
            OutputStream out = response.getOutputStream();
            out.write( data );
            out.close();
    }MIDlet code: ImageClient.java
    import java.io.*;
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.*;
    * A MIDP application that fetches and displays an arbitrary
    * image from the Web using the ImageAdapter servlet.
    * This class depends on HttpConnectionHelper, described
    * in an earlier J2ME Tech Tip.
    public class ImageClient extends MIDlet
                             implements CommandListener {
        // Adjust this URL appropriately for the adapter...
        private static String adapterURL =
         "http://localhost:8080/img/image";
        // A default image to display...
        private static String defaultURL =
         "http://localhost:8080/img/Availability.png";
    //http://www.w3schools.com/images/ie.gif
        private Display display;
        private Command exitCommand = new Command( "Exit",
                                                   Command.EXIT, 1 );
        private Command okCommand   = new Command( "OK", Command.OK, 1 );
        private Command sendCommand = new Command( "Get",
                                                   Command.OK, 1 );
        private TextBox entryForm;
        private int     screenHeight;
        private int     screenWidth;
        private int     numColors;
        public ImageClient(){
        protected void destroyApp( boolean unconditional )
                           throws MIDletStateChangeException {
            exitMIDlet();
        protected void pauseApp(){
        protected void startApp()
                          throws MIDletStateChangeException {
            if( display == null ){ // first time called...
                initMIDlet();
        // First we display the dummy canvas so we can
        // get information about the display
        private void initMIDlet(){
            display = Display.getDisplay( this );
            entryForm = new EntryForm();
            display.setCurrent( new DummyCanvas() );
        public void exitMIDlet(){
            notifyDestroyed();
        public void commandAction( Command c, Displayable d ){
            if( c == sendCommand ){
                StatusForm f =
                    new StatusForm( entryForm.getString() );
                display.setCurrent( f );
                f.start();
            } else if( c == okCommand ){
                display.setCurrent( entryForm );
            } else {
                exitMIDlet();
        // A dummy canvas to get the size of the screen
        class DummyCanvas extends Canvas {
            protected void paint( Graphics g ){
                screenHeight = getHeight();
                screenWidth  = getWidth();
                numColors    = display.numColors();
                // Go directly to the main screen
                display.setCurrent( entryForm );
        // The text entry form...
        class EntryForm extends TextBox {
            EntryForm(){
                super( "Enter a URL", defaultURL, 80, 0 );
                addCommand( exitCommand );
                addCommand( sendCommand );
                setCommandListener( ImageClient.this );
        // Show the image...
        class ShowImage extends Canvas {
            ShowImage( byte[] imageData ){
                image = Image.createImage( imageData, 0,
                                           imageData.length );
                display.setCurrent( this );
                addCommand( okCommand );
                setCommandListener( ImageClient.this );
            protected void paint( Graphics g ){
                g.drawImage( image, 0, 0,
                             g.TOP | g.LEFT );
            private Image image;
        // A status for for displaying messages as the data is sent...
        class StatusForm extends Form
                     implements Runnable,
                                HttpConnectionHelper.Callback {
            StatusForm( String url ){
                super( "Status" );
                try {
                    ByteArrayOutputStream bout =
                                new ByteArrayOutputStream();
                    DataOutputStream      dout =
                                new DataOutputStream( bout );
                    // Write info about the image and the
                    // display settings for this device
                    dout.writeUTF( "url" );
                    dout.writeUTF( url );
                    writeInt( dout, "minwidth", screenWidth );
                    writeInt( dout, "maxwidth", screenWidth );
                    writeInt( dout, "minheight", screenHeight );
                    writeInt( dout, "maxheight", screenHeight );
                    writeInt( dout, "colors", numColors );
                    writeInt( dout, "reduce", 1 );
                    writeInt( dout, "dither", 1 );
                    dout.writeUTF( "" );
                    data = bout.toByteArray();
                    dout.close();
                catch( IOException e ){
                    // should handle this....
            void writeInt( DataOutputStream dout, String key,
                           int value ) throws IOException {
                dout.writeUTF( key );
                dout.writeUTF( Integer.toString( value ) );
            // Updates the display.
            void display( String text ){
                if( message == null ){
                    message = new StringItem( null, text );
                    append( message );
                } else {
                    message.setText( text );
            // We're done.
            void done( String msg ){
                display( msg != null ? msg : "Done." );
                addCommand( okCommand );
                setCommandListener( ImageClient.this );
            // Callback for making the HTTP connection.
            public void prepareRequest( String originalURL,
                           HttpConnection conn ) throws IOException
                conn.setRequestMethod( HttpConnection.POST );
                conn.setRequestProperty( "User-Agent",
                  "Profile/MIDP-2.0 Configuration/CLDC-1.1" );
                conn.setRequestProperty( "Content-Language",
                  "en-US" );
                conn.setRequestProperty( "Accept", "image/png" );
                conn.setRequestProperty( "Connection", "close" );
                conn.setRequestProperty( "Content-Length",
                  Integer.toString( data.length ) );
                OutputStream os = conn.openOutputStream();
                os.write( data );
                os.close();
            // Do the connection on a separate thread to keep the UI
            // responsive...
            public void run(){
                HttpConnection conn = null;
                display( "Obtaining HttpConnection object..." );
                try {
                    conn =
                      HttpConnectionHelper.connect( adapterURL,
                                                    this );
                    display( "Connecting to the server..." );
                    int rc = conn.getResponseCode();
                    if( rc == HttpConnection.HTTP_OK ){
                        try {
                            DataInputStream din = new DataInputStream(
                                                conn.openInputStream() );
                            data = new byte[ (int) conn.getLength() ];
                            din.readFully( data );
                            din.close();
                        catch( IOException e ){
                        done( "Image received" );
                        new ShowImage( data );
                    } else {
                        done( "Unexpected return code: " + rc );
                    conn.close();
                catch( IOException e ){
                    done( "Exception " + e +
                          " trying to connect." );
            // Starts the upload in the background...
            void start(){
                display( "Starting..." );
                Thread t = new Thread( this );
                try {
                    t.start();
                catch( Exception e ){
                    done( "Exception " + e +
                          " trying to start thread." );
            private StringItem message;
            private byte[]     data;
    }Regards,
    Ship.

    I have the same problem and I don`t found info about this. How do you solved this problem.

  • HTTP Status 400 error

    Every time I try to send an email with an attachment I get the above error message. Also with the message I get "The request sent by the client was syntactically incorrect (The parameter "nimlet" was not found in the HTTP request to the HttpNimletDriver").
    What the heck does this all mean, please help.
    Thanks
    David

    I have the same problem and I don`t found info about this. How do you solved this problem.

  • HTTP Status 408/ HTTP Status 400 JDBCRealm/Form Authorization Tomcat

    Hi all
    When I'm trying to log in to my webapp using Form Authorization based on JDBCRealm I can't get in.
    Opera gives me sth like this:
    opera
    And IE:
    ie
    When I'm using Firefox everything is ok. Have no idea why. Any suggestions?
    Waiting for ur help ;]

    Well, if the cookies are actually enabled, then the problem lies somewhere else (however, have you actually verified if the browser has accepted the jsessionid cookie on the correct domain/path?). URL rewriting is not needed if cookies are enabled. It is only essential for ones who disabled cookies, because that would be the only way to let the server track the client session then. You can use JSTL's c:url for this. But again, this is not the main cause of your problem.
    Can you post an SSCCE so that we can try to reproduce the same problem and spot on the cause?

  • "HTTP Status 400 - exception looking up trusted root"

    I see people have been having this problem for years, right back from version 2, on different websites, doesn't anyone know how to fix it?
    When I try to login on the syfy forums, I get that error message - when I use Firefox, not if i use other browsers, say Chrome...

    I have the same problem and I don`t found info about this. How do you solved this problem.

Maybe you are looking for

  • ACK_ channel for handling ALEAUD back to ECC system

    Hi, I have created a channel called ACK_Receiver_XI_TO_ECC for sending ALEAUD for all IDOC's that are received from ECC to XI. I also have another receiver IDOC channel for all IDOCs that are sent from XI to ECC. I read in one of the pdf's that when

  • ITunes 8: When downloading album artwork for making thumbnails, it quits?

    I just installed iTunes 8, and I tried opening it. It then starts to download the album artwork thumbnails, then all of a sudden a message shows saying, "iTunes has stopped working, Windows is trying to blablabla.." Then it forces you to closes the p

  • Placing anchor objects

    Hi guys, I am just testing a script for a project, while executing, the following error occurs. Attached my snaps here for your reference. Target is: The document has the word "[H1]", this words needs to apply pstyle and replace with an anchor object

  • Nepomuk problems with dolphin

    Im trying to use nepomuk with KDE 4 (KDEmod). When it is activated it works fine until I try changing anything on my file system (creating moving or deleting a file).  When this happens nepomuk starts to take up 50% of the computer, It also makes dol

  • Activating Photoshop CS1?

    I've had a Photoshop CS1 disc for quite a while.  Just recently I tried to install it on my new laptop, but it wouldn't let me activate the program, saying the activation server was no longer available.  I looked around on the Adobe website for solut