plz help me out new to jsp
package abc;
class UserDetails
{
// i have used this class basically for declaration of variables.
}
publicclass BulkSmsFunctions
{
BulkSmsFunctions()
{// constructor}
// in this class i have 5-6 functions
publicstaticvoid amin(String args[])
{
// i have left my psvm as empty.
}
}
BulkSmsFunctions uses objects of UserDetails to assign various variables.
now i have a jsp page which has to create an object of BulkSmsFunctions and call the various functions.
i have the following code for the jsp page:
<%@ pageimport ="java.util.*"%>
<%@ pageimport ="java.lang.*"%>
<%@ pageimport ="java.io.*"%>
<%@ pageimport ="abc.*"%>//importing the package
<html>
<body>
<%
String PROVISIONING_LOG_PATH="C:\\bulksmsfolder";
String USERS_ACTIVE_DETAILS_FILE="CountDetails";
String USERS_PACKAGE_SUBSCRIPTION_LOGS_FILE="ServiceLog";
String SERVICE_SUBSCRIPTION_PACKAGES_MASTER_FILE="PacksMasterFile";
BulkSmsFunctions objBulkSms=new BulkSmsFunctions();
try
{
boolean SmsCountFlag = objBulkSms.processSmsCountDetails(PROVISIONING_MODULE_LOG_PATH,USERS_ACTIVE_SMSCOUNT_DETAILS_FILE);
if(SmsCountFlag ==false)
out.println(" No file contents");
}
catch (Exception e)
{
out.println(" Exception in main:" + e.toString());
}
%>
</body>
</html>
i am getting the following error.
An error occurred at line: 7 in the jsp file: /jsp/natasha/hello.jsp
Generated servlet error:
[javac] Compiling 1 source file
C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\examples\jsp\natasha\hello_jsp.java:56: tcs.BulkSmsFunctions is not public in tcs; cannot be accessed from outside package
BulkSmsFunctions objBulkSms= new BulkSmsFunctions();
^
An error occurred at line: 7 in the jsp file: /jsp/natasha/hello.jsp
Generated servlet error:
C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\examples\jsp\natasha\hello_jsp.java:56: tcs.BulkSmsFunctions is not public in tcs; cannot be accessed from outside package
BulkSmsFunctions objBulkSms= new BulkSmsFunctions();
^
An error occurred at line: 7 in the jsp file: /jsp/natasha/hello.jsp
Generated servlet error:
C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\examples\jsp\natasha\hello_jsp.java:56: BulkSmsFunctions() is not public in tcs.BulkSmsFunctions; cannot be accessed from outside package
BulkSmsFunctions objBulkSms= new BulkSmsFunctions();
^
An error occurred at line: 7 in the jsp file: /jsp/natasha/hello.jsp
Generated servlet error:
C:\jakarta-tomcat-4.1.31\work\Standalone\localhost\examples\jsp\natasha\hello_jsp.java:60: processSmsCountDetails(java.lang.String,java.lang.String) is not public in tcs.BulkSmsFunctions; cannot be accessed from outside package
boolean SmsCountFlag = objBulkSms.processSmsCountDetails(PROVISIONING_MODULE_LOG_PATH,USERS_ACTIVE_SMSCOUNT_DETAILS_FILE);
^
4 errors

