Hi all,

I'm writing a carbon component and when it is running on carbon server, it
gives following errors






*"PWC6199: Generated servlet error:Only a type can be imported.
org.wso2.carbon.ser.inf.ui.ServerInfoClient resolves to a packagePWC6197:
An error occurred at line: 10 in the jsp file:
/server-inf/index.jspPWC6199: Generated servlet error:ServerInfoClient
cannot be resolved to a type"*

in here ServerInfoClient is my client class. i've tried many ways but
couldn't resolve the problem.


here is my* index.jsp* file

<%@ page import="org.wso2.carbon.ser.inf.ui.ServerInfoClient"%>
<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
<%@ page import="org.wso2.carbon.CarbonConstants" %>
<%@ page import="org.wso2.carbon.ui.CarbonUIUtil" %>
<%@ page import="org.wso2.carbon.utils.ServerConstants" %>
<%@ page import="org.wso2.carbon.ui.CarbonUIMessage" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://wso2.org/projects/carbon/taglibs/carbontags.jar";
    prefix="carbon"%>
<%
String serverURL = CarbonUIUtil.getServerURL(config.getServletContext(),
session);
ConfigurationContext configContext =
        (ConfigurationContext)
config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
String cookie = (String)
session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);

ServerInfoClient client;
int var;
try {

    client =new ServerInfoClient(configContext, serverURL, cookie);
    var = client.GetAvailableProcessors();

} catch (Exception e) {

    CarbonUIMessage.sendCarbonUIMessage(e.getMessage(),
CarbonUIMessage.ERROR, request, e);


    return;
}
%>

<div id="middle">
    <h2>Processor count</h2>
    <div id="workArea">
        <form>
            <lable>number of processers are: <%=var%></lable>
        </form>
    </div>
</div>

-- 

*BuddhiC*



*InternWSO2, Inc. *
*Mob: +94 755 446 685*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to