JSP Java Tomcat SDK

Answered Question
Jun 12th, 2007

Hello,

Let me start off by saying, I know nothing about programming in any language or Tomcat or Java.

I downloaded the CiscoIPPS_SDK_v4.1.1 with hopes of getting the speeddials.jsp working on a little Windows 2003 machine. I've tried different versions of Java and Tomcat, but theres something I must be missing. Right now I'm running Tomcat 6.0.13 and JDK Version 5 Update 12.

Every time I try to run the speeddials.jsp service on the phone I get something that looks like this...

An error occurred at line: 120 in the jsp file: /speeddials.jsp

XmlEncoder cannot be resolved

117: if (sd != null) {

118: out.print("<MenuItem><Name>");

119: out.println("Speeddial Position: " + sd.getPosition());

120: out.print(XmlEncoder.encode(sd.getLabel() + " " + sd.getNumber()));

121: out.print("</Name><URL>QueryStringParam:index=" + i + "&dirn=" + URLEncoder.encode(sd.getNumber(), "UTF-8") + "&label=" + URLEncoder.encode(sd.getLabel(), "UTF-8") + "&position=" + sd.getPosition() + "</URL></MenuItem>\r\n");

122: }

123: }

It looks like it cant compile it or it doesnt understand the XML stuff. This is way over my head and I'm lost. Any help would be nice.

I have this problem too.
0 votes
Correct Answer by stephan.steiner about 9 years 5 months ago

A look at the SDK JavaDoc reveals no such class, the XMLEncoder class in Java has no static methods so they probably meant to use URLEncoder.encode instead.

By the way, the stuff in the SDK isn't meant to be used by end users.. it's mean to give developers a head start at implementing their own solutions. If you look at the documentation, they tell you it's not production quality code - so using it productively without even understanding what it does, is taking an uncalculated risk if you ask me.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
Loading.
Correct Answer
stephan.steiner Tue, 06/12/2007 - 23:40

A look at the SDK JavaDoc reveals no such class, the XMLEncoder class in Java has no static methods so they probably meant to use URLEncoder.encode instead.

By the way, the stuff in the SDK isn't meant to be used by end users.. it's mean to give developers a head start at implementing their own solutions. If you look at the documentation, they tell you it's not production quality code - so using it productively without even understanding what it does, is taking an uncalculated risk if you ask me.

setonhnet Wed, 06/13/2007 - 10:35

Thanks that got the first part working at least, yes I'm aware that the stuff in the SDK is only for devlopment and not for end users, but sometimes you do what you have to.

Maybe I'll have time to pickup a book on JSP before I have to get a solution pushed out to my users.

Actions

This Discussion