Integrating Apache Wicket with Jython - wicket

I am new to web development, but quite familiar with both Java and Python. In my beginning experiments with web development using Java, I discovered Apache Wicket; around the same time I also discovered Jython (v 2.5). I am wondering if there's a way to integrate Wicket and Jython so I can write Jython scripts instead of Java classes to use Wicket. So far I haven't been able to do that.
Ideas?

I don't see why not.
There are many people using Wicket successfully with Scala language. It should be the same with Jython, JRuby, Closure, ...
See https://github.com/wicketstuff/core/tree/master/jdk-1.5-parent/scala-extensions-parent for example with Scala.

Related

Who calls start() on the Bundle-Activator class in Eclipse?

My ultimate goal is Invoking Eclipse plugin from Java. I see that an Eclipse plugin registers a class as Bundle-Activator in MANIFEST.MF. The start(BundleContext context) method will be called on this class. Where does this call come from?
Eclipse is made up of many repos that are mostly mirrored on GitHub. Some are deprecated and point to other repos. And it's a programming IDE and an OSGi framework at the same time? I find it hard to find the code for this core part of the framework that handles plugin loading. Where is it?
The project to interact with OSGi bundles is Eclipse Equinox. It is an implementation of the OSGi framework. You start equinox and load the bundle jar from there instead of putting them into the regular classpath.
Here you find some information how to do this in general:
http://njbartlett.github.io/2011/07/03/embedding-osgi.html
You can then interact with the bundles from you plain java application. This is not an easy thing though.
What makes things even more complex is that Eclipse is not plain OSGi. Eclipse predates OSGi and many of the concepts are still not fully adapted to plain OSGi.
So using eclipse plugins from a plain java application may be very hard.
I recommend to ask on the mailing list of the plugin you want to use if there is experience with using it outside eclipse.

Can Scala projects be compiled into web application

I'm new to Scala but I do know JAVA. Can Scala projects be compiled into web apps and deployed to Webservers like JAVA?
Thanks!
Scala code is converted into byte code after compilation, hence yes it can be done.
here this should help for starting

JavaEE Build tools: Eclipse, Maven, Whatever

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.

How to use Jersey with Eclipse Helios?

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

Compiling Jython for web apps in Eclipse

I have PyDev set up in Eclipse to do Jython web development. Instead of using the Jython interpreter to handle my servlets I prefer to use the Jython compiler instead for a particular project I'm working on.
Within Eclipse I use Tomcat to test my web apps. The sort of process that I'm looking for is would be very similar to standard Java web development. I'd like to do something like;
Put my Jython scripts in the source folder.
Have the Jython compiler compile the scripts into Java classes when I republish to the Tomcat server.
Pretty much the same as if I would use Java but with Jython scripts instead. I'm having trouble setting this process up in Eclipse. What would be the best way to go about this?
Maybe you have a look at snakefight