Servlets

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
Luka

Servlets

Post by Luka » Wed Feb 19, 2003 4:43 pm

Hi, i'm developing an intranet site that will retreive financial model information from a database and then display it in a table using HTML. Then I'm adding a button that's going to say "Graph" and then I want a time-series graph to display. I'm developing the site with HTML and JSP so I would like to know if I can display this graph with an APPLET tag or do I have to use servlets. The reason I ask is because I can't figure out how to compile servlets. The Tomcat server that I'm working on is in a different country so I don't have any access to it. The administrators there say that eveything is set up how it should be so I have no idea how to compile servlets. And once I get them compiled, what is the best way to incorporate them to my jsp pages. Should I use the jsp:usebean tag?

Sorry for all the questions, but any help would be greatly appreciated!
Thank you,

Luka

beth

Re: Servlets

Post by beth » Tue Feb 25, 2003 5:28 pm

Hi. We recently did a similar thing and used JSP and HTML. We made the java code in the JSP print out the data into the applet tag as a parameter. As we parsed the data from the resultSet, we added it to the end of a space sperated string. We then used the getParameter method in the applet to load the data as a string and used a tokenizer to parse it.
We had to add the .class files to the Tomcat classpath, but that could have been a minor problem with out system.

Luka

Re: Servlets

Post by Luka » Tue Feb 25, 2003 11:12 pm

Thanks a lot for the help. Actually I got to the point where I was using getParameterValues to pass an array to the applet and then I realized that applets don't support that. Then I tried your idea but I have a lot of data, so if I pass it between jsp pages, it just hangs. Now I've been trying to call the applet right away with the jsp:plugin. Btw, did you use split() to parse the string?

Thx again,

Luka

Locked