mapserver java servlets
Jose Luis Gonzalez
joseluismapserver at YAHOO.ES
Tue Nov 23 01:44:05 PST 2004
Hi to all
I would implement mapserver in tomcat as servlet but I have found a lot of
problems in start with it!
So:
1) is there sites that implement mapserver as servlet in tomcat that I can
view?
2) Some one have a piece of basic code that I can compile as servlet in
tomcat for view how it run? I have load the java Howto.
Do you have examples so I can see how can I work
with mapserver functions and servlets?
I have been seeing the wiki, but I can not really find what I want.
I have done the example of loading a library that apears in:
http://www.unicolet.org/mapserver/tomcat.html
and it works, but when I want to complete the JavaMapscript.java code with other
mapserver comands, it doesn't work:
import edu.umn.gis.mapscript.*;
public class JavaMapscript {
private static JavaMapscript instance=null;
private JavaMapscript() {
try {
System.loadLibrary("mapscript");
} catch (Exception e) {
e.printStackTrace();
System.err.println("* error loading native library *");
System.err.println("Error is: "+e);
}
System.out.println(" * mapscript native library loaded *");
mapObj map = new mapObj("test.map");
imageObj img = map.draw();
//img.save("result", map);*/
}
public static JavaMapscript getInstance() {
System.out.println("Try to instantiate Mapscript");
System.out.flush();
if ( instance == null ) {
instance = new JavaMapscript();
}
return instance;
}
}
And even worse, when I do any modifications and I put the new .class file in the
server, I have an error because it says that the library was already loaded, and
my only solution now to solve it is to turn off the server and turn it on again.
Hope someone can help me
Thank you
Jose Luis
---------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20041123/7e2127e1/attachment.htm>
More information about the MapServer-users
mailing list