Do I need any kind of java installation on a webserver that hosts java applets? - applet

A webserver hosting java applets doesn't necessarily need java installed on it, right?
It's the clients computer that views the applets that needs a java jre installation or similar?
Or do I get this wrong?
Thanks!

No, it's not necessary to have Java installed or running on the server, as long as your HTML pages and the jar and class files are available via the web server, it's the client that'll use them.

No, as long a the applets are compiled somewhere else

Related

How do i deploy my wicket project?

i am new to web development and i created a wicket app on my local computer. i have a server running apache 2.0, maven and open jdk. Its an ubuntu server with only command line.
Any help would be wonderful.
Thank you
You cannot run the wicket app by itself; like any java servlet it has to be run on a servlet container.
There are many containers to choose from, the ones I most commonly come across are
Tomcat
GlassFish
Jetty
You need to install one of containers like that to convert the HTTP requests into java. Once you have one of them installed and running, you can deploy your wicket web-app in it.

Do I need JDK to work with Eclipse Helios and Tomcat 7.0.33?

I want to develop dynamic web applications.
For this I am using Eclipse Helios and Tomcat 7.0.33. I have the JRE installed on my machine and I have provided the location of the JRE in the JAVA_HOME path.
But when I am running any servlet, I get the error:
" HTTP Status 404 " -- " The requested resource is not available
"
Do I need a JDK in place of the JRE (meaning I have to set the path of the JDK in place of the JRE)? Or could there be another other reason why this error is happening?
Looking for Help!
If your servlets are already compiled then JRE will serve the purpose,
But they are compiled then you will JDK and other libraries( like servlet-api.jar, etc.) to compile you servlets.
In short JDK is for development where you want to develop something using Java.
And JRE is used when you already have compiled classes and you just want to run it.
You might want to refer to this :
What is the difference between JDK and JRE?
In theory, compiling with Eclipse's incremental compiler is sufficient. Running the application server with a JRE should be fine as well. I suppose your error is somewhere else. Anyway, I'd strongly recommend installing a JDK for developing a Java application. It comes with some handy tools and many 3rd party tools (Maven, e.g.) also require a real JDK compiler and can't work with Eclipse's built in compiler.
I had the same problem. The JDK was not the issue. After you compile your servlet you have to restart your tomcat server so it can load your class files before you try to access it through the web browser. No more 404 errors after that, servlets are running fine.

Debugging GWT server side code using a TomCat instance

I'm setting up a project to use MySQL as the datasource and I'm running into a couple problems.
It appears the MySQL drivers for the Java side are incompatible with the built in GWT Jetty instance. Really?
I can configure a TomCat instance and get MySQL Driver working, but I can't debug inline (Client & server together) like I normally would be able to do using the Jetty instance in dev mode, according to Google Docs.
I spent quite a while deciding between a PHP or Java backend, and one of the main advantages besides the GWT RPC mechanism was the fact that GWT provides a nice Development environment if you use Java.
Has anyone encountered the need to use a data source other than appEngine? How did you setup dev environment?
I do believe the MySQL JDBC driver is "compatible" with the embedded Jetty; but maybe you were in an AppEngine project, in which case the embedded Jetty server forbids the use of classes that are not compatible with AppEngine (so you have at dev time a behavior as similar as possible with the production environment on Google's servers).
To debug your server code running in Tomcat, you either need to launch it (the server code) using Eclipse WTP (or equivalent if you don't use Eclipse), or launch your Tomcat instance with the appropriate debug arguments e.g. -agentlib:jdwp=transport=dt_socket,address=8788,server=y,suspend=y, and then debug it as a "Remote Java Application" (in Eclipse, I don't now how they name it in other IDEs).
You can then launch your DevMode in -noserver mode (and in debug) to debug your server and client at the same time (yes, you'll actually have 2 debug sessions).
Note that the doc you refer to (whose latest version can be found here) doesn't deal with debugging the server-side code, as it's highly dependent on the server you use, how and where it's deployed, etc. GWT code on the server side is just a standard servlet, so there's nothing specific to GWT re. how to debug the server-side code.
FYI, we do use a standalone Jetty instance (not the embedded Jetty server) for more than a year using the above setup.
You can use GWT and Tomcat and still be able to debug both client and server side. Look at the jetty startup parameters in Eclipse.
I have been in a similar position few years ago and decided to use Jetty for development and tomcat for testing.

I am downloading Eclipse. But what else do I need to develop Java EE applications?

I am downloading this version of Eclipse. I want to know what else I should download and install before I can start working on Java EE applications.
Previously I used to work with NetBeans. Back then, I used to install these:
JRE
JDK
NetBeans
Tomcat
Then I could develop Java EE applications.
Is the same set of steps required when I download that Eclipse too? Or do some of the things come bundled with it? Please help me out with setting up the development environment.
Eclipse doesn't bundle JRE/JDK or app servers. Make sure you download "Eclipse IDE for Java EE Developers" package (as others will not have the plugins you need). You will need to download JDK and Tomcat separately. Note that there is no need to also download a JRE as JDK install has a JRE in it.
Note that Eclipse does have en embedded Jetty server that can be used for previewing your app without a separate app server, but most non-trivial apps still require downloading and installing the specific app server you intend to deploy in production on.
Take a look at the official website:
http://www.oracle.com/technetwork/indexes/downloads/index.html
I had installed my enviroment from these website and work properly, the server is up and running.
Tomcat is a software implementation, you need to install it separately. Take a look at the official tomcat's website at: http://tomcat.apache.org/
If you're working on a web site, my suggestions would be:
JRE/JDK, Apache Tomcat Application Server, Freemarker templating language (for page-building), Apache Web Server (for proxying, rewriting, mod_jk to load balance tomcat worker(s)), Varnish or Squid Cache, MySQL (to host UGC data (user generated content), and some kind of open source CMS system (Drupal or others) to host data that's web site editor created.

Cannot find OpenPortal Portlet Container 2.x when creating a new server runtime environment in eclipse

I just started learning portlet and got stuck in the first place. I have installed JavaEE 6 SDK, Eclipse Helios and GlassFish Server 3.0.1. I also successfully configured OpenPortal Portlet Container (OPC) for GlassFish by running command:
java -jar portlet-container-configurator.jar
The problem come up when I wanted to create a new server runtime environment of OPC, there was no "OpenPortal Portlet Container 2.x" node like the tutorial said. I googled and found that I needed to install Eclipse Portal Pack but the link was dead.
Any suggestion, please?
Best Regard.
If you want to develop portlets, I strongly recommend downloading Apache Pluto instead of using the open portlet container; you can download a version of Tomcat bundled with Pluto from their site: http://portals.apache.org/pluto
Actually, Pluto has a few quirks that you need to get past (for example, it wants you to run an 'assembly' step to add some entries to your web.xml) but once you do it is probably the best way. You could also try Liferay or JBoss' GateIn for development, but if you are ultimately targeting a vendor supplied platform like WebSphere, you might find that these actually have features that aren't as portable, whereas Pluto is really just a simple implementation of the portlet spec.
I have found the .jar file on Internet. Thanks for watching.