Well I've made progress. I an run jython in the servlet.

But now I get:
javax.servlet.ServletException: Traceback (most recent call last): File 
"C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\demo\ui.py", 
line 1, in <module> from eu.webtoolkit.jwt import WtServlet
java.lang.NoClassDefFoundError: Could not initialize class 
eu.webtoolkit.jwt.WtServlet
Any help here?
I have put the jwt libraries (2) in demo\WEB-INF\lib



________________________________
 From: Jason H <scorp...@yahoo.com>
To: Raphael Bauduin <rbli...@gmail.com> 
Cc: "witty-interest@lists.sourceforge.net" 
<witty-interest@lists.sourceforge.net> 
Sent: Wednesday, September 25, 2013 11:40 AM
Subject: Re: [Wt-interest] Many Jython + JWt questions
 


I think I got most of the classpath stuff resolved except for 
import javax.servlet.http.HttpServlet


What jar are you using to resolve that one?


________________________________
 From: Raphael Bauduin <rbli...@gmail.com>
To: Jason H <scorp...@yahoo.com> 
Cc: "witty-interest@lists.sourceforge.net" 
<witty-interest@lists.sourceforge.net> 
Sent: Wednesday, September 25, 2013 9:52 AM
Subject: Re: [Wt-interest] Many Jython + JWt questions
 


Hi Jason,

as this is clearly Jython
 specific, you might have more success getting answers on the Jython mailing 
list. 
There are possibly Jython mechanism to use jars without even touching the 
classpath (as there is in JRuby and Groovy).

Cheers

Raph




On Wed, Sep 25, 2013 at 3:27 PM, Jason H <scorp...@yahoo.com> wrote:

