cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
308
Views
0
Helpful
2
Replies

JSP Java Tomcat SDK

setonhnet
Level 1
Level 1

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.

1 Accepted Solution

Accepted Solutions

stephan.steiner
Spotlight
Spotlight

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.

View solution in original post

2 Replies 2

stephan.steiner
Spotlight
Spotlight

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.

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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: