RE: [T5] CSS

2008-07-14 Thread Joe Trewin
Hi,

We had this problem too - it's because Jetty by default using NIO, and
there's a problem with that under windows. The solution we use is (in
development) to configure Jetty to use just plain old io:

So instead of using:

connector
implementation=org.mortbay.jetty.nio.SelectChannelConnector
port8081/port
/connector

Try:

connector implementation=org.mortbay.jetty.bio.SocketConnector
port8081/port
/connector

However, in writing this reply I've just found the following:

http://docs.codehaus.org/display/JETTY/Files+locked+on+Windows

Which may be a more correct solution ...


 -Original Message-
 From: kace [mailto:[EMAIL PROTECTED] 
 Sent: 12 July 2008 22:00
 To: users@tapestry.apache.org
 Subject: Re: [T5] CSS
 
 
 the jetty setup is nothing fancy :
 
 !-- Run the application using mvn jetty:run --
 plugin
 groupIdorg.mortbay.jetty/groupId
 artifactIdmaven-jetty-plugin/artifactId
 version6.1.9/version
 configuration
 contextPath//contextPath

 webDefaultXmlsrc/main/resources/webdefault.xml/webDefaultXml
 !-- Log to the console. --
 requestLog
 implementation=org.mortbay.jetty.NCSARequestLog
 !-- This doesn't do anything for 
 Jetty, but is a workaround for a Maven bug
  that prevents the requestLog 
 from being set.
 --
 appendtrue/append
 /requestLog
 connectors
 connector
 implementation=org.mortbay.jetty.nio.SelectChannelConnector
 port8081/port
 /connector
 /connectors
 /configuration
 /plugin
 
 how do you have it setup?  I put the Layout.tml back under 
 /resources/org/example/myapp and now it works + now that the 
 css files are under webapp/ changes get picked up as I change 
 them - thanks.
 
 I haven't used annotation for css - use this link rel=stylesheet
 type=text/css href=${asset:context:/styles/main.css}/
 
 Regards,
 
 ..kace
 
 
 --
 View this message in context: 
 http://www.nabble.com/-T5--tp18415269p18423614.html
 Sent from the Tapestry - User mailing list archive at Nabble.com.
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [T4] Shell and Border ok but ...

2007-07-20 Thread Joe Trewin
Try changing the span to a div ... (Tapestry doesn't care what it
is, and spans have inline layout meaning that they can only contain
other inline tags - div is a block element, so it can).

 -Original Message-
 From: #Cyrille37# [mailto:[EMAIL PROTECTED] 
 Sent: 20 July 2007 17:14
 To: Tapestry users
 Subject: [T4] Shell and Border ok but ...
 
 Hello
 
 I got a @Border with a @Shell to get all stuff common for all pages. 
 It's working but ...
 All that span around the body are not compatible with 
 HTML, so wysiwyg editor are not happy.
 
 Perhaps I've miss some knwoledge ?
 
 The Boder.html :
 
 html
 ...
 /head
 span jwcid=$content$
 span jwcid=@Shell title=Scrutalys disableCaching=true 
 consoleEnabled=true debugEnabled=true 
 browserLogLevel=DEBUG body jwcid=@Body ...
 span jwcid=@RenderBodyThis is the page content./span 
 /body /span /span /html
 
 A tipycal page.html :
 
 html 
 ...
 /head
 body jwcid=$content$
 span jwcid=@Border
 ...
 /span
 /body
 /html
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: OutOfMemoryError after serving N pages

2007-02-22 Thread Joe Trewin
If you're using Tomcat and have access to the startup scripts, I'd
suggest turning on JMX so that you can have a look inside the memory
heaps using jconsole.

To do this add a line to tomcat/bin/startup.sh just before the exec at
the end:

export CATALINA_OPTS=-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=9098
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false

(Note that this assumes an internal dev box, as there's no ssl or
authentication turned on.)

You can then connect to it with jconsole (in your java install's bin
directory).

The next step would be some more automated profiling, but just visually
looking at the state of the heaps during a load test can be quite
helpful.


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
 Sent: 22 February 2007 13:22
 To: users@tapestry.apache.org
 Subject: RE: OutOfMemoryError after serving N pages
 
 Yeah, that is more sinister.
 
 Try dropping a lambdaprobe.war in your container and watching 
 what happens to your app as you serve up N pages.
 
 It isn't as detailed as JProbe or anything like that, but 
 you'll be up and running in 5 minutes and it may give you a 
 better overview of your runtime environment and any resource 
 constraints you may unknowingly have.
 
 http://www.lambdaprobe.org/d/index.htm
 
 
 Tom
 
 -Original Message-
 From: Arjan Verstoep [mailto:[EMAIL PROTECTED]
 Sent: Thursday, February 22, 2007 8:15 AM
 To: Tapestry users
 Subject: Re: OutOfMemoryError after serving N pages
 
 [EMAIL PROTECTED] wrote:
  We had the same thing, and in our case it was related to a small
 PermGen
  Space setting in our Tomcat container.
 
  My understanding of the Sun JVM is that it partitions up 
 its allocated 
  memory into heap, perm gen, etc. chunks and that the Perm 
 Gen space is 
  where all meta data about classes gets stored.  In modern JEE 
  programming with all the CGLIB and just-in-time abstract class
 overrides
   instantiation, the Perm Gen space tends to blow up quicker.
 
  Anyway, try throwing a -XX:MaxPermSize=256m on your JVM startup and
 see
  if that helps.
 
  Note: if you're actually running out of PermGen space, you'll see a 
  reference to that in your OOME.  If you are just getting plain old 
  OOMEs, it sounds like something more sinister.
 
  HTH,
  Tom
 

 My JVM is complaining about heap space, so I fear that it is 
 something sinister...
 
10:36:23,289 ERROR [MusiController4]:253 - 
 Servlet.service() for servlet MusiController4 threw exception
java.lang.OutOfMemoryError: Java heap space
 
 
 ~Arjan Verstoep
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: My crap development environment

2007-02-16 Thread Joe Trewin
 
 depending on his 
  application's initialization requirements.
 
 
 
  Saving a .java file: 15 seconds Saving a .html file: 15 
  seconds Saving a .jwc file: 28 seconds
 
  Stopping the tomcat server: 2 seconds (acceptable) 
 Publishing 
  to the tomcat server: 45 seconds Starting the tomcat server:
  54 seconds (it insists on publishing
first)
 
  On 2/15/07, James Carman [EMAIL PROTECTED] wrote:
   The current jetty plugin uses jetty6.
  
   On 2/15/07, Joe Trewin [EMAIL PROTECTED] wrote:
If you want to use the JettyLauncher plugin for 
 Eclipse - 
I
  think
it
only works with Jetty 5, not Jetty 6.
   
If you want to use Jetty 6 then you can't use 
 the plugin, 
but
  you
can
launch from Eclipse easily enough just by 
 making your own
  little
launcher class - for example:
   
import org.mortbay.jetty.Connector; import 
org.mortbay.jetty.Handler; import 
org.mortbay.jetty.Server; import 
org.mortbay.jetty.handler.ContextHandlerCollection;
import org.mortbay.jetty.handler.DefaultHandler;
import org.mortbay.jetty.handler.HandlerCollection;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;
   
public class JettyLauncher {
   
public static void main(String[] args) 
 throws Exception {
String path = (args.length  0 ? 
 args[0] : web);
Server server = new Server();
   
Connector connector = new 
 SelectChannelConnector();
connector.setPort(8080);
server.setConnectors(new Connector[] { 
 connector 
});
   
HandlerCollection handlers = new 
 HandlerCollection();
ContextHandlerCollection contexts = new 
ContextHandlerCollection();
handlers.setHandlers(new Handler[] { 
 contexts, new
DefaultHandler() });
server.setHandler(handlers);
   
new WebAppContext(contexts, path, /);
   
server.setStopAtShutdown(true);
server.setSendServerVersion(true);
   
server.start();
server.join();
}
}
   
   
 -Original Message-
 From: Daniel Honig [mailto:[EMAIL PROTECTED]
 Sent: 15 February 2007 14:33
 To: Tapestry users
 Subject: Re: My crap development environment

 Murray,
   I really enjoyed using Jetty with the 
 Eclipse startup 
 plugin on a project I did a while back.  I 
 would highly 
 reccomend abandoing tomcat for development and using 
 Jetty during your development.  If you have 
 dependencies 
 to tomcat functionality you might want to mock it out
 during dev., it will definetly save you time. 
Get the
  Jetty
  plugin
 and I think you'll have alot of your issues resolved.

 best,
  -dh


 On 2/14/07, Murray Collingwood 
 [EMAIL PROTECTED]
  
wrote:
 Hi all
 
  I have suffered long and hard under Eclipse and
  Tomcat.  Is
 it really
  necessary for me to wait so long while a 
 file is saved 
  or
 an application is published???
 
  Saving a .java file: 15 seconds Saving a 
 .html file: 
  15 seconds Saving a .jwc file: 28 seconds
 
  Stopping the tomcat server: 2 seconds (acceptable)
 Publishing to the
  tomcat server: 45 seconds Starting the 
 tomcat server: 
  54
 seconds (it
  insists on publishing first)
 
  Does everybody else experience these delays 
 or is it 
  just
  me?
 
  It was suggested that I use maven2 - 
 however I looked
  through
the
  maven2 flash presentation and it didn't mention 
  anything
 about making
  my development work in Eclipse faster - it was more
  focused
 on pulling
  dependencies and easing the build process.  
 And if I 
  were
 to install
  maven2 would it change any of the above anyway???
 
  Cheers
  mc
 
 
 

 
  
 -
  To unsubscribe, e-mail:
  [EMAIL PROTECTED]
  For additional commands, e-mail:
[EMAIL PROTECTED]
 
 


 
  
 -
 To unsubscribe, e-mail:
  [EMAIL PROTECTED]
 For additional commands, e-mail:
  [EMAIL PROTECTED

RE: My crap development environment

2007-02-15 Thread Joe Trewin
If you want to use the JettyLauncher plugin for Eclipse - I think it
only works with Jetty 5, not Jetty 6.

If you want to use Jetty 6 then you can't use the plugin, but you can
launch from Eclipse easily enough just by making your own little
launcher class - for example:

import org.mortbay.jetty.Connector;
import org.mortbay.jetty.Handler;
import org.mortbay.jetty.Server;
import org.mortbay.jetty.handler.ContextHandlerCollection;
import org.mortbay.jetty.handler.DefaultHandler;
import org.mortbay.jetty.handler.HandlerCollection;
import org.mortbay.jetty.nio.SelectChannelConnector;
import org.mortbay.jetty.webapp.WebAppContext;

public class JettyLauncher {

public static void main(String[] args) throws Exception {
String path = (args.length  0 ? args[0] : web);
Server server = new Server();

Connector connector = new SelectChannelConnector();
connector.setPort(8080);
server.setConnectors(new Connector[] { connector });

HandlerCollection handlers = new HandlerCollection();
ContextHandlerCollection contexts = new
ContextHandlerCollection();
handlers.setHandlers(new Handler[] { contexts, new
DefaultHandler() });
server.setHandler(handlers);

new WebAppContext(contexts, path, /);

server.setStopAtShutdown(true);
server.setSendServerVersion(true);

server.start();
server.join();
}
}
 

 -Original Message-
 From: Daniel Honig [mailto:[EMAIL PROTECTED] 
 Sent: 15 February 2007 14:33
 To: Tapestry users
 Subject: Re: My crap development environment
 
 Murray,
   I really enjoyed using Jetty with the Eclipse startup 
 plugin on a project I did a while back.  I would highly 
 reccomend abandoing tomcat for development and using Jetty 
 during your development.  If you have dependencies to tomcat 
 functionality you might want to mock it out
 during dev., it will definetly save you time.Get the Jetty plugin
 and I think you'll have alot of your issues resolved.
 
 best,
  -dh
 
 
 On 2/14/07, Murray Collingwood [EMAIL PROTECTED] wrote:
 Hi all
 
  I have suffered long and hard under Eclipse and Tomcat.  Is 
 it really 
  necessary for me to wait so long while a file is saved or 
 an application is published???
 
  Saving a .java file: 15 seconds
  Saving a .html file: 15 seconds
  Saving a .jwc file: 28 seconds
 
  Stopping the tomcat server: 2 seconds (acceptable) 
 Publishing to the 
  tomcat server: 45 seconds Starting the tomcat server: 54 
 seconds (it 
  insists on publishing first)
 
  Does everybody else experience these delays or is it just me?
 
  It was suggested that I use maven2 - however I looked through the 
  maven2 flash presentation and it didn't mention anything 
 about making 
  my development work in Eclipse faster - it was more focused 
 on pulling 
  dependencies and easing the build process.  And if I were 
 to install 
  maven2 would it change any of the above anyway???
 
  Cheers
  mc
 
 
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]