Ok, so my CLASSPATH needs the JAR name, my mistake. But Jetty has a ton of 
files. That's going to be one long classpath! Is there a length limit or some 
other way to make those available to jython?
>
>
>
>________________________________
> From: Jason H <scorp...@yahoo.com>
>To: Raphael Bauduin <rbli...@gmail.com>; 
>"witty-interest@lists.sourceforge.net" <witty-interest@lists.sourceforge.net> 
>Sent: Wednesday, September 25, 2013 9:16 AM
>
>Subject: Re: [Wt-interest] Many Jython + JWt questions
> 
>
>
>Thanks, still confused.
>I can't wait to get the proper Python version, until then we have all these 
>extra dependencies that I have to learn about. I just want to write Python to 
>code a website. CPython is ideal. No messing with CLASSPATH, Ant, eclipse, or 
>any of that stuff. I want something that follows my normal process flow, 'make 
>&& ./a.out' or even better just './a.out'
>
>
>So far I:
>C:\Windows\System32>set CLASSPATH=C:\jwt-3.3.0\dist;
>
>
>C:\Windows\System32>jython
>Jython 2.5.4rc1 (2.5:723492dbab02, Feb 8 2013, 09:50:55)
>[Java HotSpot(TM) 64-Bit Server VM (Sun Microsystems Inc.)] on java1.6.0_45
>Type "help", "copyright", "credits" or "license" for more information.
>>>> from eu.webtoolkit.jwt import *
>Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
>ImportError: No module named eu
>>>>
>
>
>
>
>Any ideas?
>
>
>
>________________________________
> From: Raphael Bauduin <rbli...@gmail.com>
>To: Jason H <scorp...@yahoo.com>; witty-interest@lists.sourceforge.net 
>Sent: Wednesday, September 25, 2013 5:17 AM
>Subject: Re: [Wt-interest] Many Jython + JWt questions
> 
>
>
>Hi Jason,
>
>not sure it it applicable for you, but I prefer to use embedded jetty for my 
>JWt developments. It seems to be a simpler approach for non-specialists in 
>Java like us.
>
>I've used it with JRuby, Groovy (and Clojure some time ago). Below, you'll 
>find a simple groovy script that uses embedded jetty.
>
>Hope this helps
>
>Raph
>
>
>
>import javax.servlet.http.HttpServlet
>import org.eclipse.jetty.server.Server
>import org.eclipse.jetty.server.Request
>import org.eclipse.jetty.servlet.ServletContextHandler
>import org.eclipse.jetty.webapp.WebAppContext
>import org.eclipse.jetty.server.handler.HandlerList
>import org.eclipse.jetty.server.Handler
>
>import org.eclipse.jetty.servlet.ServletHolder
>
>import eu.webtoolkit.jwt.WApplication
>import eu.webtoolkit.jwt.WEnvironment
>import eu.webtoolkit.jwt.WtServlet
>import eu.webtoolkit.jwt.ServletInit
>import eu.webtoolkit.jwt.WText
>import eu.webtoolkit.jwt.WLineEdit
>import eu.webtoolkit.jwt.WPushButton
>import eu.webtoolkit.jwt.Side
>
>import eu.webtoolkit.jwt.WFileResource
>import eu.webtoolkit.jwt.WImage
>import eu.webtoolkit.jwt.WContainerWidget
>import eu.webtoolkit.jwt.WHBoxLayout
>import eu.webtoolkit.jwt.WVBoxLayout
>import eu.webtoolkit.jwt.AlignmentFlag
>import eu.webtoolkit.jwt.WSelectionBox
>import eu.webtoolkit.jwt.Signal1
>import eu.webtoolkit.jwt.Signal2
>import eu.webtoolkit.jwt.WNavigationBar
>import eu.webtoolkit.jwt.WStackedWidget
>import eu.webtoolkit.jwt.WMenu
>
>class HelloApplication extends WApplication {
>  def HelloApplication(env) {
>    super(env)
>    setCssTheme('bootstrap')
>
>    setTitle("Charts");
>
>    def page_layout = new WVBoxLayout()
>    def container = new WContainerWidget(getRoot())
>
>    def nameEdit = new WLineEdit()
>    nameEdit.keyPressed().addListener(this, { println it.getKey().toString() } 
>as Signal1.Listener ) 
>    page_layout.addWidget(nameEdit)
>
>    container.setLayout(page_layout)
>
>  }
>}
>
>class HelloMain extends WtServlet {
>  WApplication createApplication(WEnvironment env) {
>    new HelloApplication(env) 
>  }
>}
>    server = new Server(8080)
>    
>static_content=server.getClass().getClassLoader().getResource("eu/webtoolkit/jwt/wt-resources").toExternalForm()
>    web_context=new WebAppContext(static_content, '/wt-resources')
>
>    context = new ServletContextHandler(ServletContextHandler.SESSIONS)
>    context.addEventListener(new ServletInit());
>    servlet = new HelloMain()
>    holder = new ServletHolder(servlet)
>    context.addServlet(holder, '/')
>    
>    handler_list= new HandlerList()
>    Handler[] handlers = [web_context,context]
>    handler_list.setHandlers(handlers)
>    server.setHandler(handler_list);
>    server.start()
>
>
>
>
>
>
>
>On Tue, Sep 24, 2013 at 11:32 PM, Jason H <scorp...@yahoo.com> wrote:
>
>Wasn't there also a command to create an app skeleton including WEB-INF and 
>other dirs?
>>
>>
>>
>>
>>
>>
>>
>>________________________________
>> From: Jason H <scorp...@yahoo.com>
>>To: "witty-interest@lists.sourceforge.net" 
>><witty-interest@lists.sourceforge.net> 
>>Sent: Tuesday, September 24, 2013 4:46 PM
>>Subject: [Wt-interest] Many Jython + JWt questions
>> 
>>
>>
>>I am not a Java developer, but I am in a Java shop, so I have to use 
>>Java-based technologies. I am allowed to use Python. I've asked about PWt, 
>>but it's apparently not ready yet. The blog post 
>>(http://www.nan-tic.com/en/from-pyqt-to-jythonjwt-setting-up-the-environment) 
>> goes into detail, but not enough detail for me. I'm new to java, tomcat and 
>>all that.
>>
>>
>>Problems:
>>1. I installed tomcat7 on windows. There doesn't seem to be a 
>>tomcat7-instance-create command. How do I setup a webapp?
>>2. What environment do I need set up? Do I need ant? 
>>3. How do I write and test the python program? Assuming I edit files, What 
>>commands are needed to run it?
>>
>>
>>Many thanks.
>>
>>
>>
>>
>>
------------------------------------------------------------------------------
>>October Webinars: Code for Performance
>>Free Intel webinars can help you accelerate application performance.
>>Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
>>the latest Intel processors and coprocessors. See abstracts and register >
>>http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
>>_______________________________________________
>>witty-interest mailing list
>>witty-interest@lists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>>
>>
>>------------------------------------------------------------------------------
>>October Webinars: Code for Performance
>>Free Intel webinars can help you accelerate application performance.
>>Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>>the latest Intel processors and coprocessors. See abstracts and register >
>>http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
>>_______________________________________________
>>witty-interest mailing list
>>witty-interest@lists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/witty-interest
>>
>>
>
>
>-- 
>Web database: http://www.myowndb.com
>Free Software Developers Meeting: http://www.fosdem.org 
>
>
>------------------------------------------------------------------------------
>October Webinars: Code for Performance
>Free Intel webinars can help you accelerate application performance.
>Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
>the latest Intel processors and coprocessors. See abstracts and register >
>http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
>_______________________________________________
>witty-interest mailing list
>witty-interest@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/witty-interest
>
>
>


-- 
Web database: http://www.myowndb.com
Free Software Developers Meeting: http://www.fosdem.org 


------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to