RE: jasper jsp precompilation error

2005-09-07 Thread Ramnish Kalsi
This method was added in Servlet API version 2.3. 

Can you check if you are using that version ? 

Have a look at whats in your classpath at JSP precompilation time !!!


-Original Message-
From: Aaron Phillips [mailto:[EMAIL PROTECTED]
Sent: 06 September 2005 23:27
To: tomcat-user@jakarta.apache.org
Subject: jasper jsp precompilation error


Hi
I am trying to do JSP precompilation as described at 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html. I can run

the application fine if I do not precompile, but when I do attempt to 
precompile the JSP, I get the message: 

BUILD FAILED
/home/aaron/projects/cdquery/build.xml:307: java.lang.NoSuchMethodError: 
javax.servlet.ServletContext.getResourcePaths
(Ljava/lang/String;)Ljava/util/Set;

I am using Tomcat 5.0.30 & Ant 1.6.2.
Does anyone have an idea what I should do? Below is my ant target XML.
Thanks,
Aaron























**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**


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



jasper jsp precompilation error

2005-09-06 Thread Aaron Phillips
Hi
I am trying to do JSP precompilation as described at 
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html. I can run 
the application fine if I do not precompile, but when I do attempt to 
precompile the JSP, I get the message: 

BUILD FAILED
/home/aaron/projects/cdquery/build.xml:307: java.lang.NoSuchMethodError: 
javax.servlet.ServletContext.getResourcePaths
(Ljava/lang/String;)Ljava/util/Set;

I am using Tomcat 5.0.30 & Ant 1.6.2.
Does anyone have an idea what I should do? Below is my ant target XML.
Thanks,
Aaron























AW: JSP Precompilation

2005-08-17 Thread Bernhard Slominski
Maybe there are a few classfiles missing, which are only used with these two
jsps.

Bernhard

> -Ursprüngliche Nachricht-
> Von: Ramnish Kalsi [mailto:[EMAIL PROTECTED]
> Gesendet: Mittwoch, 17. August 2005 20:52
> An: 'Tomcat Users List'
> Betreff: JSP Precompilation
> 
> 
> I am trying to use jasper2 to pre-compile the JSPs as part of 
> build process.
> The compiler is complaining with the message:
> 
> ERROR - the file 'blah/blah/jsp' generated the following 
> general exception:
> java.lang.NullPointerException'
> 
> After spending some time, i realized that the jsp files which 
> had invalid
> usage of tags were the culprits.
> 
> The errors disappeared after tag cleaning. Now this error is 
> only coming for
> 2 files, and i am positive that there is nothing wrong with tags. 
> 
> What could be other possible reasons ?
> 
> Is there any way of configuring the compiler to output 
> detailed stacktrace,
> if it fails at any jsp file compilation.
> 
> Tomcat version is 4.1.
> 
> thanks,
> ramnish.
> 
> 
> **
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> 
> This footnote also confirms that this email message has been swept by
> MIMEsweeper for the presence of computer viruses.
> 
> www.mimesweeper.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]



JSP Precompilation

2005-08-17 Thread Ramnish Kalsi
I am trying to use jasper2 to pre-compile the JSPs as part of build process.
The compiler is complaining with the message:

ERROR - the file 'blah/blah/jsp' generated the following general exception:
java.lang.NullPointerException'

After spending some time, i realized that the jsp files which had invalid
usage of tags were the culprits.

The errors disappeared after tag cleaning. Now this error is only coming for
2 files, and i am positive that there is nothing wrong with tags. 

What could be other possible reasons ?

Is there any way of configuring the compiler to output detailed stacktrace,
if it fails at any jsp file compilation.

Tomcat version is 4.1.

thanks,
ramnish.


**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**


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



Re: Precompilation of tag files

2005-04-15 Thread Rahul Akolkar
Bernhard Slominski wrote:
> Hi,
> 
> after getting the jsp precompilation finally working, I want also want to do
> the precompliation for tag files.

JSP precompilation should also trigger precompilation for custom tags
within the JSP.

> The precompilation task generates servlets and servlet mappings in the
> web.xml.
> The jasper2 task also creates the servlet and even the class file for the
> tag file.

You can't be seeing a servlet. Its probably a final class implementing
one of the tag interfaces in the javax.servlet.jsp.tagext package.

> But I don't see a chance to do the mapping to the compiled tag file servlet
> in the web.xml.

Its not a servlet ;-) Theres no per tag mapping in web.xml

-Rahul

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



Precompilation of tag files

2005-04-14 Thread Bernhard Slominski
Hi,

after getting the jsp precompilation finally working, I want also want to do
the precompliation for tag files.
I'm using tomcat 5.5.7 on both Windows 2000 and Sun Solaris.
So something like this:
<%@ taglib prefix="mytag" tagdir="/WEB-INF/tags" %>


The precompilation task generates servlets and servlet mappings in the
web.xml.
The jasper2 task also creates the servlet and even the class file for the
tag file.
But I don't see a chance to do the mapping to the compiled tag file servlet
in the web.xml.

Any ideas about this?

Thanks

Bernhard




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



JSP precompilation, jspc, NullPointerException

2005-04-12 Thread Bernhard Slominski
Hi,

I try to get the precompilation working with tomcat 5.5.7 under Windows NT.
I use the following target:
   
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
   

And I'm getting a NullPointer Exception (see below), looks like the Jasper
cannot be created.
Anyone has a clue why this happens?

Thanks for your help 

Bernhard

jspc:
  [jasper2] java.lang.NullPointerException
  [jasper2] at
org.apache.jasper.JspCompilationContext.createCompiler(JspCom
pilationContext.java:220)
  [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:847)
  [jasper2] at org.apache.jasper.JspC.execute(JspC.java:989)
  [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
  [jasper2] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcces
sorImpl.java:39)
  [jasper2] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMet
hodAccessorImpl.java:25)
  [jasper2] at java.lang.reflect.Method.invoke(Method.java:585)
  [jasper2] at
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123
)
  [jasper2] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
  [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364)
  [jasper2] at org.apache.tools.ant.Target.execute(Target.java:341)
  [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:369)
  [jasper2] at
org.apache.tools.ant.Project.executeTarget(Project.java:1214)

  [jasper2] at
org.apache.tools.ant.Project.executeTargets(Project.java:1062
)
  [jasper2] at org.apache.tools.ant.Main.runBuild(Main.java:673)
  [jasper2] at org.apache.tools.ant.Main.startAnt(Main.java:188)
  [jasper2] at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
  [jasper2] at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)

BUILD FAILED
D:\work\jspdeploy2\precompile.xml:25: org.apache.jasper.JasperException




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



Re: Why doesn't JSP precompilation solve this problem?

2005-03-13 Thread Tim Funk
Sounds odd.
For debugging - try using Mozilla (or Firefox). For Mozilla there is a 
utility for viewing the header sent and received. Firefox also has one called 
the webdeveloper toobar which can also do the same.

Try loading the css files (or other broken assets) and check the responses 
being sent and received to find "sketchy" activity.

-Tim
Frank Burns wrote:
I'm using Tomcat v5.0.28 and have built a Struts-based application, using
Tiles, to construct the web pages.
When I deploy the application, and I newly visit each page, all of the text
is displayed but the other visual elements (such as font-sizes, table
layouts, colours, and other formatting set by CSS)appear "broken".
When I'm developing the pages and want to check that they are visually
correct, I lose a lot of time having to re-hit the pages -- sometimes up to
twenty times before they will render properly -- and it's driving me
bonkers!
I thought the problem might have something to do with the fact that the JSPs
have to be compiled by Tomcat (Jasper) when they are first accessed.
However, I now precompile all of my JSPs before deploying the application
but exactly the same problems occur.
I have no idea why this is happening.
Can anyone explain why?
And, especially, can anyone tell me how to resolve this?
Sincerely,
Frank Burns.

-
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: Why doesn't JSP precompilation solve this problem?

2005-03-13 Thread Frank Burns
No, I'm not using container-managed security. No, my .css files are not in a
different application context (webapp) as the pages. But, yes, I am using
MSIE6.

