My base need is to use the Jersey framework to develop very basic REST webservices.
I've read several tutorials regarding Jersey (JAX-RS framework) and writing webervices but so for I've not found an easy way to setup a development environment based on Eclipse Helios and Glassfish (Open Source Edition). When creating a Webservice in Eclipse, it seems to use JAX-WS, or when creating a Dynamic Web App, Eclipse reports a credentials error (I use admin/admin) or a wrong user name / password.
The tutorials I've found either use myEclipse, or Tomcat, or Maven. The later works pretty well but I wish I could avoid using the command line because creating the web.xml and other files like that one is really scary, and I'm not sure these files are supposed to be human-written. So I suppose (maybe I'm wrong) using a IDE will make things easier.
What do guys use ? How do you generate these files ? Do you use Eclipse only for writting code or also use the deploy facilities?
Any pointers are appreciated !
Thank you
SCO
You DO need to modify web.xml whenever it's needed. Especially with JAX-RS, you will have to define your servlet in web.xml.
I recommand you to use Maven. There are plenty of exemple in the web to do so. Good luck, JAX-RS is really great ! Maven is also nice.
I also use eclipse for creating and consuming web service based applications. In addition to WTP, I also use Axis plugins to make things easier (through wizards, highlighting as well as for schema verification).
The bottomline is to find the plugins that suit you the best
Related
I'm new to a number of technologies which I need to use together in a project. I have installed a Jetty plugin for eclipse and also got maven3 working with it.
I want to start a new web-app project from scratch which will use JSP, but I want it to follow the conventions for Maven projects.
I already know JSP so learning that isn't the challenge here, just getting the project set up.
Any help would be appreciated.
You can follow the tutorial here
http://wiki.eclipse.org/Jetty/Tutorial/Jetty_and_Maven_HelloWorld
The only difference in terms of what you want really is that instead of index.html in that example, you would use .jsp and the tags there you wish to use respectively.
The usage of maven, servlets and jetty would still be pretty much identical.
I have a newbie question...
I started learning java web development with eclipse (because it takes too much time to compile and put classes into corresponding directories). Actually, eclipse possesses every tool to develop anything there.
But a few days ago I realized that in the books I read about javaEE development eclipse is not even touched upon or referenced - everything the author does is using such tools as Maven, JUnit...
So I started wondering - maybe not learning Maven I am missing something out?
What is it used for (except structuring of the application), what are its benefits over eclipse? Which IDE`s do developers in companies use to create and deploy javaEE applications? If Maven is used, how do they type the program itself - in Notepad?
I think you have a real mess in terms. So here are some quick tips:
Eclipse is an IDE, you have that right.
Maven is many things but not an IDE - it can help you manage dependencies, build process etc.
JUnit is a testing framework.
All of them can be used together in Eclipse and you can write your code as usual. These tools just help you with some repetitive tasks.
I recommend you not to use Notepad for Java development and suggest you to read this article.
I'm trying to learn how to develop a j2ee web application but is currently figuring out what's the advantage of using seam-gen vs eclipse seam web project or vice versa.
Why would I use one over the other?
Thanks,
czetsuya
Command line seam-gen stuffs the whole application into a single project and included some files that we didn't need (6 versions of the messages file, for example, each in a differnet language).
The eclipse jboss tools seam-gen produces a bit more modular, streamlined app. It generates 3 separate projects (4 if you want a test project). It took some time to get used to it, but once I got it down, I prefer it. Additionally, when you create he project in eclipse you can leverage more easily the benefits of using those integrated tools.
You can do this with a seam-gen commandline-generated project as well by creating an eclipse project using your seam-gen project as source , but it takes some fiddling around in eclipse to get the settings just right.
My recommendation is to go with eclipse/jboss tools. If you come from a command-line centric background (as I did), the learnign curve may be a bit steeper, but in the end it will be worth it. Use the jboss tools forum for questions you have about this project.
Good luck. Once you get going with eclipse/jboss you'll find it's a great environment to work in.
I am using weblogic worshop to develop my spring based application. Basically it takes lot of time to publish the application to weblogic server. Is there any way to find out what’s going on when eclipse try to build and deploy the project? Basically does it maintain any log file?
Thanks ,
Manoj
Weblogic does a stupid thing according to my experience. If you deploy some WAR, it extracts the libraries in it, and does some analysis in them. You can avoid this behaviour by removing the "static" (not changed by you during work) libraries from the war during development. After removal, add them to system classpath of the domain. It will publish and start a lot faster.
You will find better support for developing Spring applications for WebLogic Server if you migrate to Oracle Enterprise Pack for Eclipse. Workshop is legacy software that is no longer being actively developed. Using Workshop is only necessary for those developing with the deprecated Apache Beehive framework.
http://www.oracle.com/technetwork/developer-tools/eclipse/overview/index.html
OEPE includes a much newer publisher implementation, so you may find your issue resolved. If not, please post to OEPE forum for direct access to people who can answer you question.
Cannot post a forum link, but you can find it from the above URL or via Google.
Thanks Konstantin and Gabor for replying to my question.
Konstantin - I am using Oracle Weblogic workshop 10.3 and I am restricted to use this IDE only.I guess it has OEPE correct me if I am wrong.Also I tried the FastSwap action but everytime I save the changes to a java file the server says -'Publish' and I have to republish the entire application which is taking lot of time.
Thanks,
Manoj
I've setup a project in Netbeans 6.5 with some web services that I've created myself and some web services that I've imported from WSDL files. I've setup a couple of desktop application through Netbeans in order to consume these web services. I'm not too sure where to go from here.
I have the GUI setup but not sure how to reference the web services so they can be consumed. I was wondering would anybody be able to guide me through this process or point me in the direction of a relevant tutorial. I'd also like to learn how to consume a web service through a JSP (also created in Netbeans) if possible.
Thanks.
You may find this tutorial useful:
http://netbeans.org/kb/docs/websvc/client.html, but since you are using Netbean 6.5 this may be the correct version:
http://netbeans.org/kb/61/websvc/client.html. As the steps show, it isn't difficult to build a jax-ws client using Netbeans.
But, it depends on what version of Java you are using also, most likely. You may want to download the latest version of jax-ws, if you get errors with your wsdl.
For a JSP, just create a custom tag to call the client.