WG: Noclassdeffound when using jspc ant task

2005-12-16 Thread Linseisen Herbert
 
All I get when i try to run the jspc task of tomcat is --- in any
combination tomcat 4 to 5.5 -- what am i doing wrong?
 
I just   took the example build file of the tomcat documentation and
added my pathnames
 
 
Apache Ant version 1.6.2 compiled on July 16 2004
Buildfile: jspc2.ant
Detected Java version: 1.4 in: C:\jdk1.4.2\jre
Detected OS: Windows 2003
parsing buildfile C:\apache\Tomcat\bin\jspc2.ant with URI =
file:///C:/apache/Tomcat/bin/jspc2.ant
Project base dir set to: C:\apache\Tomcat\bin
Build sequence for target `all' is [jspc, compile, all]
Complete build sequence is [jspc, compile, all, ]
 
jspc:
  [jasper2] Error in class org.apache.jasper.JspC
 
C:\apache\Tomcat\bin\jspc2.ant:24: java.lang.NoClassDefFoundError:
javax/servlet/jsp/JspFactory
at
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:131)
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)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/jsp/JspFactory
at org.apache.jasper.JspC.initServletContext(JspC.java:1005)
at org.apache.jasper.JspC.execute(JspC.java:870)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123)
... 10 more
--- Nested Exception ---
java.lang.NoClassDefFoundError: javax/servlet/jsp/JspFactory
at org.apache.jasper.JspC.initServletContext(JspC.java:1005)
at org.apache.jasper.JspC.execute(JspC.java:870)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:123)
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)


AW: Noclassdeffound when using jspc ant task

2005-12-16 Thread Linseisen Herbert
I' tried to compile the jsp-examples of tomcat 5.0 with your ant-file --- but 
same result: noclassdeffound






  
  
  
  
  



























  





 


Grüße

Herbert Linseisen

Webasto AG
Herbert Linseisen
IT-Berater
Business Unit: Central Services C1.3.5 
Kraillinger Strasse 5
D-82131 Stockdorf
Tel.: +49 (89) 85794-1222 / Fax 899214-1222
www.webasto.de
[EMAIL PROTECTED]

CONFIDENTIALITY This e-mail and any attachments are confidential and may also 
be privileged. If you are not the named recipient, please notify the sender 
immediately and do not disclose the contents to another person, use it for any 
purpose, or store or copy the information in any medium



-Ursprüngliche Nachricht-
Von: Bernhard Slominski [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 16. Dezember 2005 11:12
An: 'Tomcat Users List'
Betreff: AW: Noclassdeffound when using jspc ant task

Do you have all your tomcat libs in your classpath?
You must have these 3 ind your path:
- ${tomcat.home}/bin
- ${tomcat.home}/server/lib
- ${tomcat.home}/common/lib
I send you my buildfile this works fine!


 





 
 
 
 
 
 
 
 
 
 

 



 


 













 
 
 
 














 


> -Ursprüngliche Nachricht-
> Von: Linseisen Herbert [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 16. Dezember 2005 10:59
> An: users@tomcat.apache.org
> Betreff: WG: Noclassdeffound when using jspc ant task
> 
> 
>  
> All I get when i try to run the jspc task of tomcat is --- in any
> combination tomcat 4 to 5.5 -- what am i doing wrong?
>  
> I just   took the example build file of the tomcat documentation and
> added my pathnames
>  
>  
> Apache Ant version 1.6.2 compiled on July 16 2004
> Buildfile: jspc2.ant
> Detected Java version: 1.4 in: C:\jdk1.4.2\jre
> Detected OS: Windows 2003
> parsing buildfile C:\apache\Tomcat\bin\jspc2.ant with URI =
> file:///C:/apache/Tomcat/bin/jspc2.ant
> Project base dir set to: C:\apache\Tomcat\bin
> Build sequence for target `all' is [jspc, compile, all]
> Complete build sequence is [jspc, compile, all, ]
>  
> jspc:
>   [jasper2] Error in class org.apache.jasper.JspC
>  
> C:\apache\Tomcat\bin\jspc2.ant:24: java.lang.NoClassDefFoundError:
> javax/servlet/jsp/JspFactory
> at
> org.apache.tools.ant.TaskAdapter.execute(TaskAdapter.java:131)
> 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)
>