Other than the common MSIE6, unfortunately our problems don't appear to be
that similar.

Frank

-Original Message-
From: alexander dosher [mailto:[EMAIL PROTECTED] 
Sent: 13 March 2005 00:03
To: Tomcat Users List
Subject: Re: Why doesn't JSP precompilation solve this problem?

> When I deploy the application, and I newly visit each page, all of
> the text is displayed but the other visual elements (such as
> font-sizes, table layouts, colours, and other formatting set by
> CSS)appear "broken".

are you using container-managed security?  are your .css files in a 
different application context than the page?  is your browser MSIE6?

if so, this *might* be similar to a problem i'm having, which stems from 
the fact that tomcat will serve unauthenticated http 304s ("Not 
Modified"). so IE will render the page content it has cached, but if the 
.css files come from a different context (or maybe even the same one, i 
haven't tried it like that) IE won't reload them - and apparently it 
doesn't cache them like it does the page. and you get non-styled ugliness.

haven't got a solution, short of filing the 403s thing as a bug, but 
this might help explain what you're seeing...

--alex.



-
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: Why doesn't JSP precompilation solve this problem?

2005-03-12 Thread alexander dosher
When I deploy the application, and I newly visit each page, all of
the text is displayed but the other visual elements (such as
font-sizes, table layouts, colours, and other formatting set by
CSS)appear "broken".
are you using container-managed security?  are your .css files in a 
different application context than the page?  is your browser MSIE6?

if so, this *might* be similar to a problem i'm having, which stems from 
the fact that tomcat will serve unauthenticated http 304s ("Not 
Modified"). so IE will render the page content it has cached, but if the 
.css files come from a different context (or maybe even the same one, i 
haven't tried it like that) IE won't reload them - and apparently it 
doesn't cache them like it does the page. and you get non-styled ugliness.

haven't got a solution, short of filing the 403s thing as a bug, but 
this might help explain what you're seeing...

--alex.

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


Why doesn't JSP precompilation solve this problem?

2005-03-12 Thread Frank Burns
I'm using Tomcat v5.0.28 and have built a Struts-based application, using
Tiles, to construct the web pages.

When I deploy the application, and I newly visit each page, all of the text
is displayed but the other visual elements (such as font-sizes, table
layouts, colours, and other formatting set by CSS)appear "broken".

When I'm developing the pages and want to check that they are visually
correct, I lose a lot of time having to re-hit the pages -- sometimes up to
twenty times before they will render properly -- and it's driving me
bonkers!

I thought the problem might have something to do with the fact that the JSPs
have to be compiled by Tomcat (Jasper) when they are first accessed.
However, I now precompile all of my JSPs before deploying the application
but exactly the same problems occur.

I have no idea why this is happening.

Can anyone explain why?

And, especially, can anyone tell me how to resolve this?

Sincerely,

Frank Burns.



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



precompilation and jspf

2005-01-27 Thread Marcus Beyer
Hello!
I trigger org.apache.jasper.JspC of Tomcat 5.0.26 from ant to precompile 
my JSPs.

It seems that incremental compilation does not check if included files 
(*.jspf) have changed. Is that right?

Is there any workaround for this? To always clean can take minutes ... 
Perhaps we could check if *any* jspf has changed after last build and 
then do a full clean (delete the servlets) if true. Has someone wrote an 
ant task for this? That would be great!

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


Re: precompilation and JSTL

2005-01-25 Thread Marcus Beyer
David Smith schrieb:
Just a thought:
Last I knew using the j2ee jar w/ Tomcat == EVIL.  You can either use 
the j2ee distribution on Sun's site OR Jakarta Tomcat (w/ j2sdk, not 
j2ee), but never j2ee and jakarta tomcat together.  It'll create some 
really ugly version conflicts.  If you use jakarta tomcat from 
jakarta.apache.org, use the jar files that have the specific functions 
you need instead.
Oh yeah. Now it works! I also forgot to clean the previously precompiled ...
Thank you, David and Tim!!
--
Grüße, Marcus

"Whatever you do will be insignificant,
 but it is very important that you do it." -- Gandhi
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: precompilation and JSTL

2005-01-24 Thread Marcus Beyer
Tim Funk schrieb:
Is your web.xml using the 2.4 declaration?
Yes it is.
The problem has to do with precompilation, because it works if I deploy 
the JSPs instead of the servlets.

Example: 
The precompiled Java code looks like this:
_jspx_th_c_out_1.setValue(new String("1 + 2 = ${1 + 2}"));
Whereas the Java code compiled after deployment looks like this:
_jspx_th_c_out_1.setValue((java.lang.Object) 
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate("1 + 2 = 
${1 + 2}", java.lang.Object.class, (PageContext)_jspx_page_context, 
null, false));

Why is it different??
--
Grüße, Marcus
<http://www.Stormlight.de>
"Whatever you do will be insignificant,
 but it is very important that you do it." -- Gandhi
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: precompilation and JSTL

2005-01-24 Thread David Smith
Just a thought: 

Last I knew using the j2ee jar w/ Tomcat == EVIL.  You can either use 
the j2ee distribution on Sun's site OR Jakarta Tomcat (w/ j2sdk, not 
j2ee), but never j2ee and jakarta tomcat together.  It'll create some 
really ugly version conflicts.  If you use jakarta tomcat from 
jakarta.apache.org, use the jar files that have the specific functions 
you need instead. 

For jstl, that would be the standard-1.1 tag lib available here: 
http://jakarta.apache.org/taglibs/index.html.  D/L the standard taglibs, 
drop the jars in your WEB-INF/lib directory, and include the taglibs in 
your web.xml per the docs.  Restart the context and your done.

--David
Tim Funk wrote:
Is your web.xml using the 2.4 declaration?
-Tim
Marcus Beyer wrote:
Tim Funk schrieb:
I finally solved my (first) problem: I had a wrong lib (J2EE 1.3) in 
my class path. So there was some kind of version mismatch ...

Are you sure you want
<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c"%>
and not
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

But still my pages do not work if I specify to use the jstl 1.1 taglib.
Example: 
With 1.0 taglib I get "1 + 2 = 3".
With 1.1 taglib I get "1 + 2 = ${1 + 2}".
Any idea about this?

-
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: Re: precompilation and JSTL

2005-01-24 Thread bounce
Geachte relatie,

Het door u gebruikte e-mailadres is niet meer actief. U kunt uw e-mailbericht 
sturen naar [EMAIL PROTECTED] of dit bericht beantwoorden.

Bedankt voor uw medewerking,

Met vriendelijke groet,

ATP Hypotheken
Het Spoor 40
3994 AK Houten

Tel. 030 750 25 33
Fax. 030 750 25 88
[EMAIL PROTECTED]

 -- DIT IS EEN AUTOMATISCH GEGENEREERD E-MAILBERICHT --



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



Re: precompilation and JSTL

2005-01-24 Thread Tim Funk
Is your web.xml using the 2.4 declaration?
-Tim
Marcus Beyer wrote:
Tim Funk schrieb:
I finally solved my (first) problem: I had a wrong lib (J2EE 1.3) in my 
class path. So there was some kind of version mismatch ...

Are you sure you want
<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c"%>
and not
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

But still my pages do not work if I specify to use the jstl 1.1 taglib.
Example: 
With 1.0 taglib I get "1 + 2 = 3".
With 1.1 taglib I get "1 + 2 = ${1 + 2}".
Any idea about this?

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


Re: Re: precompilation and JSTL

2005-01-24 Thread bounce
Geachte relatie,

Het door u gebruikte e-mailadres is niet meer actief. U kunt uw e-mailbericht 
sturen naar [EMAIL PROTECTED] of dit bericht beantwoorden.

Bedankt voor uw medewerking,

Met vriendelijke groet,

ATP Hypotheken
Het Spoor 40
3994 AK Houten

Tel. 030 750 25 33
Fax. 030 750 25 88
[EMAIL PROTECTED]

 -- DIT IS EEN AUTOMATISCH GEGENEREERD E-MAILBERICHT --



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



Re: precompilation and JSTL

2005-01-24 Thread Marcus Beyer
Tim Funk schrieb:
I finally solved my (first) problem: I had a wrong lib (J2EE 1.3) in my 
class path. So there was some kind of version mismatch ...

Are you sure you want
<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c"%>
and not
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
But still my pages do not work if I specify to use the jstl 1.1 taglib.
Example: 
With 1.0 taglib I get "1 + 2 = 3".
With 1.1 taglib I get "1 + 2 = ${1 + 2}".
Any idea about this?
--
Grüße, Marcus

"Whatever you do will be insignificant,
 but it is very important that you do it." -- Gandhi
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: precompilation and JSTL

2005-01-24 Thread Marcus Beyer
Tim Funk schrieb:
Are you sure you want
<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c"%>
and not
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
-Tim
  


Strange. After changing to JSTL 1.1 taglib, that c:if thing above does 
not work anymore. Isn't ${true} correct here?

--
Grüße, Marcus

"Whatever you do will be insignificant,
 but it is very important that you do it." -- Gandhi
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: precompilation and JSTL

2005-01-24 Thread Marcus Beyer
Tim Funk schrieb:
Are you sure you want
<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c"%>
and not
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
Oh, right. Thank you!
Unfortunately the error persists nevertheless ...
--
Grüße, Marcus

"Whatever you do will be insignificant,
 but it is very important that you do it." -- Gandhi
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: precompilation and JSTL

2005-01-24 Thread Tim Funk
Are you sure you want
<%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c"%>
and not
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>
-Tim
Marcus Beyer wrote:
Hello all!
I am trying to precompile my JSPs using org.apache.jasper.JspC.
Problem: The ones that use JSTL result in uncompilable Java code.
[Sorry for my english. Is it uncompilable or incompilable?]
Example:
  <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
  JSTL test
  

 

The resulting Java file contains this line:
  if (_jspx_meth_c_out_0(_jspx_th_c_if_0, _jspx_page_context))
  return true;
The (Eclipse) compiler complains:
  The method _jspx_meth_c_out_0(JspTag, PageContext) in the type
  test_jsp is not applicable for the arguments (IfTag, PageContext)
"IfTag" is org.apache.taglibs.standard.tag.el.core.IfTag.
"JspTag" is javax.servlet.jsp.tagext.JspTag.
IfTag extends javax.servlet.jsp.jstl.core.ConditionalTagSupport.
ConditionalTagSupport extends javax.servlet.jsp.tagext.TagSupport.
TagSupport implements javax.servlet.jsp.tagext.JspTag.
So this looks right. Any idea what the problem is?
I am using JSTL 1.1.2 with Tomcat 5.0.26.
best wishes,
Marcus Beyer
-
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]


precompilation and JSTL

2005-01-24 Thread Marcus Beyer
Hello all!
I am trying to precompile my JSPs using org.apache.jasper.JspC.
Problem: The ones that use JSTL result in uncompilable Java code.
[Sorry for my english. Is it uncompilable or incompilable?]
Example:
  <%@ taglib uri="http://java.sun.com/jstl/core"; prefix="c" %>
  JSTL test
  

   
The resulting Java file contains this line:
  if (_jspx_meth_c_out_0(_jspx_th_c_if_0, _jspx_page_context))
  return true;
The (Eclipse) compiler complains:
  The method _jspx_meth_c_out_0(JspTag, PageContext) in the type
  test_jsp is not applicable for the arguments (IfTag, PageContext)
"IfTag" is org.apache.taglibs.standard.tag.el.core.IfTag.
"JspTag" is javax.servlet.jsp.tagext.JspTag.
IfTag extends javax.servlet.jsp.jstl.core.ConditionalTagSupport.
ConditionalTagSupport extends javax.servlet.jsp.tagext.TagSupport.
TagSupport implements javax.servlet.jsp.tagext.JspTag.
So this looks right. Any idea what the problem is?
I am using JSTL 1.1.2 with Tomcat 5.0.26.
best wishes,
Marcus Beyer
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: precompilation trouble

2005-01-21 Thread Marcus Beyer
Tim Funk schrieb:
Oops, my bad. Forget newInstance() being called. But the line:
Class bean = ctxt.getClassLoader().loadClass(klass);
I believe does force my previous static statements to hold true.
The problem was not during static initalizations but during 
instantiation of the beans. I solved that by checking if the faces 
context is null and then returning immediately in the constructor.

The next problem is: The resulting java code Japser produces is not 
compilable. Trying to compile these .java files results in lots of 
errors, e.g.:

The method _jspx_meth_c_set_4(JspTag, PageContext) in the type 
dayWeekView_jsp is not applicable for the arguments (IfTag, PageContext)

The other errors look quite similar. Any idea?
thanx!
Marcus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: precompilation trouble

2005-01-17 Thread Tim Funk
Oops, my bad. Forget newInstance() being called. But the line:
Class bean = ctxt.getClassLoader().loadClass(klass);
I believe does force my previous static statements to hold true.
-Tim
Marcus Beyer wrote:
Tim Funk schrieb:
Ahh. Here is your issue:
if (beanName == null) {
try {
Class bean = ctxt.getClassLoader().loadClass(klass);
int modifiers = bean.getModifiers();
if (!Modifier.isPublic(modifiers) ||
Modifier.isInterface(modifiers) ||
Modifier.isAbstract(modifiers)) {
throw new Exception("Invalid bean class modifier");
}
// Check that there is a 0 arg constructor
bean.getConstructor(new Class[] {});
generateNew = true;
} catch (Exception e) {
// Cannot instantiate the specified class
if (ctxt.getOptions().getErrorOnUseBeanInvalidClassAttribute()) {
err.jspError(n, "jsp.error.invalid.bean", klass);
}
}
}
At compile time - jasper is checking that the default constructor of a 
bean may be invoked. By invoking the constructor at compile time - the 
class is loaded by the JVM. This will in turn cause the JVM to call 
any static initializers. (In which you have)

Hmm, were is that code is an invokation of a constructor? As far as I 
can see Jasper just checks if a zero argument constructor exists.

And why does Jasper instantiate beans? Just to check if it is possible 
to instantiate them, or does Jasper do something with the beans?

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


Re: precompilation trouble

2005-01-17 Thread Marcus Beyer
Tim Funk schrieb:
Ahh. Here is your issue:
if (beanName == null) {
try {
Class bean = ctxt.getClassLoader().loadClass(klass);
int modifiers = bean.getModifiers();
if (!Modifier.isPublic(modifiers) ||
Modifier.isInterface(modifiers) ||
Modifier.isAbstract(modifiers)) {
throw new Exception("Invalid bean class modifier");
}
// Check that there is a 0 arg constructor
bean.getConstructor(new Class[] {});
generateNew = true;
} catch (Exception e) {
// Cannot instantiate the specified class
if (ctxt.getOptions().getErrorOnUseBeanInvalidClassAttribute()) {
err.jspError(n, "jsp.error.invalid.bean", klass);
}
}
}
At compile time - jasper is checking that the default constructor of a 
bean may be invoked. By invoking the constructor at compile time - the 
class is loaded by the JVM. This will in turn cause the JVM to call any 
static initializers. (In which you have)
Hmm, were is that code is an invokation of a constructor? As far as I 
can see Jasper just checks if a zero argument constructor exists.

And why does Jasper instantiate beans? Just to check if it is possible 
to instantiate them, or does Jasper do something with the beans?

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


Re: precompilation trouble

2005-01-17 Thread Tim Funk
Ahh. Here is your issue:
if (beanName == null) {
try {
Class bean = ctxt.getClassLoader().loadClass(klass);
int modifiers = bean.getModifiers();
if (!Modifier.isPublic(modifiers) ||
Modifier.isInterface(modifiers) ||
Modifier.isAbstract(modifiers)) {
throw new Exception("Invalid bean class modifier");
}
// Check that there is a 0 arg constructor
bean.getConstructor(new Class[] {});
generateNew = true;
} catch (Exception e) {
// Cannot instantiate the specified class
if (ctxt.getOptions().getErrorOnUseBeanInvalidClassAttribute()) {
err.jspError(n, "jsp.error.invalid.bean", klass);
}
}
}
At compile time - jasper is checking that the default constructor of a bean 
may be invoked. By invoking the constructor at compile time - the class is 
loaded by the JVM. This will in turn cause the JVM to call any static 
initializers. (In which you have)

-Tim
Marcus Beyer wrote:
Tim Funk schrieb:
There here, but your 1st post was a on a Friday afternoon. And the 
errors were not very clear. Stack traces and a better description is 
probably in order.

I see :-)
=== description ===
I am using the ant script I found on page
. The 
relevant software I use is Tomcat 5.0.26 (the one that comes with JBoss 
3.2.5) and JSF 1.1_01 reference implementation (the latest release).

BTW: Is there a way to let Tomcat do the job of JSP compilation on 
deployment? I mean without the need of visiting each page manually?

=== stack trace ===
  [jasper2] SCHWERWIEGEND: java.lang.NullPointerException
  [jasper2] java.lang.RuntimeException: java.lang.NullPointerException
  [jasper2] at MyHelper.getManagedBean(ManagedBeanHelper.java:43)
  [jasper2] at MyBean.loadValues(DomainListBean.java:93)
  [jasper2] at MyBean.(DomainListBean.java:47)
  [jasper2] at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  [jasper2] at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) 

  [jasper2] at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) 

  [jasper2] at 
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
  [jasper2] at java.lang.Class.newInstance0(Class.java:308)
  [jasper2] at java.lang.Class.newInstance(Class.java:261)
  [jasper2] at 
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1212) 

  [jasper2] at 
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
  [jasper2] at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
  [jasper2] at 
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
  [jasper2] at 
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
  [jasper2] at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
  [jasper2] at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
  [jasper2] at 
