MapServer Java?
Ryan Ollerenshaw
ollerery at ENGR.ORST.EDU
Wed Jul 19 17:29:23 PDT 2006
your answer is more advanced than what i am looking for, my problem is not how
to display output from mapserver, but simply displaying the output from a java
file. I just have a .java file and i want the print lines to be printed on a
web page instead of the standard out. So i want a way for a client to browse
to the URL of the java file and see the output. If i just use
www.path/to/my/java/file.java just the text of the code is displayed. I assume
that somehow i should be using the .class file but i am not sure how to get my
web server to display the output of the java code.
Thanks again,
-Ryan
Quoting Bryan Scott <bryan.scott at ffa.int>:
> Ryan
>
> Depends on what your actual requirements are, but some options are
> 1) JLabel and ImageIcon. You can get Mapserver to just display an image
> and use imageicon to load the image from a url. A bit of coding is
> required to achieve a workable solution, ie supporting interaction if
> you need to etc.
> 2) ****javax.swing.JEditorPane****.
> 3) https://xhtmlrenderer.dev.java.net/
>
> The basic premise was that an option is have a mapserver/apache web site
> and simply display that website in a JComponent that renders html.
>
> Bryan
>
> Ryan Ollerenshaw wrote:
> > Quoting Bryan Scott <bryan.scott at FFA.INT>:
> >
> >
> >> Ryan
> >>
> >> For your clients have you thought about running standard mapserver cgi
> >> and in your java clients putting in a web render?
> >>
> >> Bryan
> >>
> >
> > Thank you for the reply but i dont quite follow what it is you are saying.
> I
> > know that mapserver cgi is what allows you to display the .map files, but
> what
> > is a web render for a java client?
> >
> >
> >> Ryan Ollerenshaw wrote:
> >>
> >>> I was able to create a java program which uses java mapscript, but now
> how
> >>>
> >> do i
> >>
> >>> get that program to run on my server so clients can access it. It seems
> >>>
> >> like a
> >>
> >>> java Servlet is the way to go but i cant find any good tutorials on how
> to
> >>>
> >> get
> >>
> >>> started. I know what the code looks like for a servelt (example below)
> but
> >>> once i have that written where do i put it? do i need to install anything
> >>>
> >> else
> >>
> >>> to get it to run? I am running Apache on fedora core 5.
> >>>
> >>> Servelt code:
> >>>
> >>> import java.io.*;
> >>> import javax.servlet.http.*;
> >>> import javax.servlet.*;
> >>>
> >>> public class Servlet_test extends HttpServlet {
> >>> public void doGet (HttpServletRequest req,HttpServletResponse res)
> >>> throws ServletException, IOException
> >>> {
> >>> PrintWriter out = res.getWriter();
> >>>
> >>> out.println("Hello, world!");
> >>> out.close();
> >>>
> >>> }
> >>> }
> >>>
> >>>
> >> --
> >> ---------------------------------------------------
> >> Bryan Scott
> >> Pacific Islands Forum Fisheries Agency
> >> Honiara, Solomon Islands
> >> http://www.ffa.int
> >> +677 21124
> >>
> >>
> >
> >
>
>
> --
> ---------------------------------------------------
> Bryan Scott
> Pacific Islands Forum Fisheries Agency
> Honiara, Solomon Islands
> http://www.ffa.int
> +677 21124
>
More information about the MapServer-users
mailing list