AW: Noclassdeffound when using jspc ant task

2005-12-16 Thread Linseisen Herbert
 
Thanks for your help,

I found it out now --- due to the ANT_HOME setting in my environment i took the 
ant version 1.6.2.
After switching to ant 1.6.5 everithing works quite well 


Grüße

Herbert Linseisen


-Ursprüngliche Nachricht-
Von: Bernhard Slominski [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 16. Dezember 2005 13:56
An: 'Tomcat Users List'
Betreff: AW: Noclassdeffound when using jspc ant task

Your classpath must be wrong, try to add some debug stuff to see you
classpath.
The jar file that's missing is: ${tomcat.home}\common\lib\jsp-api.jar
For testing you can also copy all libs in one directory to see if that
helps.

Bernhard

> -Ursprüngliche Nachricht-
> Von: Linseisen Herbert [mailto:[EMAIL PROTECTED]
> Gesendet: Freitag, 16. Dezember 2005 12:38
> An: Tomcat Users List
> Betreff: AW: Noclassdeffound when using jspc ant task
> 
> 
> I' tried to compile the jsp-examples of tomcat 5.0 with your 
> ant-file --- but same result: noclassdeffound
> 
> 
> 
> 
> 
> 
>   
>   
>value="C:\apache\Tomcat\webapps\jsp-examples" />
>   
>   
> 
> 
>   
> 
>   
>name="jasper2" >
> 
>   
>location="${java.home}/../lib/tools.jar"/>
>   
>   
>   
>dir="${tomcat.home}/server/lib">
>   
>   
>dir="${tomcat.home}/common/lib">
>   
>   
> 
> dir="${webapproot}${webappname}/WEB-INF/lib">
>   
>   
> 
>   
>   
> 
>   
>  validateXml="false"
>   uriroot="${webapproot}${webappname}"
> 
> webXmlFragment="${webapproot}${webappname}/WEB-INF/generated_web.xml"
>   outputDir="${webapproot}/src" />
>   
> 
> 
> 
> 
> 
>  
> 
> 
> Grüße
> 
> Herbert Linseisen
> 
> Webasto AG
> Herbert Linseisen
> IT-Berater
> Business Unit: Central Services C1.3.5 
> Kraillinger Strasse 5
> D-82131 Stockdorf
> Tel.: +49 (89) 85794-1222 / Fax 899214-1222
> www.webasto.de
> [EMAIL PROTECTED]
> 
> CONFIDENTIALITY This e-mail and any attachments are 
> confidential and may also be privileged. If you are not the 
> named recipient, please notify the sender immediately and do 
> not disclose the contents to another person, use it for any 
> purpose, or store or copy the information in any medium
> 
> 
> 
> -Ursprüngliche Nachricht-
> Von: Bernhard Slominski [mailto:[EMAIL PROTECTED] 
> Gesendet: Freitag, 16. Dezember 2005 11:12
> An: 'Tomcat Users List'
> Betreff: AW: Noclassdeffound when using jspc ant task
> 
> Do you have all your tomcat libs in your classpath?
> You must have these 3 ind your path:
> - ${tomcat.home}/bin
> - ${tomcat.home}/server/lib
> - ${tomcat.home}/common/lib
> I send you my buildfile this works fine!
> 
> 
>
>   
> 
>   
>name="jasper2" >
> 
>
>location="${java.home}/../lib/tools.jar"/> 
>
>
>
>dir="${tomcat.home}/server/lib"> 
>
>
>dir="${tomcat.home}/common/lib"> 
>
>   
>dir="${webapproot}${webappname}/WEB-INF/lib"> 
>   
>   
>   
>
> 
>   
>  validateXml="false" 
>   uriroot="${webapproot}${webappname}" 
>  
> webXmlFragment="${webapproot}${webappname}/WEB-INF/generated_web.xml" 
>   outputDir="${webapproot}/src" /> 
> 
>   

apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?

2006-03-21 Thread Xin Herbert Wu
Hi, All,
I am new to Apache2.0/Jboss4.0.3-Tomcat5.5 integration. After looking over
apache/tomcat docs, I am still stuck with this problem:

(1) Assume I have a web app called mywebapp.war and I deployed it to the
jboss server(http1.1 connector listens on port 8080). I can access this web
app with the URL http://localhost:8080/mywebapp/index.html (easy for
development)
(2) Now I want to add the apache server(assuming on port 80) as the
front-end to access mywebapp.war with shorter url
http://localhost:80/index.html (nice for production)

So I tried to configure apache server so that it can automatically prepend
the context path "/mywebapp" to the request and then relay it to
jboss/tomcat server either via ajp13(such as on port 8009) or directly to
http port 8080. 
But I did not find out on how to do it or maybe I am heading in wrong
direction...

What's the proper way to configure apache and/or mod_jk so that both (1) and
(2) are valid ways to access the given webapp?

Thanks a lot for your help!

-Xin



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



RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?

2006-03-21 Thread Xin Herbert Wu
Do you mean I comment out 
 ...
Entry in tomcat server.xml?
Basically I want it for a bit convenience in development without using
apache. I could remove if it is only way to do it. 

If I do remove it, do I have to use virtual host if the tomcat container
contains multiple webapps so that each of these webapps can accept request
from different apache servers?

Thanks!

-Xin 

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 11:19 AM
To: Tomcat Users List
Subject: RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp:
context path prepend ?

> From: Xin Herbert Wu [mailto:[EMAIL PROTECTED] 
> Subject: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 
> webapp: context path prepend ?
> 
> What's the proper way to configure apache and/or mod_jk so 
> that both (1) and (2) are valid ways to access the given webapp?

The easiest way is just remove httpd.  Why do you think you need it?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
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: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?

2006-03-21 Thread Xin Herbert Wu
Oh, I do not think so. Public request must come from apache. We run Jboss
cluster and mod_jk is the load balancer. 

For each node in the cluster, there will be several webapps deployed. 
The typical request flow would be apache-1 server is response for
www.web1.com and routes traffic to webapp1.war deployed in the cluster, and 
Apache-2 server is response for www.web2.com and routes traffic to
webapp2.war. For each node in the cluster, webapp1.war and webapp2.war are
both deployed. 

I looked over virtual host in Jboss/Tomcat and it allows me to manipulate
context path, but I am wondering if I can do it on Apache server end. 

-Xin

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 11:59 AM
To: Tomcat Users List
Subject: RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp:
context path prepend ?

> From: Xin Herbert Wu [mailto:[EMAIL PROTECTED] 
> Subject: RE: apache(v2.0) front-end to 
> jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?
> 
> Do you mean I comment out 
>  ...
> Entry in tomcat server.xml?

No, you change the port number to 80.  Just eliminate httpd from the
environment - you haven't stated any reason why you think you need it.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
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: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?

2006-03-21 Thread Xin Herbert Wu
Never think about filter forwarding. It definitely should work.
Thanks!!
-Xin

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, March 21, 2006 4:52 PM
To: Tomcat Users List
Subject: RE: apache(v2.0) front-end to jboss(v4.0.3)/tomcat5.5 webapp:
context path prepend ?

> From: Xin Herbert Wu [mailto:[EMAIL PROTECTED] 
> Subject: RE: apache(v2.0) front-end to 
> jboss(v4.0.3)/tomcat5.5 webapp: context path prepend ?
> 
> Oh, I do not think so. Public request must come from apache. 
> We run Jboss cluster and mod_jk is the load balancer. 

O.k., that's a very valid reason.  When you're using mod_jk, the
requests to Tomcat come in through the AJP connector, not the HTTP one.
You should be able to use a filter in the default webapp to forward
requests to the desired context.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

-
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]