org.apache.jasper.compiler.Generator.generate(Generator.java:3261)
  [jasper2] at 
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
  [jasper2] at 
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
  [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:776)
  [jasper2] at org.apache.jasper.JspC.execute(JspC.java:905)
  [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [jasper2] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

  [jasper2] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 

  [jasper2] at java.lang.reflect.Method.invoke(Method.java:324)
  [jasper2] at 
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:124)
  [jasper2] at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
  [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364)
  [jasper2] at org.apache.tools.ant.Target.execute(Target.java:301)
  [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:328)
  [jasper2] at 
org.apache.tools.ant.Project.executeTarget(Project.java:1215)
  [jasper2] at 
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:379) 

  [jasper2] at 
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135) 

  [jasper2] Caused by: java.lang.NullPointerException
  [jasper2] at MyHelper.getManagedBean(ManagedBeanHelper.java:36)
  [jasper2] ... 32 more
thanx!
Marcus
-
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: precompilation trouble

2005-01-17 Thread Marcus Beyer
Marcus Beyer schrieb:
=== description ===
I am using the ant script I found on page
. 
Sorry, I mean this one:

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


Re: precompilation trouble

2005-01-17 Thread Marcus Beyer
Tim Funk schrieb:
There here, but your 1st post was a on a Friday afternoon. And the 
errors were not very clear. Stack traces and a better description is 
probably in order.
I see :-)
=== description ===
I am using the ant script I found on page
. The 
relevant software I use is Tomcat 5.0.26 (the one that comes with JBoss 
3.2.5) and JSF 1.1_01 reference implementation (the latest release).

