Re: [JBoss-user] classpath for JSP compiling

2003-02-25 Thread Rod Macpherson
To deploy a JSP-based application we have to know what classes are required
so I think that requirement can be stipulated as part of the ant JSP task.
As far as including files it would be useful to promote a convension whereby
included JSPs have the .jsi extension (or something) to distinguish them
from files that need to be compiled. I guess what we need from JBoss is a
contract that says JSPs have the following package structure and they are
placed in the following directories on Unix and Windows. If Jasper no longer
handles package generation automatically (just one level as far as I can
tell) then I will write an Ant task to automate this.

Here's a scenario. We do a build and deploy and three or four or half a
dozen QA people jump on this system to test. JSPs are being compiled
everywhere and the system bogs down and it makes adds dead time to the
testing cycle. Also, if there's an error on a JSP page (there are hundreds
of them) we want to catch that at build time.

Here's another scenario. I am running an automated test that spiders through
the webpages to measure performance under load and to determine capacity.
The initial results are throw-away because of the JSP compilation issue.
That would be nice to avoid but it's not a show-stopper that we have to run
the tests serveral times.

Rod

- Original Message -
From: "Jules Gosnell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 2:31 AM
Subject: Re: [JBoss-user] classpath for JSP compiling


Guys,

I understand that it would be nice for you not to have to worry about
when/how your JSPs get compiled.

This fn-ality should be a part of Jasper. I only do the Jetty/JBoss
integration.

If you really want it, and I am always dealing with traffic on this
subject - so many people do, then you should find the Jasper project at
jakarta.apache.org and suggest it to them.

Good luck,


Jules


Thorbjørn Ravn Andersen wrote:

> Jules Gosnell wrote:
>
>> This step is problematic to perform in an automated manner, due to
>> the need for development time knowledge (which jsps are servlets and
>> which are just included, etc...).
>
>
> I understand there is a problem detecting this automatically, but
> would it be hard to implement given a configuration file snippet
> saying exactly which files to compile?
> I read the FAQ and found that there is a convoluted code sample which
> apparently maintains such a snippet (it is not easy to understand
> without running it).This may be adapted to provide such a list.
>
> My current approach is to use the ?jsp_precompile feature, but that is
> also hard to automate as it is difficult to estimate when the
> asynchronic deployment with JBoss is finished so Jetty is ready to
> serve pages.
>
> I understand that the Trifork J2EE server can do this.  Perhaps it is
> a nice feature to have?
>





This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] classpath for JSP compiling

2003-02-25 Thread Jules Gosnell
Guys,

I understand that it would be nice for you not to have to worry about 
when/how your JSPs get compiled.

This fn-ality should be a part of Jasper. I only do the Jetty/JBoss 
integration.

If you really want it, and I am always dealing with traffic on this 
subject - so many people do, then you should find the Jasper project at 
jakarta.apache.org and suggest it to them.

Good luck,

Jules

Thorbjørn Ravn Andersen wrote:

Jules Gosnell wrote:

This step is problematic to perform in an automated manner, due to 
the need for development time knowledge (which jsps are servlets and 
which are just included, etc...).


I understand there is a problem detecting this automatically, but 
would it be hard to implement given a configuration file snippet 
saying exactly which files to compile? 
I read the FAQ and found that there is a convoluted code sample which 
apparently maintains such a snippet (it is not easy to understand 
without running it).This may be adapted to provide such a list.

My current approach is to use the ?jsp_precompile feature, but that is 
also hard to automate as it is difficult to estimate when the 
asynchronic deployment with JBoss is finished so Jetty is ready to 
serve pages.

I understand that the Trifork J2EE server can do this.  Perhaps it is 
a nice feature to have?






This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com

---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] classpath for JSP compiling

2003-02-18 Thread Rod Macpherson
I have a simple work-around this: give included jsps a different extension.
It works like a charm and they could default to compiling only dot jsp files
and then resorting to an exclusion or inclusion extension attribute as
you're suggesting.

- Original Message -
From: "Thorbjørn Ravn Andersen" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 12:32 AM
Subject: Re: [JBoss-user] classpath for JSP compiling


Jules Gosnell wrote:

> This step is problematic to perform in an automated manner, due to the
> need for development time knowledge (which jsps are servlets and which
> are just included, etc...).

I understand there is a problem detecting this automatically, but would
it be hard to implement given a configuration file snippet saying
exactly which files to compile?

I read the FAQ and found that there is a convoluted code sample which
apparently maintains such a snippet (it is not easy to understand
without running it).This may be adapted to provide such a list.

