As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I followed this (paragraph 7) tutorial to create a Rest service using jersey. However in the end i was kinda disappointed as it wasn't exactly what i was looking for.
What i had in mind was to create a java server with jersey that a client could make post requests to it , and the server could save the data in a MySQL database.
In the tutorial i was shown maybe how to make a post request? And even for that i used some html and 4 different java classes without any explanation on what anything does. In php the same thing was less than 40 lines of code and everything actually made sense.
I am not sure where to go from here , as everyone suggested to me to read this tutorial for what i needed. But i can't see why as i don't understand its purpose.
Do you know any tutorial i could have a look at , or point me to the right direction here? I ve never developed in java before neither have i used tomcat , so everything seems pretty new to me. I was used to php and apache.
The tutorial you have mentioned focus on creating RESTful Webservices with Java. It aims at distributed systems, where a client can make requests to a server. I think the tutorial is very helpful for that matter.
On the other hand, you seem to be searching for a tutorial that helps you creating a web application that can save/retrieve data to/from a database. You can find one, for example, in http://zetcode.com/tutorials/jeetutorials/mysqldatabase/
Then, for web clients, you have different alternatives, such as GWT or JSF. Also, for the persistence layer you might want to check Hibernate or JPA.
Relatively to Tomcat, it implements the Java Servlet and the JavaServer Pages (JSP) specifications from Sun Microsystems, and provides a "pure Java" HTTP web server environment for Java code to run. In short, Tomcat is the place where you deploy and run your Java web application; like you deploy a PHP application in Apache (with PHP installed).
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
Googling this question returns lots of results with marketing jargon.
What I am looking for is a summary of what it does, more along these lines What is Maven?
This is the closest I could get.
"WebSphere" in the most abstract sense is a brand encompassing various products, so "a brand" is about as good an answer as you can get.
What one usually refers to when saying "WebSphere", though, is the WebSphere Application Server, which (as the name implies) is an application server - something that runs EJBs and other server-side Java technologies like servlets, JMS, etc. An example of another important player in this space is JBoss AS.
Finally, another possible definition of "WebSphere" is "its creator's biggest technology mistake" ;)
Unlike a regular web server which simply provides clients acces to html-documents, which their browser then displays as websites, an application server allows for programms/scripts to be invoked by requesting websites, which dynamically generate the websites.
In this case the scripts are written in Java. This allows for a lot of the apis provieded in Java to be utilised by your web-application (the website itself is simply the frontend of your webapplication)
So web sphere is an application server from IBM. Simple as that. This tells you what it can do.
Hope that helps.
WebSphere is an application server which supports a lot of advanced functions including load balancing, database connection managing, advanced logging options and many more.
On the other hand it introduces severe overhead, is difficult to administrate and one has to learn a lot to use it effectively. And more often than on other servers you find yourself in JAR hell. Been there.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want to code a server daemon application that provides some backend functionality. I'd like to stick to Java since I'm pretty familiar with this language and I figure it'd be much easier to just dig into a new framework and not a new language in parallel.
So far I found many promising frameworks, but all of them resemble somehow a webserver. Thing is, I don't want to code a web-application in terms of web-sites so I doubt that I'll need all the webserver-functionality such as templates and this stuff.
What would be a good suggestion for this purpose or would using a regular web-framework such as "play" without the template-stuff be the best choice?
JAX-WS is a standard for creating SOAP web services. Wikipedia link to see what it is about.
For RESTful you would need to make http requests, usually get and post and this type of service works best if you develop a website. From what I understand you don't want this, but still if ever just check the spring framework.
Raw TCP/IP is so much harder and unless you know exactly what you want (performance and optimization wise) you`re better off using a framework.
A webserver is used to implement webservices. A webserver may serve more than html to clients.
I have a personal "stack" using for a long time that is Jetty + RESTEasy and it serves no html at all (only XML and Json).
Javascript + Rest (Glassfish + Jersey for rest). Glassfish – Java EE Full profile certified reference application server (server will used for REST host).
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
The community reviewed whether to reopen this question 1 year ago and left it closed:
Opinion-based Update the question so it can be answered with facts and citations by editing this post.
I've been learning Spring and I'm really liking what I'm learning, but feel ill-equipped to do anything at the moment. I know Java really well, I'm ok at ant, but I don't know anything about: J2EE, JSP, Servlets, Tomcat, Maven, Hibernate, JPA, and I've never made any kind of website using Java (I've made lots of applications in Java, but all websites I've made were using PHP).
Should I cement some of my knowledge of the "basics" or should I keep slogging away at Spring?
Spring is a monster. It all depends on what part of Spring you are interested in. A good starting point would be the Dependency Injection container, which requires none of the technologies that you are unfamiliar with (the ones from your question).
If you are interested in learning Spring MVC (which it sounds like you might be based on the technologies you mention), I would recommend learning the basics in these (again from your question):
Servlets
JSP
Tomcat (or another web application container)
For Spring MVC I would also look at the idea of RESTful web services.
You can find a (likely) comprehensive list of Spring projects at this link.
I would recommend three things:
Lots of Reading => Spring Documentation in a Single Page
Lots of Coding => You can start off by getting an example Spring / Hibernate project. And then use Spring Tool Suite, which includes many interactive tutorials, and template projects that just work without any coding at all.
Find a Spring User Group next to the place you live. If there is no such group => create one!
It is totally ok that you don't know JSP / Servlets / Tomcat / J(2)EE / etc. Extremely smart people who, for example, write Linux kernel (which is a lot more complex) may not know it as well. The beauty of Spring is that going through it, and reading about best patterns and approaches you'll get all the above. No need to learn J(2)EE separately. Spring is J(2)EE of today.
For a good enterprise developer, I would recommend
a) very very good core java ( including collections, jdbc , threads)
b) servlets
Then I think you can start diving into spring.
If you want to accomplish something quickly to start with, definitely look at JSPs. A JSP is basically an HTML document with some special <% %> tags where you can just shovel in java. It's really entertaining, although nothing you'd want to use for a large-scale application.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
We just started a new project in Java EE in our office and i am required to participate effectively. I mostly work on web applications and I use PHP/MySql but I also know Java SE and have written couple of standalone applications.
I need help and advise on how i can learn Java EE very fast so that I can blend into the project without difficulties. I need help with book & tutorial recommendations and also links to resources.
This vastly depends on your learning speed. What I do in such cases:
read small parts of tutorials in order to obtain a general idea of the technology
experiment, and whenever I don't understand something, I return to the tutorial, or google about the problem.
After creating a non-trivial, but still simple application with the technology in question, you can go to the real world. Still, there must be someone more familiar with it, whom you can ask.
For JavaEE I'd suggest the following exercise:
create a stateless EJB that starts an EJB timer. The timer has to fire on a configurable in the database period of time
the timer should send messages to a JMS Topic
the JMS topic should be consumed by a message-driven bean
the EJB should be called by a servlet, telling it whether to use the db-configured period of time, or use a default one.
the messages to the JMS topic should consist of the IDs of objects stored in the database
on receiving the IDs the MDB should increment some number of the object and persist it
use JPA for persistence.
Here, you'll have servlets, EJBs - stateless and message-driven, timers, JMS and JPA covered.
Refer to the Sun JavaEE tutorial and google anything you don't understand immediately.
To learn it fast use a IDE to do most of the config for you. netbeans works really well with a number of containers and relieves you from a lot of the config etc...
If you take a look on netbeans.org there are some really good short tutorials just to get you going.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am a newbie to web-services. What is a good way to learn web-services implementation using java, xml and spring? Are there any good books which cover this topic in good width?
Or, are there any online resources, tutorials, etc.?
Also, what would be good projects to understand this hands-on?
Any recommendations>?
I originally learned Web Services concepts without books, so my opinions may be biased, but I don't think books would help much in the beginning. Once you get to some intermediate state where you need to study security, SOA, etc, maybe books would help.
I needed to get an intern up to speed on Web Services, so I made him implement a two-player game of Reversi using Web Services as the business logic layer with SQL Server underneath it. The UI layer was a desktop executable hitting the service.
You can do something like that using Axis2 and Swing. Once you've built the first UI, you can then try to consume the same service using .NET/Ruby/jQuery or something too to demonstrate the interoperability.
Spring in Action Second Edition has a fair bit of information about using Spring and web services with examples. It worked for me anyway.
I've never read this, but it has good reviews on Amazon: Java Web Services: Up and Running
alt text http://ecx.images-amazon.com/images/I/51OXWAyftOL._BO2,204,203,200_PIsitb-sticker-arrow-click,TopRight,35,-76_AA240_SH20_OU01_.jpg
I found books okay, but in the end I used spring web services and it was such a breeze. Highly recommend the reference manual. It has a great introduction on the approach spring web services has taken with the contract first approach and why it is recommended.
http://static.springframework.org/spring-ws/sites/1.5/reference/html/index.html
Cheers.
Some IDEs have web service wizards and projects that take you through setting up a service. They might not be a great way to learn about web services by themselves, but you'll be exposed to some key terms and ideas that can help you build a vocabulary and starting point.
You don't need spring or XML to do web services. Just a simple jetty and stringtemplate will allow you concentrate on the java and web service stuff, and allow you to refactor your code easily in the ide.
I expect to be down voted by the spring fanatics, but honestly, it's whet you want to be doing!
The Java SOA Cookbook is very good - but it does not really cover Spring.
The Spring Recipes book is pretty good at explaining How-To do things in Spring.
I own this book but haven't read it: SOA Using Java Web Services