BTW: Is there a way to let Tomcat do the job of JSP compilation on 
deployment? I mean without the need of visiting each page manually?

=== stack trace ===
  [jasper2] SCHWERWIEGEND: java.lang.NullPointerException
  [jasper2] java.lang.RuntimeException: java.lang.NullPointerException
  [jasper2] at MyHelper.getManagedBean(ManagedBeanHelper.java:43)
  [jasper2] at MyBean.loadValues(DomainListBean.java:93)
  [jasper2] at MyBean.(DomainListBean.java:47)
  [jasper2] at 
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  [jasper2] at 
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
  [jasper2] at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
  [jasper2] at 
java.lang.reflect.Constructor.newInstance(Constructor.java:274)
  [jasper2] at java.lang.Class.newInstance0(Class.java:308)
  [jasper2] at java.lang.Class.newInstance(Class.java:261)
  [jasper2] at 
org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1212)
  [jasper2] at 
org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
  [jasper2] at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
  [jasper2] at 
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
  [jasper2] at 
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
  [jasper2] at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
  [jasper2] at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
  [jasper2] at 
org.apache.jasper.compiler.Generator.generate(Generator.java:3261)
  [jasper2] at 
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
  [jasper2] at 
org.apache.jasper.compiler.Compiler.compile(Compiler.java:470)
  [jasper2] at org.apache.jasper.JspC.processFile(JspC.java:776)
  [jasper2] at org.apache.jasper.JspC.execute(JspC.java:905)
  [jasper2] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [jasper2] at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  [jasper2] at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  [jasper2] at java.lang.reflect.Method.invoke(Method.java:324)
  [jasper2] at 
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:124)
  [jasper2] at 
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:269)
  [jasper2] at org.apache.tools.ant.Task.perform(Task.java:364)
  [jasper2] at org.apache.tools.ant.Target.execute(Target.java:301)
  [jasper2] at org.apache.tools.ant.Target.performTasks(Target.java:328)
  [jasper2] at 
org.apache.tools.ant.Project.executeTarget(Project.java:1215)
  [jasper2] at 
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:379)
  [jasper2] at 
org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:135)
  [jasper2] Caused by: java.lang.NullPointerException
  [jasper2] at MyHelper.getManagedBean(ManagedBeanHelper.java:36)
  [jasper2] ... 32 more

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


Re: precompilation trouble

2005-01-17 Thread Tim Funk
There here, but your 1st post was a on a Friday afternoon. And the errors 
were not very clear. Stack traces and a better description is probably in order.

-Tim
Marcus Beyer wrote:
Marcus Beyer schrieb:
Using Tomcat 5.0.26 I have some problems precompiling my pages with:
  org.apache.jasper.JspC
The precompiler instantiates some beans, altough I don't exactly know 
why. During instatiation some beans need to access managed beans, so 
they call something like this:

  FacesContext facesContext = FacesContext.getCurrentInstance ( );
  /*
   * this happens if I try to precompile some jsp pages ...
   */
  if (facesContext == null) log.error ("no faces context found!");

Hmm. Really no Tomcat experts here? Where can I find them?
Marcus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: precompilation trouble

2005-01-17 Thread Marcus Beyer
Marcus Beyer schrieb:
Using Tomcat 5.0.26 I have some problems precompiling my pages with:
  org.apache.jasper.JspC
The precompiler instantiates some beans, altough I don't exactly know 
why. During instatiation some beans need to access managed beans, so 
they call something like this:

  FacesContext facesContext = FacesContext.getCurrentInstance ( );
  /*
   * this happens if I try to precompile some jsp pages ...
   */
  if (facesContext == null) log.error ("no faces context found!");
Hmm. Really no Tomcat experts here? Where can I find them?
Marcus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: precompilation trouble

2005-01-14 Thread Marcus Beyer
Marcus Beyer schrieb:
The precompiler instantiates some beans, altough I don't exactly know 
why. During instatiation some beans need to access managed beans, so 
they call something like this:

  FacesContext facesContext = FacesContext.getCurrentInstance ( );
  /*
   * this happens if I try to precompile some jsp pages ...
   */
  if (facesContext == null) log.error ("no faces context found!");
I forgot to mention that I am using JSF 1.1_01 reference impl.
Has anyone an idea what is happening here? Please give me a hint.
thanx!
Marcus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


precompilation trouble

2005-01-14 Thread Marcus Beyer
Greetings!
Using Tomcat 5.0.26 I have some problems precompiling my pages with:
  org.apache.jasper.JspC
The precompiler instantiates some beans, altough I don't exactly know 
why. During instatiation some beans need to access managed beans, so 
they call something like this:

  FacesContext facesContext = FacesContext.getCurrentInstance ( );
  /*
   * this happens if I try to precompile some jsp pages ...
   */
  if (facesContext == null) log.error ("no faces context found!");
  Application app = facesContext.getApplication ( );
  Object o = app.createValueBinding ("#{" + beanName + 
"}").getValue (facesContext);