My current approach is to use the ?jsp_precompile feature, but that is
also hard to automate as it is difficult to estimate when the
asynchronic deployment with JBoss is finished so Jetty is ready to serve
pages.

I understand that the Trifork J2EE server can do this.  Perhaps it is a
nice feature to have?

--
  Thorbjørn Ravn Andersen  Scandiatransplant
   Skejby Sygehus, indgang 3
  +45 89 49 53 01  DK-8200 Århus N
  http://biobase.dk/~tra





---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] classpath for JSP compiling

2003-02-18 Thread Thorbjørn Ravn Andersen
Jules Gosnell wrote:


This step is problematic to perform in an automated manner, due to the 
need for development time knowledge (which jsps are servlets and which 
are just included, etc...).

I understand there is a problem detecting this automatically, but would 
it be hard to implement given a configuration file snippet saying 
exactly which files to compile?  

I read the FAQ and found that there is a convoluted code sample which 
apparently maintains such a snippet (it is not easy to understand 
without running it).This may be adapted to provide such a list.

My current approach is to use the ?jsp_precompile feature, but that is 
also hard to automate as it is difficult to estimate when the 
asynchronic deployment with JBoss is finished so Jetty is ready to serve 
pages.

I understand that the Trifork J2EE server can do this.  Perhaps it is a 
nice feature to have?

--
 Thorbjørn Ravn Andersen  Scandiatransplant
  Skejby Sygehus, indgang 3
 +45 89 49 53 01  DK-8200 Århus N
 http://biobase.dk/~tra 





---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] classpath for JSP compiling

2003-02-17 Thread Rod Macpherson
Correction: the WebLogic JspC had the "package" switch but in Jasper it's
just -p, same thing only different.

Anyhoo, here's the ant script I use. I specified a package with -p for
another test and every JSP is assigned that package no matter where it lies
in the tree. Maybe the jasper2 task works but have not tried that. What this
does buy me is a sanity check on compilation of our JSPs so it's still
useful.


  
  
  
  
  

  
  
  
  
  
  
.

- Original Message -
From: "Rod Macpherson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 17, 2003 1:56 PM
Subject: Re: [JBoss-user] classpath for JSP compiling


