I am deploying new versions of java servlets with JRun as the host. I am having difficulty finding good sources for information about JRun and tutorials about how to configure and manage it.
After installing JRun and opening the launcher it can't start the admin server that it creates by default...so obviously I'm running into some issues just getting started.
edit for clarity: I'm not looking for an answer or help with a specific error but if anyone knows of good sources for information about JRun and how to work with it so I can quickly bring myself up to speed on it.
Jrun development has pretty much stopped. You should look into running another application server. Jboss or Glassfish are good alternatives.
This is probably going to be difficult to resolve unless you post either the error message from the log file or the list of steps that you took so far.
I have JRun 3.1 configured on my machine so maybe I can duplicate your issue if you give us more information.
I didn't know JRun was even still in existence since 1999 or something like that. Anyway, Tomcat or Jetty would be my easy replacements. Tomcat for its scriptability from ANT etc and Jetty for its pure simplicity (start an instance in 5 lines of code!).
Glassfish is a huge system with many components, if you just want to host vanilla servlets and JSPs etc. then I would go for one of the above.
Related
OK so at work I've been working with Java to start migrating our legacy database and in-house systems to something more modern. Well today I was asked if there was a way to use HTML/CSS as a front end to the java programs I've made. So my coworker and I have set up Tomcat on our Ubuntu 12.04 server in hopes of using jsp. Now we don't know where to go. I've been using Netbeans for my java development and all the tutorials and articles I've found has been about installing the server on my PC and I think that can't be right. Are there any good, semi-current (as in not from 2003) tutorials or articles for setting this up? Both my coworker and I have experience with PHP and it's not this difficult to set up.
It doesn't matter where you install Tomcat, your computer or a separate server. Create your web application, drop the war into tomcat/webapps and you're ready to go (to http://yourservername.com:8080/nameofwar/). Of course if you've never actually created a web application, there's some additional complications.
If you're familiar with Netbeans, you probably want to create a Dynamic Web Project. Plenty of resources to be found with all this info I've given you.
I have written a little netty server application, packed in a jar file that I want to deploy on a linux server.
Since I have no professional experience with deploying java applications, I was wondering if it is enough to start the netty server by doing:
java -jar NettyServer.jar NettyServer &
Obviously a script could be created to ensure the correct user starts the process etc., but is this the way (stand-alone) java services is being deployed?
It seems almost too easy, considering every other question/answer seems to mention some big hunky container-bean-glassfish-tomcat-whatnot (which I might consider later on if/when issues arise)
yes thats the way - no container needed!! I built a middleware (http://sourceforge.net/projects/serviceconnecto/) using netty as underlaying framework. It's the way i start my server as well! Just verify the classpath is set correctly - meaning libraries are in correct place and the jar archive is correctly built.
I personally prefer Upstart to start services on linux. http://upstart.ubuntu.com/
It is very easy to use, and can also restart your application on crash.
I hope it helps.
I'm new to the Java world and I managed to create a web service, run it on Tomcat server and use it in my Silverlight project.
The problem is I don't know how to start this service on a Windows machine that doesn't have Eclipse.
More importantly, how can I start it on a real server? A tutorial or step-by-step guide would be nice.
Have you read the FAQ for the relevant version of Tomcat? For example, for version 7.0, the Setup page of the docs gives some information, as well as linking to the docs for running Tomcat as a Windows service.
Of course, configuring Tomcat to run your servlet is a separate task, but the Tomcat docs are pretty comprehensive.
If you're still running into problems after reading those docs very carefully, please edit your question to tell us exactly which bits you're having problems with.
Starting from an Eclipse web services project, you can right click on it > Export > WAR file, selecting Tomcat webapps folder as destination. Like any other webapp project.
Tell me if I missed the point.
I have a working Spring MVC application(doing everything I wanted when deployed to jboss) and now I'm looking a way how to start my application from a jar. What I've though of is when starting jar, first some kind of web server should be started in order to be able to run the application.
And I've tried like a tons of combinations with jetty(lost about 2 days already), and I failed every one of them, mostly suggestions from https://stackoverflow.com/tags/embedded-jetty/hot
My main weakness is that I don't really have thorough understanding of servlets, contexts and so on. Terms which I see on a regular basis while browsing google search, maybe I found a solution already but didn't understand it.
Has anyone done something similar? And yes I've asked similar question for tomcat :
Maven tomcat plugin
Yes, I've done this sort of this several times, and it's fairly straight forward if you know how the bits work.
Since you've explained that you don't know how the bits work, that's going to be a bit harder :)
But they're not too hard to learn, and the easiest way to learn is by doing - so you're heading down the right path.
The accepted answer here: Executable war file that starts jetty without maven is some of the best advice you're going to get on this topic.
I would suggest:
Create a WAR to start with (which you probably have from your JBoss deployment)
Get that WAR running under standard Jetty (fairly straight forward, with lots of tutorials around)
Then follow the advice I linked to, to turn embedded Jetty into your WAR file.
If you run into any issues, ask specific questions with specific examples of what went wrong, and we'll try and help out.
I'm confused. There are lot of servers(GlassFish, Tomcat, Apache,etc.,). But which one is used to implement easy for developing web application? Please suggest me.
Thanks in advance.
Glassfish v3 is a slow starter (~30 secs), but its hotdeployments are fast. It happens in less than a second, regardless of what you've edited: JSP files or Java classes. At least, that was my experience in combination with Eclipse and the Glassfish Eclipse plugin. Things which may matter a lot. And as a bonus, you've the opportunity to play with the awesome Java EE 6 API.
Tomcat 6.0 is quick starter, in ~3 secs it's up and running. Hotdeploys of JSP files is acceptable, after ~3 seconds you can F5 to see the new one in browser. But hotdeploys of Java classes is sometimes troublesome. Sometimes it isn't picked up at all, or sometimes it takes too long that it's actually faster to manually restart Tomcat (which however takes "only" 3 seconds).
Take your pick. I'm just using both.
Tomcat: it's free, and it's easy to work with. It's also very widely used and has lots of documentation and "herd knowledge" e.g. here at SO.
If you don't need EJB then it's a good safe choice.
Edit: Tomcat was until recently the "reference implementation" of the Servlet/JSP, although as pointed out by commenters, Glassfish currently has that accolade.
I would go with either Apache's Tomcat or GlassFish.
Tomcat has the benefit of being around longer and having a broader group of users, but GlassFish comes from Sun itself. I've also heard that GlassFish's performance is above Tomcat.
The more commonly used "lightweight" servlet containers are Tomcat, Resin, and Jetty. They are lightweight because they implement only a few of the specifications (at the heart of which is servlet and JSP)/ The larger enterprise level applications JBoss, Glassfish, etc implement much more specifications on the server side.
I'd just suggest Tomcat. It's quick and easy to install, well documented, a support community behind it and very stable.
By experience i would say:
1.Apache Tomcat is quick in respoding to clients,easy to deploy apps,medium to install.
2.Glassfish is i think less quicj=k in responding,easy to deplu apps,easy to install,configure and use.
So i would suggest glassfish
I've usually used Tomcat with no problems. It's always been easy to setup and quick to deploy for me. Sometimes when using NetBeans I will use Glassfish too.