Unfortunately getCurrentInstance returns null causing the precompilation 
to fail.

Please help a bloody beginner :)
thanx!
Marcus
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Coding In Paradise: Tomcat JSP Precompilation is SLOW!!

2005-01-07 Thread Kevin A. Burton
Julius Davies wrote:
Why not hit every URL with "curl" or "wget" before deploying and include
Tomcat's "work" directory with your deployment?  How does that compare
for speed? 

 

We've already tried that... First off its the same speed... second there 
are horrible out of memory issues with the JspPrecompiler.

Its a lovely piece of code!
Also, have you tried giving Ant some extra heap to play with?  I think
this is how (on unix):
export ANT_OPTS="-Xms256M -Xmx256M"
 

How would that help us?  Won't it just run out of memory if heap were an 
issue?

Kevin
--
Use Rojo (RSS/Atom aggregator).  Visit http://rojo.com. Ask me for an 
invite!  Also see irc.freenode.net #rojo if you want to chat.

Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html
If you're interested in RSS, Weblogs, Social Networking, etc... then you 
should work for Rojo!  If you recommend someone and we hire them you'll 
get a free iPod!
   
Kevin A. Burton, Location - San Francisco, CA
  AIM/YIM - sfburtonator,  Web - http://peerfear.org/
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412

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


Re: Coding In Paradise: Tomcat JSP Precompilation is SLOW!!

2005-01-07 Thread Julius Davies
Why not hit every URL with "curl" or "wget" before deploying and include
Tomcat's "work" directory with your deployment?  How does that compare
for speed? 

Also, have you tried giving Ant some extra heap to play with?  I think
this is how (on unix):

export ANT_OPTS="-Xms256M -Xmx256M"

yours,

Julius

On Fri, 2005-07-01 at 17:01 -0800, Kevin A. Burton wrote:
> >
> >
> >  The entire JSP compilation process, using Ant and the jasper2 ant 
> > task, takes about 30 minutes! This is far too long. I mean, there are 
> > systems that are doing more than just compiling text, such as advanced 
> > 3D graphics and speech recognition, that are far faster than Tomcat's 
> > JSP compilation.
> >
> Fun!  Why isn't fixing this a huge priority!?
> 
> http://codinginparadise.org/weblog/2005/01/tomcat-jsp-precompilation-is-slow.html
> 

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



Coding In Paradise: Tomcat JSP Precompilation is SLOW!!

2005-01-07 Thread Kevin A. Burton

 The entire JSP compilation process, using Ant and the jasper2 ant 
task, takes about 30 minutes! This is far too long. I mean, there are 
systems that are doing more than just compiling text, such as advanced 
3D graphics and speech recognition, that are far faster than Tomcat's 
JSP compilation.

Fun!  Why isn't fixing this a huge priority!?
http://codinginparadise.org/weblog/2005/01/tomcat-jsp-precompilation-is-slow.html
--
Use Rojo (RSS/Atom aggregator).  Visit http://rojo.com. Ask me for an 
invite!  Also see irc.freenode.net #rojo if you want to chat.

Rojo is Hiring! - http://www.rojonetworks.com/JobsAtRojo.html
If you're interested in RSS, Weblogs, Social Networking, etc... then you 
should work for Rojo!  If you recommend someone and we hire them you'll 
get a free iPod!
   
Kevin A. Burton, Location - San Francisco, CA
  AIM/YIM - sfburtonator,  Web - http://peerfear.org/
GPG fingerprint: 5FB2 F3E2 760E 70A8 6174 D393 E84D 8D04 99F1 4412



Re: JSP Precompilation with Tomcat 5

2004-08-11 Thread QM
On Tue, Aug 10, 2004 at 11:44:54PM -0400, [EMAIL PROTECTED] wrote:
: BUILD FAILED
: java.lang.IncompatibleClassChangeError: Implementing class

Given the definition of IncompatibleClassChangeError[1], it sounds like
you have a rogue JAR or classfile somewhere in the classpath.  If you're
upgrading from Tomcat 4 -> 5 beware of lingering v4 code.

Check the various "endorsed" dirs, as people sometimes put JARs there
out of desperation and then forget about them.

Also, this looks odd:

: 
: 

I don't know whether it's "wrong," just that my precompilation works
without it. =)


: 
: 
: 

Wouldn't this be "common/lib/jasper-compiler.jar" ?
-and wouldn't you also need servlet-api.jar and jsp-api.jar?

-QM

[1] = 
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IncompatibleClassChangeError.html

   Thrown when an incompatible class change has occurred to some class
   definition. The definition of some class, on which the currently
   executing method depends, has since changed.


-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


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



JSP Precompilation with Tomcat 5

2004-08-10 Thread tomcat
I have been trying to resolve a frustration JSP precompilation
problem with Tomcat 5.  I had everythng working in prior Tomcat
releases but ever since the upgrade to 5 I am getting the
following error when I try to precompile my JSPs.

BUILD FAILED
java.lang.IncompatibleClassChangeError: Implementing class

java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at
org.apache.tools.ant.loader.AntClassLoader2.defineClassFromData(AntClassLoader2.java:76)
at
org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1073)
at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1137)
at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1090)
at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:960)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:457)
   at
org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:183)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
at org.apache.tools.ant.Task.perform(Task.java:364)
at org.apache.tools.ant.Target.execute(Target.java:341)
at org.apache.tools.ant.Target.performTasks(Target.java:369)
at
org.apache.tools.ant.Project.executeTarget(Project.java:1214)
at
org.apache.tools.ant.Project.executeTargets(Project.java:1062)
at org.apache.tools.ant.Main.runBuild(Main.java:673)
at org.apache.tools.ant.Main.startAnt(Main.java:188)
at
org.apache.tools.ant.launch.Launcher.run(Launcher.java:196)
at
org.apache.tools.ant.launch.Launcher.main(Launcher.java:55)


Here is the excerpt from my build.xml

  


















  

  

  


I would greatly appreciate any and all help in resolving this
issue as I am at my wits end and out of ideas to try.

Thanks in advance!





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



JSP Precompilation in Tomcat 5.0.26

2004-08-09 Thread tomcat
Hello:

I am attempting to upgrade from Tomcat 4.0.6 to 5.0.26 (embedded in 
JBoss 3.2.5). However, following the upgrade,
I can no longer seem to precompile my JSPs as I did before.  The
following build.xml extract worked fine in 4.0.6:















Follwing the 5.0.26 upgrade, this now produces errors such as the
following:

[jasperc] org.apache.jasper.JasperException: Unrecognized option:
-v2. 
Use -help for help.

I have also unsuccessfuly tried the apparently new, Tomcat 5
recommended 
way of precompiling as follows:




















This produces the following error

java.lang.IncompatibleClassChangeError: Implementing class

What am I missing and/or not doing in the new version? What does
this error mean in this
context and how can I get more information about it (for example
what class is being changed
in an incompatible manner)?  This is a stock Tomcat 5.0.26/JBoss
3.2.5 installation.  
I'd appreciate any and all tips on what to investigate or how I
might track this down 
and resolve it.

Thanks!

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



RE: precompilation of jsps

2004-04-15 Thread Allistair Crossley
You need to use Jasper 2 whic is on the Tomcat 5 homepage. There is an Ant build file 
that you need to run to do this .. the instructions are there.

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jasper-howto.html

ADC

-Original Message-
From: Niraj Alok [mailto:[EMAIL PROTECTED]
Sent: 15 April 2004 12:58
To: Tomcat Users List
Subject: precompilation of jsps


Hi All,

Is it possible to precompile the jsps during the starting process of tomcat so that 
they are not compiled during run time? 

I know its possible in weblogic but am not sure about Tomcat. The HOW- TO also don't 
mention any thing about it.


Regards,
Niraj


 
---
QAS Ltd.
Developers of QuickAddress Software
http://www.qas.com";>www.qas.com
Registered in England: No 2582055
Registered in Australia: No 082 851 474
---



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



precompilation of jsps

2004-04-15 Thread Niraj Alok
Hi All,

Is it possible to precompile the jsps during the starting process of tomcat so that 
they are not compiled during run time? 

I know its possible in weblogic but am not sure about Tomcat. The HOW- TO also don't 
mention any thing about it.


Regards,
Niraj


JSP Precompilation using Jasper

2004-02-05 Thread Alpesh Parmar
HI to all,

I am using Jasper(Tomcat) for converting the JSP Page
to .java files. I have configured my ant build file to
add jspc task and providing the necessary attributes.






On using, EmptyStackException is thrown. Can anyone
provide me any suggestions ?

Thanks :)