> Used to use -package to specify the base package name and then JspC would
> assume that the directory structure of your JSPs was the fully qualified
> package name: bold assumption on the surface but that's what the
appservers
> expected as well. Now the -package is used on every JSP in the tree you
> point at using -webapp - calling the JspC compiler with a java fork from
ant
> versus built-in ant task with an unknown vintage of Jasper. Seems like a
bug
> but then perhaps assuming directories were sub-packages was deemed to
> presumptive.
>
> - Original Message -
> From: "Jules Gosnell" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, February 17, 2003 10:50 AM
> Subject: Re: [JBoss-user] classpath for JSP compiling
>
>
> > Rod Macpherson wrote:
> >
> > >To summarize,
> > >
> > >1. deploy-time compilation precludes a specific optimization.
> > >2. develop-time compilation requires a classpath.
> > >
> > >If deploying raw pages you lose that optimization anyway and since we
> > >precompile as a pre-test sanity check we already have the classpath in
> our
> > >build script. The problem is the latest Jasper does not assume a
package
> > >structure anymore and that makes it difficult to automate deployment of
> > >compiled pages. Anyway, you have provided a solution and we will
happily
> > >work with that.
> > >
> > except that it is a Jasper1 solution - the Jasper2 package collapsing
> > problem (if it is a real problem, I have not investigated) is not
> > accounted for
> >
> > I don't know much about JSPs, but I think I saw something like a
> > %package tag. Perhaps this will cause Jasper2 to compile your pages into
> > the correct hierarchy.
> >
> > Please report back and I will update the FAQ.
> >
> > Cheers,
> >
> > Jules
> >
> > P.P.S.
> >
> > The example in the FAQ uses Ant's  task to insert
> > Jasper-generated xml into web.xml. I now use xmltask
> > (www.oopsconsultancy.com). It allows you to cut-n-paste xml elements
> > between different files etc, giving you much finer control. I find it
> > vey useful...
> >
> >
> > >
> > >
> > >
> > >- Original Message -
> > >From: "Jules Gosnell" <[EMAIL PROTECTED]>
> > >To: <[EMAIL PROTECTED]>
> > >Sent: Monday, February 17, 2003 2:38 AM
> > >Subject: Re: [JBoss-user] classpath for JSP compiling
> > >
> > >
> > >>Rod Macpherson wrote:
> > >>
> > >>>Can we specify that we want all JSPs compiled at deploy time? The
> servlet
> > >>>approach has shortcomings such as losing the ability to just update a
> > >>>
> > >page
> > >
> > >>>on the fly. Since jetty controls the package structure and the
location
> > >>>
> > >of
> > >
> > >>>class files  it would be nice to have a compile-on-deploy switch or
at
> > >>>
> > >least
> > >
> > >>>an interface to point to a war and say "compile this".
> > >>>
> > >>compile on the fly is a development-time feature.
> > >>
> > >>compile-on-deploy is simply JSP precompilation. The only difference
> > >>being that the one is done by the container, the other by the
developer.
> > >>
> > >>There is an extra optimisation step that can be taken in the latter,
> > >>which is to actually cut Jasper out of the dispatch of URI->Servlet,
> > >>mapping url-patterns in your web.xml directly to compiled pages.
> > >>
> > >>This step is problematic to perform in an automated manner, due to the
> > >>need for development time knowledge (which jsps are servlets and which
> > >>are 

Re: [JBoss-user] classpath for JSP compiling

2003-02-17 Thread Rod Macpherson
Used to use -package to specify the base package name and then JspC would
assume that the directory structure of your JSPs was the fully qualified
package name: bold assumption on the surface but that's what the appservers
expected as well. Now the -package is used on every JSP in the tree you
point at using -webapp - calling the JspC compiler with a java fork from ant
versus built-in ant task with an unknown vintage of Jasper. Seems like a bug
but then perhaps assuming directories were sub-packages was deemed to
presumptive.

- Original Message -
From: "Jules Gosnell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 17, 2003 10:50 AM
Subject: Re: [JBoss-user] classpath for JSP compiling


> Rod Macpherson wrote:
>
> >To summarize,
> >
> >1. deploy-time compilation precludes a specific optimization.
> >2. develop-time compilation requires a classpath.
> >
> >If deploying raw pages you lose that optimization anyway and since we
> >precompile as a pre-test sanity check we already have the classpath in
our
> >build script. The problem is the latest Jasper does not assume a package
> >structure anymore and that makes it difficult to automate deployment of
> >compiled pages. Anyway, you have provided a solution and we will happily
> >work with that.
> >
> except that it is a Jasper1 solution - the Jasper2 package collapsing
> problem (if it is a real problem, I have not investigated) is not
> accounted for
>
> I don't know much about JSPs, but I think I saw something like a
> %package tag. Perhaps this will cause Jasper2 to compile your pages into
> the correct hierarchy.
>
> Please report back and I will update the FAQ.
>
> Cheers,
>
> Jules
>
> P.P.S.
>
> The example in the FAQ uses Ant's  task to insert
> Jasper-generated xml into web.xml. I now use xmltask
> (www.oopsconsultancy.com). It allows you to cut-n-paste xml elements
> between different files etc, giving you much finer control. I find it
> vey useful...
>
>
> >
> >
> >
> >- Original Message -
> >From: "Jules Gosnell" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Monday, February 17, 2003 2:38 AM
> >Subject: Re: [JBoss-user] classpath for JSP compiling
> >
> >
> >>Rod Macpherson wrote:
> >>
> >>>Can we specify that we want all JSPs compiled at deploy time? The
servlet
> >>>approach has shortcomings such as losing the ability to just update a
> >>>
> >page
> >
> >>>on the fly. Since jetty controls the package structure and the location
> >>>
> >of
> >
> >>>class files  it would be nice to have a compile-on-deploy switch or at
> >>>
> >least
> >
> >>>an interface to point to a war and say "compile this".
> >>>
> >>compile on the fly is a development-time feature.
> >>
> >>compile-on-deploy is simply JSP precompilation. The only difference
> >>being that the one is done by the container, the other by the developer.
> >>
> >>There is an extra optimisation step that can be taken in the latter,
> >>which is to actually cut Jasper out of the dispatch of URI->Servlet,
> >>mapping url-patterns in your web.xml directly to compiled pages.
> >>
> >>This step is problematic to perform in an automated manner, due to the
> >>need for development time knowledge (which jsps are servlets and which
> >>are just included, etc...).
> >>
> >>Since taking the middle route (compile-on-deploy) gives you neither the
> >>development-time benefit of compile-on-the-fly, nor the production-time
> >>benefit of removing Jasper from the dispatch (precompilation), I have
> >>chosen not to implement it.
> >>
> >>JSP precompilation is explained in the Jetty/JBoss FAQ :
> >>
> >>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/contrib/jetty/*
> >>FAQ*?rev=HEAD&content-type=text/vnd.viewcvs-markup
> >>
> >>I will add this discussion,
> >>
> >>
> >>Cheers,
> >>
> >>
> >>Jules
> >>
> >>>
> >>>- Original Message -
> >>>From: "Jules Gosnell" <[EMAIL PROTECTED]>
> >>>To: <[EMAIL PROTECTED]>
> >>>Sent: Sunday, February 16, 2003 9:35 AM
> >>>Subject: Re: [JBoss-user] classpath for JSP compiling
> >>>
> >>>
> >>>>Jasper expects it's classpath to be passed as a string via an
>

Re: [JBoss-user] classpath for JSP compiling

2003-02-17 Thread Jules Gosnell
Rod Macpherson wrote:


To summarize,

1. deploy-time compilation precludes a specific optimization.
2. develop-time compilation requires a classpath.

If deploying raw pages you lose that optimization anyway and since we
precompile as a pre-test sanity check we already have the classpath in our
build script. The problem is the latest Jasper does not assume a package
structure anymore and that makes it difficult to automate deployment of
compiled pages. Anyway, you have provided a solution and we will happily
work with that.


except that it is a Jasper1 solution - the Jasper2 package collapsing 
problem (if it is a real problem, I have not investigated) is not 
accounted for

I don't know much about JSPs, but I think I saw something like a 
%package tag. Perhaps this will cause Jasper2 to compile your pages into 
the correct hierarchy.

Please report back and I will update the FAQ.

Cheers,

Jules

P.P.S.

The example in the FAQ uses Ant's  task to insert 
Jasper-generated xml into web.xml. I now use xmltask 
(www.oopsconsultancy.com). It allows you to cut-n-paste xml elements 
between different files etc, giving you much finer control. I find it 
vey useful...





- Original Message -
From: "Jules Gosnell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 17, 2003 2:38 AM
Subject: Re: [JBoss-user] classpath for JSP compiling



Rod Macpherson wrote:


Can we specify that we want all JSPs compiled at deploy time? The servlet
approach has shortcomings such as losing the ability to just update a


page


on the fly. Since jetty controls the package structure and the location


of


class files  it would be nice to have a compile-on-deploy switch or at


least


an interface to point to a war and say "compile this".


compile on the fly is a development-time feature.

compile-on-deploy is simply JSP precompilation. The only difference
being that the one is done by the container, the other by the developer.

There is an extra optimisation step that can be taken in the latter,
which is to actually cut Jasper out of the dispatch of URI->Servlet,
mapping url-patterns in your web.xml directly to compiled pages.

This step is problematic to perform in an automated manner, due to the
need for development time knowledge (which jsps are servlets and which
are just included, etc...).

Since taking the middle route (compile-on-deploy) gives you neither the
development-time benefit of compile-on-the-fly, nor the production-time
benefit of removing Jasper from the dispatch (precompilation), I have
chosen not to implement it.

JSP precompilation is explained in the Jetty/JBoss FAQ :

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/contrib/jetty/*
FAQ*?rev=HEAD&content-type=text/vnd.viewcvs-markup

I will add this discussion,


Cheers,


Jules



- Original Message -
From: "Jules Gosnell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 16, 2003 9:35 AM
Subject: Re: [JBoss-user] classpath for JSP compiling



Jasper expects it's classpath to be passed as a string via an


init-param.


This string is generated by walking up the classloader hierarchy and
adding all relevant dirs/jars to it.

This generation is done on deployment of the war.

It looks s if it is missing the classes in your ejb-jar.

was it deployed when you deployed the war ? If not redeploy it and try
again. If so, let me know and we will investigate further (if you are
using Jetty).

Jules


SainTiss wrote:


Hi,

I'm writing a simple JSP in which I try to access an Entity EJB. Yet
while accessing the jsp, I get javac errors in the JBoss log, like


this:


Error compiling file:


/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost


/


eenloketsysteem/jsp/stTest_jsp.java


/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost


/


eenloketsysteem/jsp/stTest_jsp.java:7: package


eenloketsysteem.entitybeans


does not exist


import eenloketsysteem.entitybeans.*;
^


/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost


/


eenloketsysteem/jsp/stTest_jsp.java:45: cannot resolve symbol


symbol  : class PersoonUtil
location: class org.apache.jsp.stTest_jsp
  PersoonUtil pUtil = new PersoonUtil();
  ^

And so on...

Obviously, JBoss seems unable to locate the Beans... The beans are in a
.jar file with the following structure:

META-INF/MANIFEST.MF
META-INF/ejb-jar.xml
META-INF/jboss.xml
META-INF/jbosscmp-jdbc.xml
eenloketsysteem/entitybeans/PersoonUtil.class
eenloketsysteem/entitybeans/Persoon.class
eenloketsysteem/entitybeans/PersoonData.class
...

The JSP is in a .war file like this:

META-INF/MANIFEST.MF
WEB-INF/jboss-web.xml
WEB-INF/web.xml
jsp/stTest.jsp
...

The URL I use for accessing the JSP is:
Http://localhost:8080/eenloketsysteem/jsp/stTest.jsp

Now the odd thing is, that I also have some servlets in that .war


(which


are 

Re: [JBoss-user] classpath for JSP compiling

2003-02-17 Thread Rod Macpherson
To summarize,

1. deploy-time compilation precludes a specific optimization.
2. develop-time compilation requires a classpath.

If deploying raw pages you lose that optimization anyway and since we
precompile as a pre-test sanity check we already have the classpath in our
build script. The problem is the latest Jasper does not assume a package
structure anymore and that makes it difficult to automate deployment of
compiled pages. Anyway, you have provided a solution and we will happily
work with that.


- Original Message -
From: "Jules Gosnell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 17, 2003 2:38 AM
Subject: Re: [JBoss-user] classpath for JSP compiling


> Rod Macpherson wrote:
>
> >Can we specify that we want all JSPs compiled at deploy time? The servlet
> >approach has shortcomings such as losing the ability to just update a
page
> >on the fly. Since jetty controls the package structure and the location
of
> >class files  it would be nice to have a compile-on-deploy switch or at
least
> >an interface to point to a war and say "compile this".
> >
> compile on the fly is a development-time feature.
>
> compile-on-deploy is simply JSP precompilation. The only difference
> being that the one is done by the container, the other by the developer.
>
> There is an extra optimisation step that can be taken in the latter,
> which is to actually cut Jasper out of the dispatch of URI->Servlet,
> mapping url-patterns in your web.xml directly to compiled pages.
>
> This step is problematic to perform in an automated manner, due to the
> need for development time knowledge (which jsps are servlets and which
> are just included, etc...).
>
> Since taking the middle route (compile-on-deploy) gives you neither the
> development-time benefit of compile-on-the-fly, nor the production-time
> benefit of removing Jasper from the dispatch (precompilation), I have
> chosen not to implement it.
>
> JSP precompilation is explained in the Jetty/JBoss FAQ :
>
> http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/contrib/jetty/*
> FAQ*?rev=HEAD&content-type=text/vnd.viewcvs-markup
>
> I will add this discussion,
>
>
> Cheers,
>
>
> Jules
>
> >
> >
> >- Original Message -
> >From: "Jules Gosnell" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Sunday, February 16, 2003 9:35 AM
> >Subject: Re: [JBoss-user] classpath for JSP compiling
> >
> >
> >>Jasper expects it's classpath to be passed as a string via an
init-param.
> >>
> >>This string is generated by walking up the classloader hierarchy and
> >>adding all relevant dirs/jars to it.
> >>
> >>This generation is done on deployment of the war.
> >>
> >>It looks s if it is missing the classes in your ejb-jar.
> >>
> >>was it deployed when you deployed the war ? If not redeploy it and try
> >>again. If so, let me know and we will investigate further (if you are
> >>using Jetty).
> >>
> >>Jules
> >>
> >>
> >>SainTiss wrote:
> >>
> >>>Hi,
> >>>
> >>>I'm writing a simple JSP in which I try to access an Entity EJB. Yet
> >>>while accessing the jsp, I get javac errors in the JBoss log, like
this:
> >>>
> >>>Error compiling file:
> >>>
>
>/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost
/
> >eenloketsysteem/jsp/stTest_jsp.java
> >
>
>/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost
/
> >eenloketsysteem/jsp/stTest_jsp.java:7: package
eenloketsysteem.entitybeans
> >does not exist
> >
> >>>import eenloketsysteem.entitybeans.*;
> >>>^
> >>>
>
>/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost
/
> >eenloketsysteem/jsp/stTest_jsp.java:45: cannot resolve symbol
> >
> >>>symbol  : class PersoonUtil
> >>>location: class org.apache.jsp.stTest_jsp
> >>>PersoonUtil pUtil = new PersoonUtil();
> >>>^
> >>>
> >>>And so on...
> >>>
> >>>Obviously, JBoss seems unable to locate the Beans... The beans are in a
> >>>.jar file with the following structure:
> >>>
> >>>META-INF/MANIFEST.MF
> >>>META-INF/ejb-jar.xml
> >>>META-INF/jboss.xml
> >>>META-INF/jbosscmp-jdbc.xml
> >>>eenloketsysteem/entitybeans/PersoonUtil.class
> >>>eenloketsysteem/entitybeans/Persoon.class
> >

Re: [JBoss-user] classpath for JSP compiling

2003-02-17 Thread Jules Gosnell
Rod Macpherson wrote:


Can we specify that we want all JSPs compiled at deploy time? The servlet
approach has shortcomings such as losing the ability to just update a page
on the fly. Since jetty controls the package structure and the location of
class files  it would be nice to have a compile-on-deploy switch or at least
an interface to point to a war and say "compile this".


compile on the fly is a development-time feature.

compile-on-deploy is simply JSP precompilation. The only difference 
being that the one is done by the container, the other by the developer.

There is an extra optimisation step that can be taken in the latter, 
which is to actually cut Jasper out of the dispatch of URI->Servlet, 
mapping url-patterns in your web.xml directly to compiled pages.

This step is problematic to perform in an automated manner, due to the 
need for development time knowledge (which jsps are servlets and which 
are just included, etc...).

Since taking the middle route (compile-on-deploy) gives you neither the 
development-time benefit of compile-on-the-fly, nor the production-time 
benefit of removing Jasper from the dispatch (precompilation), I have 
chosen not to implement it.

JSP precompilation is explained in the Jetty/JBoss FAQ :

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/contrib/jetty/* 
FAQ*?rev=HEAD&content-type=text/vnd.viewcvs-markup

I will add this discussion,


Cheers,


Jules



- Original Message -
From: "Jules Gosnell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 16, 2003 9:35 AM
Subject: Re: [JBoss-user] classpath for JSP compiling



Jasper expects it's classpath to be passed as a string via an init-param.

This string is generated by walking up the classloader hierarchy and
adding all relevant dirs/jars to it.

This generation is done on deployment of the war.

It looks s if it is missing the classes in your ejb-jar.

was it deployed when you deployed the war ? If not redeploy it and try
again. If so, let me know and we will investigate further (if you are
using Jetty).

Jules


SainTiss wrote:


Hi,

I'm writing a simple JSP in which I try to access an Entity EJB. Yet
while accessing the jsp, I get javac errors in the JBoss log, like this:

Error compiling file:


/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/
eenloketsysteem/jsp/stTest_jsp.java

/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/
eenloketsysteem/jsp/stTest_jsp.java:7: package eenloketsysteem.entitybeans
does not exist


import eenloketsysteem.entitybeans.*;
^


/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/
eenloketsysteem/jsp/stTest_jsp.java:45: cannot resolve symbol


symbol  : class PersoonUtil
location: class org.apache.jsp.stTest_jsp
   PersoonUtil pUtil = new PersoonUtil();
   ^

And so on...

Obviously, JBoss seems unable to locate the Beans... The beans are in a
.jar file with the following structure:

META-INF/MANIFEST.MF
META-INF/ejb-jar.xml
META-INF/jboss.xml
META-INF/jbosscmp-jdbc.xml
eenloketsysteem/entitybeans/PersoonUtil.class
eenloketsysteem/entitybeans/Persoon.class
eenloketsysteem/entitybeans/PersoonData.class
...

The JSP is in a .war file like this:

META-INF/MANIFEST.MF
WEB-INF/jboss-web.xml
WEB-INF/web.xml
jsp/stTest.jsp
...

The URL I use for accessing the JSP is:
Http://localhost:8080/eenloketsysteem/jsp/stTest.jsp

Now the odd thing is, that I also have some servlets in that .war (which
are compiled by myself of course, and not by JBoss), and there's no
problem with them, i.e. JBoss does find the Beans at runtime, when the
servlets need them...

I guess the most logical explanation would be that JBoss uses a special
classpath when compiling JSP's, but I'm not sure...

Does anyone know what could be the problem here?

Thanks,

Hans







---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user





---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user







This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com



---
This sf.net email is sponso

Re: [JBoss-user] classpath for JSP compiling

2003-02-17 Thread Thorbjørn Ravn Andersen
Rod Macpherson wrote:


Can we specify that we want all JSPs compiled at deploy time? The servlet
approach has shortcomings such as losing the ability to just update a page
on the fly. Since jetty controls the package structure and the location of
class files  it would be nice to have a compile-on-deploy switch or at least
an interface to point to a war and say "compile this".

 

I also think that this would be really nice.  

Our current alternative is to await deployment of the ear, and then walk 
the whole set of JSP-files with ?jsp_precompile.  I would like the other 
much more :)


--
 Thorbjørn Ravn Andersen  Scandiatransplant
  Skejby Sygehus, indgang 3
 +45 89 49 53 01  DK-8200 Århus N
 http://biobase.dk/~tra 




---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] classpath for JSP compiling

2003-02-16 Thread Rod Macpherson
Can we specify that we want all JSPs compiled at deploy time? The servlet
approach has shortcomings such as losing the ability to just update a page
on the fly. Since jetty controls the package structure and the location of
class files  it would be nice to have a compile-on-deploy switch or at least
an interface to point to a war and say "compile this".

- Original Message -
From: "Jules Gosnell" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, February 16, 2003 9:35 AM
Subject: Re: [JBoss-user] classpath for JSP compiling


> Jasper expects it's classpath to be passed as a string via an init-param.
>
> This string is generated by walking up the classloader hierarchy and
> adding all relevant dirs/jars to it.
>
> This generation is done on deployment of the war.
>
> It looks s if it is missing the classes in your ejb-jar.
>
> was it deployed when you deployed the war ? If not redeploy it and try
> again. If so, let me know and we will investigate further (if you are
> using Jetty).
>
> Jules
>
>
> SainTiss wrote:
> > Hi,
> >
> > I'm writing a simple JSP in which I try to access an Entity EJB. Yet
> > while accessing the jsp, I get javac errors in the JBoss log, like this:
> >
> > Error compiling file:
> >
/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/
eenloketsysteem/jsp/stTest_jsp.java
> >
/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/
eenloketsysteem/jsp/stTest_jsp.java:7: package eenloketsysteem.entitybeans
does not exist
> > import eenloketsysteem.entitybeans.*;
> > ^
> >
/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/
eenloketsysteem/jsp/stTest_jsp.java:45: cannot resolve symbol
> > symbol  : class PersoonUtil
> > location: class org.apache.jsp.stTest_jsp
> > PersoonUtil pUtil = new PersoonUtil();
> > ^
> >
> > And so on...
> >
> > Obviously, JBoss seems unable to locate the Beans... The beans are in a
> > .jar file with the following structure:
> >
> > META-INF/MANIFEST.MF
> > META-INF/ejb-jar.xml
> > META-INF/jboss.xml
> > META-INF/jbosscmp-jdbc.xml
> > eenloketsysteem/entitybeans/PersoonUtil.class
> > eenloketsysteem/entitybeans/Persoon.class
> > eenloketsysteem/entitybeans/PersoonData.class
> > ...
> >
> > The JSP is in a .war file like this:
> >
> > META-INF/MANIFEST.MF
> > WEB-INF/jboss-web.xml
> > WEB-INF/web.xml
> > jsp/stTest.jsp
> > ...
> >
> > The URL I use for accessing the JSP is:
> > Http://localhost:8080/eenloketsysteem/jsp/stTest.jsp
> >
> > Now the odd thing is, that I also have some servlets in that .war (which
> > are compiled by myself of course, and not by JBoss), and there's no
> > problem with them, i.e. JBoss does find the Beans at runtime, when the
> > servlets need them...
> >
> > I guess the most logical explanation would be that JBoss uses a special
> > classpath when compiling JSP's, but I'm not sure...
> >
> > Does anyone know what could be the problem here?
> >
> > Thanks,
> >
> > Hans
> >
> >
>
>
>
>
>
> ---
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



Re: [JBoss-user] classpath for JSP compiling

2003-02-16 Thread SainTiss
Hi,

it certainly was deployed, otherwise the servlets wouldn't work
either...

But I've solved the issue by creating an .ear with the .jar and the .war
listed as modules in the application.xml...

I didn't know this was obligatory though... 

I thought an .ear wasn't really needed because the .jar and the .war
were in the same deployment unit...

I guess I was wrong then?

Does anyone know when exactly it is needed to put .jar's and .war's in
an .ear?

Thanks

Hans

On Sun, 2003-02-16 at 18:35, Jules Gosnell wrote:
> Jasper expects it's classpath to be passed as a string via an init-param.
> 
> This string is generated by walking up the classloader hierarchy and 
> adding all relevant dirs/jars to it.
> 
> This generation is done on deployment of the war.
> 
> It looks s if it is missing the classes in your ejb-jar.
> 
> was it deployed when you deployed the war ? If not redeploy it and try 
> again. If so, let me know and we will investigate further (if you are 
> using Jetty).
> 
> Jules
> 
> 
> SainTiss wrote:
> > Hi,
> > 
> > I'm writing a simple JSP in which I try to access an Entity EJB. Yet
> > while accessing the jsp, I get javac errors in the JBoss log, like this:
> > 
> > Error compiling file:
> > 
>/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/eenloketsysteem/jsp/stTest_jsp.java
> 
> > 
>/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/eenloketsysteem/jsp/stTest_jsp.java:7:
> package eenloketsysteem.entitybeans does not exist
> > import eenloketsysteem.entitybeans.*;
> > ^
> > 
>/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/eenloketsysteem/jsp/stTest_jsp.java:45:
> cannot resolve symbol
> > symbol  : class PersoonUtil 
> > location: class org.apache.jsp.stTest_jsp
> > PersoonUtil pUtil = new PersoonUtil();
> > ^
> > 
> > And so on...
> > 
> > Obviously, JBoss seems unable to locate the Beans... The beans are in a
> > .jar file with the following structure:
> > 
> > META-INF/MANIFEST.MF
> > META-INF/ejb-jar.xml
> > META-INF/jboss.xml
> > META-INF/jbosscmp-jdbc.xml
> > eenloketsysteem/entitybeans/PersoonUtil.class
> > eenloketsysteem/entitybeans/Persoon.class
> > eenloketsysteem/entitybeans/PersoonData.class
> > ...
> > 
> > The JSP is in a .war file like this:
> > 
> > META-INF/MANIFEST.MF
> > WEB-INF/jboss-web.xml
> > WEB-INF/web.xml
> > jsp/stTest.jsp
> > ...
> > 
> > The URL I use for accessing the JSP is:
> > Http://localhost:8080/eenloketsysteem/jsp/stTest.jsp
> > 
> > Now the odd thing is, that I also have some servlets in that .war (which
> > are compiled by myself of course, and not by JBoss), and there's no
> > problem with them, i.e. JBoss does find the Beans at runtime, when the
> > servlets need them...
> > 
> > I guess the most logical explanation would be that JBoss uses a special
> > classpath when compiling JSP's, but I'm not sure...
> > 
> > Does anyone know what could be the problem here?
> > 
> > Thanks,
> > 
> > Hans
> > 
> > 
> 
> 
> 
> 
> 
> ---
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
In a world without walls and fences, who needs windows and gates?

Hans Schippers
1LIC INF
UIA 2002-2003



signature.asc
Description: This is a digitally signed message part


Re: [JBoss-user] classpath for JSP compiling

2003-02-16 Thread Jules Gosnell
Jasper expects it's classpath to be passed as a string via an init-param.

This string is generated by walking up the classloader hierarchy and 
adding all relevant dirs/jars to it.

This generation is done on deployment of the war.

It looks s if it is missing the classes in your ejb-jar.

was it deployed when you deployed the war ? If not redeploy it and try 
again. If so, let me know and we will investigate further (if you are 
using Jetty).

Jules


SainTiss wrote:
Hi,

I'm writing a simple JSP in which I try to access an Entity EJB. Yet
while accessing the jsp, I get javac errors in the JBoss log, like this:

Error compiling file:
/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/eenloketsysteem/jsp/stTest_jsp.java 
/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/eenloketsysteem/jsp/stTest_jsp.java:7: package eenloketsysteem.entitybeans does not exist
import eenloketsysteem.entitybeans.*;
^
/usr/local/jboss-3.0.4_tomcat-4.1.12/tomcat-4.1.x/work/MainEngine/localhost/eenloketsysteem/jsp/stTest_jsp.java:45: cannot resolve symbol
symbol  : class PersoonUtil 
location: class org.apache.jsp.stTest_jsp
PersoonUtil pUtil = new PersoonUtil();
^

And so on...

Obviously, JBoss seems unable to locate the Beans... The beans are in a
.jar file with the following structure:

META-INF/MANIFEST.MF
META-INF/ejb-jar.xml
META-INF/jboss.xml
META-INF/jbosscmp-jdbc.xml
eenloketsysteem/entitybeans/PersoonUtil.class
eenloketsysteem/entitybeans/Persoon.class
eenloketsysteem/entitybeans/PersoonData.class
...

The JSP is in a .war file like this:

META-INF/MANIFEST.MF
WEB-INF/jboss-web.xml
WEB-INF/web.xml
jsp/stTest.jsp
...

The URL I use for accessing the JSP is:
Http://localhost:8080/eenloketsysteem/jsp/stTest.jsp

Now the odd thing is, that I also have some servlets in that .war (which
are compiled by myself of course, and not by JBoss), and there's no
problem with them, i.e. JBoss does find the Beans at runtime, when the
servlets need them...

I guess the most logical explanation would be that JBoss uses a special
classpath when compiling JSP's, but I'm not sure...

Does anyone know what could be the problem here?

Thanks,

Hans







---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user