After installation and setup, where should we start?
Do we write java classes or JSP pages?
I have tried the following code:
<%@ page import=“java.util.*”%>
<%@ page import=“org.jivesoftware.smack.*”%>
Testing Jabber service…
<%
out.print(“Step 1…
”);
XMPPConnection connection = new XMPPConnection(“merakdemo.com”, 5222);
out.print(“Step 2…
”);
connection.login(“user”, “user”);
out.print(“Step 3…
”);
connection.createChat("admin@merakedemo.com").sendMessage(“Howdy!”);
out.print(“Step 4…
”);
%>
filename: smackdemo.jsp
running server: Tomcat
but this is the error message I got:
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 3 in the jsp file: /smackdemo.jsp
Generated servlet error:
Compiling 1 source file
C:\jakarta-tomcat-4.1.29\work\Standalone\localhost\worktest\smackdemo_jsp.java:8 : package org.jivesoftware.smack does not exist
import org.jivesoftware.smack.*;
^
C:\jakarta-tomcat-4.1.29\work\Standalone\localhost\worktest\smackdemo_jsp.java:4 8: cannot resolve symbol
symbol : class XMPPConnection
location: class org.apache.jsp.smackdemo_jsp
XMPPConnection connection = new XMPPConnection(“merakdemo.com”, 5222);
^
An error occurred at line: 3 in the jsp file: /smackdemo.jsp
Generated servlet error:
C:\jakarta-tomcat-4.1.29\work\Standalone\localhost\worktest\smackdemo_jsp.java:4 8: cannot resolve symbol
symbol : class XMPPConnection
location: class org.apache.jsp.smackdemo_jsp
XMPPConnection connection = new XMPPConnection(“merakdemo.com”, 5222);
^
3 errors
I totally don’'t know what to do now.
Or should I write them in classes instead of JSP?
Can someone help?
Thank you so much !!!
Tom