Parmar 

__
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html

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



Re: JSP Precompilation / JSPC / JSP servlet mapping

2003-07-18 Thread Justin Ruthenbeck
At 01:46 PM 7/18/2003, you wrote:
"...An appropriate token placed in the web
application deployment descriptor may also be used to automatically insert
the generated servlet declarations and mappings using Ant filtering
capabilities. This is actually how all the webapps distributed with Tomcat
are automatically compiled as part of the build process."
This is the part that is very unclear.  Please explain the use of the
webXmlFragment and how it can be used to place the mappings into a web.xml.
See Ant's Filter task documentation.  Basically, you take your web.xml as 
you have it (without any of the precompiled jsp information) and add a 
token like "@jspServletXml" where you want the fragment placed at.  Then 
define a  in your build xml (using "jspServletXml" and 
"webXmlFragment") and copy your existing web.xml to a new location (with 
filtering=true) -- this replaces "@jspServletXml" with jasper2's generated xml.

Disclaimer: I don't use this method because the Ant tasks don't do what 
I  need it to do (I need to support builds with precompile for multiple 
appservers).  Instead, I manually enter all information for our precompiled 
jsps in the web.xml and use a different script for running jspc.

justin


Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

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


Re: JSP Precompilation / JSPC / JSP servlet mapping

2003-07-18 Thread Lukas Bradley

"Then, the declarations and mappings for the servlets which were generated
during the precompilation must be added to the web application deployment
descriptor. Insert the ${webapp.path}/WEB-INF/generated_web.xml at the right
place inside the ${webapp.path}/WEB-INF/web.xml file. Restart the web
application (using the manager) and test it to verify it is running fine
with precompiled servlets. An appropriate token placed in the web
application deployment descriptor may also be used to automatically insert
the generated servlet declarations and mappings using Ant filtering
capabilities. This is actually how all the webapps distributed with Tomcat
are automatically compiled as part of the build process."

This is the part that is very unclear.  Please explain the use of the
webXmlFragment and how it can be used to place the mappings into a web.xml.

Lukas




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



Re: JSP Precompilation / JSPC / JSP servlet mapping

2003-07-18 Thread Justin Ruthenbeck
At 09:24 AM 7/18/2003, you wrote:
Hi,

I've set my Tomcat 4.1.24 installation to production mode, i.e. I've set 
'development' to false, 'reloading' to true and 'fork' to true in 
CATALINA_HOME/conf/web.xml.
If you're in production, reloading should be false (you don't want to poll 
for changed resources).

I have some JSPs that are modified from time to time.  My questions are:
... all answered many times.

STFA for "precompile" or derivatives:
http://marc.theaimsgroup.com/?l=tomcat-user
RTFM under "Web Application Compilation"
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html
If you still can't find the answers, post again and we'll clarify.

justin


1a. Why is the package name for java files generated from a JSP 
compilation different when using JSPC and when you let Jasper compile the 
JSP when you access it (especially for JSP in directories in a context)?

1b. Can you use JSPC to precompile JSPs into the work directory without 
having to wait till they are accessed or using something like UNIX's wget 
to 'touch' the file and force a compilation?

2. How exactly does Jasper precompile JSPs into the work directory?  Can 
one write an Ant build file to precompile JSPs in a context to the work 
dir the same way Jasper does?

3. If you've precompiled your JSPs and mapped them in web.xml would Jasper 
precompile them and reload them if they are subsequently modified?

4. What are the advantages of mapping JSPs in web.xml as opposed to having 
Jasper compile them in the work directory?

Zach.



Justin Ruthenbeck
Software Engineer, NextEngine Inc.
justinr - AT - nextengine DOT com
Confidential
   See http://www.nextengine.com/confidentiality.php

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


JSP Precompilation / JSPC / JSP servlet mapping

2003-07-18 Thread Zach Gatu
Hi,

I've set my Tomcat 4.1.24 installation to production mode, i.e. I've set 
'development' to false, 'reloading' to true and 'fork' to true in 
CATALINA_HOME/conf/web.xml.

I have some JSPs that are modified from time to time.  My questions are:

1a. Why is the package name for java files generated from a JSP 
compilation different when using JSPC and when you let Jasper compile 
the JSP when you access it (especially for JSP in directories in a context)?

1b. Can you use JSPC to precompile JSPs into the work directory without 
having to wait till they are accessed or using something like UNIX's 
wget to 'touch' the file and force a compilation?

2. How exactly does Jasper precompile JSPs into the work directory?  Can 
one write an Ant build file to precompile JSPs in a context to the work 
dir the same way Jasper does?

3. If you've precompiled your JSPs and mapped them in web.xml would 
Jasper precompile them and reload them if they are subsequently modified?

4. What are the advantages of mapping JSPs in web.xml as opposed to 
having Jasper compile them in the work directory?

Zach.

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


Jasper Compilation - Vol. 2 (continued from Webapp Precompilation using Antand Jasper howto)

2003-03-23 Thread Johannes Fiala
Hi there,

