how to write web apps for java?

closed account (Dy7SLyTq)
so i want to write a basic little terminal for website, and i want to use java. does anyone know a good site to learn how to write java apps to embed in html?
closed account (Dy7SLyTq)
never mind im using http://java.about.com/od/webapplications/ss/firstapplet_3.htm
closed account (S6k9GNh0)
I think the more interesting project, especially pertaining to this site, would be how to do it in C++. :D
How to make a terminal for a website in C++?

http://www.tutorialspoint.com/cplusplus/cpp_web_programming.htm

Though, I thought CGI was outdated and not used that much. :/
closed account (Dy7SLyTq)
wait wait wait... cgi is c++? i thought it was php... i feel really upset now. is there like a framework that will let me use c++ with my website? i dont want to have to switch over to cgi just for a terminal
closed account (S6k9GNh0)
I know how, I'm just saying it's more interesting than Java in this case (given that this is a C++ forum).

CGI isn't outdated... rather, it's the only standardized method I know of to execute anything that isn't built directly into a webserver. There are more modernized methods of executing a CGI script such as FastCGI or Simple CGI which accomplish the same thing in a more efficient manner.
AFAIK cgi is any script in any language that generates html pages
closed account (Dy7SLyTq)
oh... sorry. when i read the wiki a while ago i thought it was an api for php
closed account (S6k9GNh0)
DTSCode, I'm sure there's quite a few. If not, it's not hard to generate HTML and create one yourself.

EDIT: http://www.webtoolkit.eu/wt#/

EDIT2: http://www.treefrogframework.org/ Also looks interesting.
Last edited on
closed account (Dy7SLyTq)
yeah i read something online now so i understand what cgi is now. so i can still do it in php then. awesome
closed account (Dy7SLyTq)
so i installed webtoolkit using apt-get (it recommended it) and then copied the code and compiled it, but im getting these errors

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
In file included from /usr/include/Wt/WSignal:17:0,
                 from /usr/include/Wt/WWidget:14,
                 from /usr/include/Wt/WWebWidget:14,
                 from /usr/include/Wt/WBreak:10,
                 from /usr/include/Wt/WCssStyleSheet:14,
                 from /usr/include/Wt/WApplication:25,
                 from hello.cpp:1:
/usr/local/include/boost/signal.hpp:17:4: warning: #warning "Boost.Signals is no longer being maintained and is now deprecated. Please switch to Boost.Signals2. To disable this warning message, define BOOST_SIGNALS_NO_DEPRECATION_WARNING." [-Wcpp]
/usr/bin/ld: warning: libboost_thread.so.1.46.1, needed by /usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libwthttp.so, may conflict with libboost_thread.so.1.55.0
/usr/bin/ld: warning: libboost_program_options.so.1.46.1, needed by /usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libwthttp.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_system.so.1.46.1, needed by /usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libwthttp.so, may conflict with libboost_system.so.1.55.0
/usr/bin/ld: warning: libboost_regex.so.1.46.1, needed by /usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libwt.so, may conflict with libboost_regex.so.1.55.0
/usr/bin/ld: warning: libboost_signals.so.1.46.1, needed by /usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libwt.so, may conflict with libboost_signals.so.1.55.0
/usr/bin/ld: warning: libboost_date_time.so.1.46.1, needed by /usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libwt.so, may conflict with libboost_date_time.so.1.55.0
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libwthttp.so: undefined reference to `boost::program_options::validation_error::what() const'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib/libwthttp.so: undefined reference to `boost::program_options::validation_error::validation_error(boost::program_options::validation_error::kind_t, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
collect2: ld returned 1 exit status

i also ran apt-get update and ldconfig (even though i think apt-get did it already)
Well from your output I can say two things, firstly update your boost and secondly please post the code, or preferably a shortened version that gives the same error.
closed account (Dy7SLyTq)
i didnt post the code because its the one you see on the site. but i will when i get on my laptop. my boost is up to date because i had to build from source when i was using it for my compiler. its like 1.5.5 or 1.5.2 or something like that
Are you linking boost program options?
-lboost_program_options
closed account (Dy7SLyTq)
no it told me how to compile and what libraries i needed to link to so i just used that

edit:
i decided to try out the tree frog one though. it looks a lot better than the webkitone
Last edited on
Topic archived. No new replies allowed.