I've just built an ant task to allow for compilation of Jsps (jspc)
*) the compiled jsps are put into /web/WEB-INF/src/*.java
*) a generated WEB-INF directory is created at 
/web/WEB-INF/generated_web.xml

However, I'd like to accomplish the following:
*) automatically merge the generated_web.xml into the web.xml that already 
exists
*) deploy the webapp to the container (not only install, I mean deploy)

Has anybody done this so far?
thx
Johannes





  


  


  

  




  


Webapp Precompilation using Ant and Jasper howto

2003-03-23 Thread Johannes Fiala
Hi there,

I read the Jasper howto 
(http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jasper-howto.html), but I 
didn't get the build.xml file to work.

here's the commandline I typed in:
F:\src>ant -Dtomcat.home=f:/tomcat-4.1.18 
-Dwebapp.path=f:/tomcat-4.1.18/webapps/myapp

I get the following error:

Buildfile: build.xml

jspc:
2003-03-23 03:26:39 - ERROR-the file '\views\liste.jsp' gene
rated the following general exception: java.lang.NullPointerException
  [jasper2] Error in class org.apache.jasper.JspC

BUILD FAILED
file:F:/soap/esv/src/build.xml:21: org.apache.jasper.JasperException

Total time: 2 seconds


liste.jsp itself is simply empty, so it seems that Jasper didn't produce 
any output! I tried it both with tomcat running and tomcat stopped.

here's the build.xml file in F:\src\build.xml:


  


  


  


  

  




  

  





  


  



  



  

  
  
  


  

  
  



Can anybody shed any light onto this issue?

thx alot
Johannes

RE: precompilation of jsp pages

2002-11-19 Thread Subir Sengupta
There seem to be a number of differences between the runtime compiler and
the command line compiler (i.e. jspc which is called by ANT).  One of them
being with file naming (the problem you describe).  Also you will find that
if you have an underscore in the jsp file name both compilers will name them
differently.  For example a file named a_b.jsp will be named a_b.java by the
command line compiler and a_0005fb$jsp.java by the runtime compiler.  To get
it to work right, I had to go into Jasper and fix the code to make name
files consistently.  I don't know if this has been fixed in Jasper2.

Subir

-Original Message-
From: Ojars Kalnins [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 19, 2002 6:50 AM
To: Tomcat MailingList
Subject: precompilation of jsp pages


Hi!

I am using tomcat 4.0 and have problem with the precompilation of jsp pages.
Can anybody say why tomcat generates java files with name containing "$jsp"?
For example, "index.jsp" is generated to "index$jsp.java" file.

I wanted to use ANT (1.5.1) to precompile jsp files.
ANT generates java files without "$jsp" and tomcat does not use them, but
generates new files using "$jsp" in the file and class name.
Therefore I can use ANT only to check jsp errors, but I don't get fast
initial invocation of jsp pages when tomcat is started.

Thanks in advance,
Ojars

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




precompilation of jsp pages

2002-11-19 Thread Ojars Kalnins
Hi!

I am using tomcat 4.0 and have problem with the precompilation of jsp pages.
Can anybody say why tomcat generates java files with name containing "$jsp"?
For example, "index.jsp" is generated to "index$jsp.java" file.

I wanted to use ANT (1.5.1) to precompile jsp files.
ANT generates java files without "$jsp" and tomcat does not use them, but generates 
new files using "$jsp" in the file and class name.
Therefore I can use ANT only to check jsp errors, but I don't get fast initial 
invocation of jsp pages when tomcat is started.

Thanks in advance,
Ojars



Re: jspc problem: precompilation inserts  character

2002-11-04 Thread peter lin

you need to replace the pound character with the equivalent HTML code.

as in replace with "£". that should work.

peter



Anthony Martin wrote:
> 
> Hi,
> 
>  I have hit a very interesting problem with precompilation of jsp files
> using the jspc.bat which is distributed with Tomcat.
> 
>  In trying to precompile a jsp that includes the 'pound' character (£),
> jspc.bat generates a .java file which prefixes the 'pound' character with an
> 'A-circumflex' character (Â).  This happens consistently, despite using very
> minimal jsp content.
> 
> E.g. the following jsp code:
> 
> 
> 
> £
> 
> 
> 
> ... produces:
> 
> out.write("\r\n\r\n£\r\n\r\n\r\n");
> 
> Just in case it's relevant, I called jsp with the following parameters:
> 
> C:\Tomcat_Home\bin\jspc.bat -d C:\temp\jspctest -p jsp -webinc
> C:\temp\Jsp_Home\WEB-INF\theXML.xml -webapp C:\temp\Jsp_Home
> 
> Please help!
> 
> 
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>




jspc problem: precompilation inserts  character

2002-11-04 Thread Anthony Martin
Hi,

 I have hit a very interesting problem with precompilation of jsp files
using the jspc.bat which is distributed with Tomcat.

 In trying to precompile a jsp that includes the 'pound' character (£),
jspc.bat generates a .java file which prefixes the 'pound' character with an
'A-circumflex' character (Â).  This happens consistently, despite using very
minimal jsp content.

E.g. the following jsp code:



£



... produces: 

out.write("\r\n\r\n£\r\n\r\n\r\n");


Just in case it's relevant, I called jsp with the following parameters:

C:\Tomcat_Home\bin\jspc.bat -d C:\temp\jspctest -p jsp -webinc
C:\temp\Jsp_Home\WEB-INF\theXML.xml -webapp C:\temp\Jsp_Home


Please help!



This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>




RE: Precompilation

2002-08-19 Thread Rossen Raykov

Mark,

Try to use -webinc option and include generated web.xml in the application's
deployment descriptor.
This will map all the generated Java classes to the corresponding JSP URLs.

Regards,
Rossen

> -Original Message-
> From: Mark O'Driscoll [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 6:27 AM
> To: Tomcat Users List
> Subject: Precompilation
> 
> 
> Hi,
> 
> I currently recompile all my jsp's using jspc and update the 
> entries in
> web.xml as created by jspc.
> 
> This is fine but not quite what I want. One of the problems is that my
> default welcome page is index.jsp which, of course, is
> no longer there when the file is precompiled. I have got 
> around this by
> having a index.html that redirects after 0 secs to index.jsp.
> 
> Any solution to this?
> 
> I would like to be precompile so that all jsp go into
> localhost/work/fred$jsp.{java,class} as tomcat 
> does. Any easy
> way to do this?
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

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




Precompilation

2002-08-19 Thread Mark O'Driscoll

Hi,

I currently recompile all my jsp's using jspc and update the entries in
web.xml as created by jspc.

This is fine but not quite what I want. One of the problems is that my
default welcome page is index.jsp which, of course, is
no longer there when the file is precompiled. I have got around this by
having a index.html that redirects after 0 secs to index.jsp.

Any solution to this?

I would like to be precompile so that all jsp go into
localhost/work/fred$jsp.{java,class} as tomcat does. Any easy
way to do this?


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: JSP precompilation and including "webinc.xml" in web.xml

2002-08-13 Thread Kris Schneider

Al,

If it's of any use at this point, your setup should work under 4.1. I
did something very similar that worked with 4.1.8.

Al Tingley wrote:
> 
> Hello,
> We are trying to automate the pre-compilation of our JSP files with JspC and
> the inclusion of the generated "webinc.xml" file in our application
> "web.xml" file.  We have constructed an application web.xml as shown below.
> Both "web.xml" and "webinc.xml" are local to the
> .../webapps//WEB-INF/ directory.
> 
> Our problem is that Tomcat complains when starting up with the message:
>  org.xml.sax.SAXParseException: Relative URI "webinc.xml"; can not
> be resolved without a base URI.
> 
> Note the local reference to "webinc.xml" below in the DOCTYPE tag.
> 
> If we change the reference to "webinc.xml" to an absolute URI of the form
> below (on Windows):
> 
> file://E/jakarta-tomcat-4.0.4b3/webapps/appname/WEB-INF/webinc.xml
> 
> ... we get a null pointer exception when Tomcat starts up (parser error at
> the line where we reference the file to be included):
> 
> 2002-06-04 08:55:27 ContextConfig[/voicemail] Parse error in application
> web.xml
> java.lang.NullPointerException
> at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
> at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
> at
> org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
> at
> org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:314)
> ...
> 
> What are we doing wrong?  We're using Tomcat 4.0.4b3.
> Thanks,
> Alan Tingley
> Iperia, Inc.
> 
> ---
> The application web.xml file:
> 
> 
> 
>  PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> "http://java.sun.com/dtd/web-app_2_3.dtd";
> []
> >
> 
> 
> 
> &includes;
> 
> 
> ---
> Output when starting up Tomcat:
> 
> Starting service Tomcat-Standalone
> Apache Tomcat/4.0.4-b3
> PARSE error at line 6 column -1
> org.xml.sax.SAXParseException: Relative URI "webinc.xml"; can not be
> resolved without a base URI.
> 
> --
> To unsubscribe, e-mail:   
> For additional commands, e-mail: 

-- 
Kris Schneider 
D.O.Tech   


smime.p7s
Description: S/MIME Cryptographic Signature


Re: JSP precompilation and including "webinc.xml" in web.xml

2002-06-05 Thread David M. Karr

>>>>> "Al" == Al Tingley <[EMAIL PROTECTED]> writes:

Al> Hello,
Al> We are trying to automate the pre-compilation of our JSP files with JspC and
Al> the inclusion of the generated "webinc.xml" file in our application
Al> "web.xml" file.  We have constructed an application web.xml as shown below.
Al> Both "web.xml" and "webinc.xml" are local to the
Al> .../webapps//WEB-INF/ directory.

Al> Our problem is that Tomcat complains when starting up with the message:
Al>  org.xml.sax.SAXParseException: Relative URI "webinc.xml"; can not
Al> be resolved without a base URI.

    Al> Note the local reference to "webinc.xml" below in the DOCTYPE tag.

I got the complete precompilation process to work, but I gave up on trying to
reference the include file with an entity reference.  It just doesn't work.

What I was able to do was write an XSLT stylesheet that takes the main
"web.xml" and the generated include file and generates a new "web.xml" that
incorporates both files.  It uses the Ant "style" task to do the
transformation.

A slight wrinkle is that the generated include file is not a fully
"well-formed" XML file, in that it doesn't have a "root" element.  So, in order
for the XML parser (used by Ant) to grok it, I had to write a simple
well-formed wrapper that references the include file with an entity reference.
It's ironic that I'm using the same mechanism in this process that I gave up
with using inside of Tomcat.

I'll show all the pieces of my solution here.

This is the excerpt from my "build-war" Ant target related to this:

-
  
  
  
   
   



   
  
  
  
   <param name="includeFile" expression="includeWrapper.xml"/>
  
  
  
   



 

   
   
  
  
   

   
   


   
  
  
   


   
  
-

Following this is the "includeWrapper.xml" file, which references the generated
include file.  Note that I have to reference a path of "web-inf/webinc.xml",
which is the path to the generated file in my build tree (not my deploy tree).
I'm using Ant 1.4.  In Ant 1.5.1, there is apparently some new features in the
"style" task that allow the specification of an alternate EntityResolver that
would allow me to avoid hardcoding the name of the directory the file is in.

-

http://java.sun.com/dtd/web-app_2_3.dtd";
[

]
>

 &webinc;

-

And finally, here is the stylesheet (webmerge.xsl) that does the
transformation:

-

http://www.w3.org/1999/XSL/Transform";>

 

 http://java.sun.com/dtd/web-app_2_3.dtd"/>

 

 
 
   
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
   
 

 
   
 
   
 
   
   
 


-

-- 
===
David M. Karr  ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]


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




JSP precompilation and including "webinc.xml" in web.xml

2002-06-04 Thread Al Tingley

Hello,
We are trying to automate the pre-compilation of our JSP files with JspC and
the inclusion of the generated "webinc.xml" file in our application
"web.xml" file.  We have constructed an application web.xml as shown below.
Both "web.xml" and "webinc.xml" are local to the
.../webapps//WEB-INF/ directory.

Our problem is that Tomcat complains when starting up with the message:
 org.xml.sax.SAXParseException: Relative URI "webinc.xml"; can not
be resolved without a base URI.

Note the local reference to "webinc.xml" below in the DOCTYPE tag.

If we change the reference to "webinc.xml" to an absolute URI of the form
below (on Windows):

file://E/jakarta-tomcat-4.0.4b3/webapps/appname/WEB-INF/webinc.xml

... we get a null pointer exception when Tomcat starts up (parser error at
the line where we reference the file to be included):

2002-06-04 08:55:27 ContextConfig[/voicemail] Parse error in application
web.xml
java.lang.NullPointerException
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:524)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at
org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:314)
...

What are we doing wrong?  We're using Tomcat 4.0.4b3.
Thanks,
Alan Tingley
Iperia, Inc.

---
The application web.xml file:



http://java.sun.com/dtd/web-app_2_3.dtd";
[]
>



&includes;


---
Output when starting up Tomcat:

Starting service Tomcat-Standalone
Apache Tomcat/4.0.4-b3
PARSE error at line 6 column -1
org.xml.sax.SAXParseException: Relative URI "webinc.xml"; can not be
resolved without a base URI.


--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: jsp precompilation

2001-12-04 Thread Nikola Milutinovic

Laurent Michenaud wrote:

> Hi,
> 
> I'm searching a script ( bash-unix and/or bat-windows )
> that would :
> - generate java files from jsp


In Tomcat's ./bin dir there is "jasper.sh", this is how you invoke it:

${CATALINA_HOME}/bin/jasper.sh jspc MyPage.jsp

This will produce MyPage.java


> - compile generated java files


javac -classpath ${CATALINA_HOME}/common/lib/servlet.jar MyPage.java


> - compile servlet java files


javac MyServlet.java


> - create the .war


mv MyPage.class ${MY_WEB_APP_HOME}/WEB-INF/classes/path/to/my/package/
jar cf MyWebApp.war ${MY_WEB_APP_HOME}

Or be advanced - make a build.xml for Ant and do it that way.




--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




Re: jsp precompilation

2001-12-04 Thread Denis Balazuc

You might want to look at a mixture between JSPC (Tomcat) and Ant

>>I'm searching a script ( bash-unix and/or bat-windows )
You should then use Ant and create Ant tasks that you need (if you need to
write some...)


>>that would :

>>- generate java files from jsp
>> - compile generated java files
use JSPC (why not within Ant ? I don't remember if JSPC has a task on its
own but you can write one if it does not, or use a simple shell-command
task)

>> - compile servlet java files
Use Ant and the JDK you're working with

>>- create the .war

Definitely, you should use Ant ;-)

http://jakarta.apache.org/ant

Cheers
Denis



--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




jsp precompilation

2001-12-04 Thread Laurent Michenaud

Hi,

I'm searching a script ( bash-unix and/or bat-windows )
that would :
- generate java files from jsp
- compile generated java files
- compile servlet java files
- create the .war

It is no usefull that i do it if some of u has
already done it.

Michenaud Laurent
- Adeuza -
[ Développeur Web - Administrateur Réseau ]


--
To unsubscribe:   
For additional commands: 
Troubles with the list: 




jspc precompilation works in tomcat 3.2.3 but fails in tomcat-4.0-b7

2001-08-30 Thread Thomas Crook

I successfully ran the following command to precompile our struts-based 
application under tomcat 3.2.3:

 /opt/tomcat/bin/jspc.sh -webinc jspc.xml -webapp .

Can anyone give me suggstions as to why it fails like this when I 
attempt to run it under jakarta-tomcat-4.0-b7?
The non-precompiled app itself runs fine under 4.0-b7, but judging by 
the output ,jspc appears to not be finding the .tlds.


FAILED PRECOMPILATION OUTPUT UNDER TOMCAT 4.0-B7
=
/opt/tomcat/bin/jspc.sh -webinc jspc.xml -webapp .
Using CLASSPATH: 
:/opt/tomcat/classes:/opt/tomcat/lib/crimson.jar:/opt/tomcat/common/lib/servlet.jar:/opt/tomcat/lib/jasper-runtime.jar:/opt/tomcat/common/lib/servlet.jar:/opt/tomcat/lib/jaxp.jar:/opt/tomcat/common/lib/servlet.jar:/opt/tomcat/lib/namingfactory.jar:/opt/tomcat/common/lib/servlet.jar:/opt/tomcat/jasper/jasper-compiler.jar:/opt/tomcat/common/lib/servlet.jar
2001-08-31 05:39:09 - ERROR-the file '/analysis.jsp' generated the 
following general exception: java.lang.NullPointerException
java.lang.NullPointerException
at 
org.apache.jasper.CommandLineContext.getTldLocation(CommandLineContext.java:365)
at 
org.apache.jasper.compiler.JspParseEventListener.processTaglibDirective(JspParseEventListener.java:1146)
at 
org.apache.jasper.compiler.JspParseEventListener.handleDirective(JspParseEventListener.java:755)
at 
org.apache.jasper.compiler.DelegatingListener.handleDirective(DelegatingListener.java:121)
at org.apache.jasper.compiler.Parser$Directive.accept(Parser.java:243)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1126)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1091)
at org.apache.jasper.compiler.Parser.parse(Parser.java:1087)
at 
org.apache.jasper.compiler.ParserController.parse(ParserController.java:213)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:210)
at org.apache.jasper.JspC.parseFile(JspC.java:385)
at org.apache.jasper.JspC.parseFiles(JspC.java:651)
at org.apache.jasper.JspC.main(JspC.java:699)





Using Jspc for precompilation of JSPs

2000-12-13 Thread G.Nagarajan

Hi,

I am using JSPC for precompiling the jsp pages in my web applications. This
is to avoid the delay when the page gets
compiled for the first time. As far as I understood, jspc creates the .java
files in the specified directory after which we
have to compile them. The web.xml file has to modified to add the
servlet-mapping tag. A sample web.xml can be
obtained using the -webxml option.

I give the following command

jspc -d c:\tomcat\webapps\test\web-inf\classes -webxml web.xml  -webapp
c:\tomcat\webapps\test

The command creates the .java files in the c:\tomcat\webapps\web-inf\classes
and a sample web.xml in the current directory.

The web.xml file contains the servlet mappings like


Login
Login



\Login.jsp
Login


Now, when I try to access Login.jsp, tomcat ignores the above and creates a
_0002f...test.java file and executes it.
But when I change the web.xml to say, (with "/" instead of "\")


/Login.jsp
Login

it works properly.

Is there any option which will make the web.xml to have the "/" instead of
"\". I am using tomcat 3.2.1 on Windows NT .

Thanks
Nagaraj.