Re: 2ND TRY: Developing ASP applications with tomcat

2002-11-20 Thread Giovanni Cuccu
At 23:59 19/11/2002 -0800, you wrote:
thanks for the response, but the load occurs in library that I cannot modify.
my problem is how to share some classes including servlets and deploying 
only the jsp part.
For example consider a forum application
the logic, including servlets is in a jar (i.e forum.jar) and the jsp in 
each context.
If I have multiple customers can I create multiple contexts on the same 
instance or should I startup a different
tomcat instance for each customer?

the problem I'm facing is that a class put in the shared lib cannot load 
via classpath a resource file under WEB-INF. returning to the forum 
example, if the class in the jar try to load a property file for reading 
the configuration it fails since the file is under WEB-INF. Is this correct 
or am I missing something?

thanks
Giovanni


If you're loading classes, then try using

Thread.currentThread().getContextClassLoader().loadClass(myClass);

Use this in the classes that you wish to place in the shared/lib.

--Sriram

--- Giovanni Cuccu [EMAIL PROTECTED] wrote:
 Hi all,
  I'm developing an application which will be release in
 ASP(application service provider) mode, i.e. different customers will use
 the same appserver and database to do their actions.
 On the DB I'm already ok, but on the appserver I'm in trouble. The first
 model I'm trying to implement is one application server instance with
 different contexts, one for each customer. What I'd like to do is deploy
 the jsp under each customer context, but deploy the servlets and business
 objects to the shared\lib directory since they are always the same. the
 problem I'm facing is classloaders sequence, since in the shared\lib I 
have
 a class which loads a configuration file using the classloader(it is a 
3rdy
 part library and I cannot modify it), but the configuration file is under
 WEB-INF since is specific for each customer.
 If I try to put all the classes under WEB-INF I got a ClassCastException
 when loading a class form a context and this class is already loaded from
 another context. I read the classloader howto in order to understand how
 classes are loaded and if I have well understood the document there is no
 way to achieve what I want.
 Can anyone help me?
 I've already set up multiple tomcat instances using different
 CATALINA_BASE, but that's not what I want in this phase of the project.
 thanks in advance
  Giovanni


 
 Giovanni Cuccu
 Sw [EMAIL PROTECTED]
 Dianoema S.p.A.
 Via de' Carracci 93 40131 Bologna
 Tel: 051-4193911
 e-mail:[EMAIL PROTECTED]
 




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



__
Do you Yahoo!?
Yahoo! Web Hosting - Let the expert host your site
http://webhosting.yahoo.com

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



Giovanni Cuccu
Sw [EMAIL PROTECTED]
Dianoema S.p.A.
Via de' Carracci 93 40131 Bologna
Tel: 051-4193911
e-mail:[EMAIL PROTECTED]





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




RE: 2ND TRY: Developing ASP applications with tomcat

2002-11-20 Thread Giovanni Cuccu
At 07:47 20/11/2002 -0500, you wrote:
John, thanks for the response


My advice would be use a separate tomcat instance for every customer, for
one very simple reason:  if the forums for customer A hang for whatever
reason, you would be able to restart their Tomcat instance, and only their
Tomcat instance.  In your scenario, customers B, C, and D would also be
restarted, losing their sessions and anything in progress.  If customer B
happens to be making a big change to a database at the time, they would be
screwed.


yes it's true, but if I use different contexts I can reload each context 
with no problem.
I agree about issues on consumption of shared resource such as memory, 
file/socket descriptor.


Yes, from an academic standpoint it makes sense to try and use the same JAR
file for every customer or site, but in practice that isn't always the best
way to go if the big picture is considered.  Since customers in an ASP
scenario pay for disk space, the cost to you for having multiple JAR files
is zero.  In addition, you may run into situations in the future where
customer A pays for a version upgrade of some software (requiring a new JAR
file) but customer B does not.  How would you handle that if they shared the
same JAR?

John


I agree with you, but consider a lot of little customers with low traffic 
(in the example 50 message forum/DAY) I believe using a jvm for each of 
these could be a waste of resources. About the question of version update 
an ASP application can have updates included in the annual fee, and for 
reducing internal costs all customers should have the same software version 
(I believe this is recommended if you want make ASP model profitable).

What it's still unclear to me is if: is it possible to share the same jar 
between contexts (with the restrictions of the classpath I explained before 
(I think the answer is  negative but I'd like to have a confirm on this))?

thanks in advance
Giovanni


 -Original Message-
 From: Giovanni Cuccu [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 20, 2002 3:16 AM
 To: Tomcat Users List
 Subject: Re: 2ND TRY: Developing ASP applications with tomcat


 At 23:59 19/11/2002 -0800, you wrote:
 thanks for the response, but the load occurs in library that
 I cannot modify.
 my problem is how to share some classes including servlets
 and deploying
 only the jsp part.
 For example consider a forum application
 the logic, including servlets is in a jar (i.e forum.jar) and
 the jsp in
 each context.
 If I have multiple customers can I create multiple contexts
 on the same
 instance or should I startup a different
 tomcat instance for each customer?

 the problem I'm facing is that a class put in the shared lib
 cannot load
 via classpath a resource file under WEB-INF. returning to the forum
 example, if the class in the jar try to load a property file
 for reading
 the configuration it fails since the file is under WEB-INF.
 Is this correct
 or am I missing something?

 thanks
  Giovanni


 If you're loading classes, then try using
 
 Thread.currentThread().getContextClassLoader().loadClass(myClass);
 
 Use this in the classes that you wish to place in the shared/lib.
 
 --Sriram
 
 --- Giovanni Cuccu [EMAIL PROTECTED] wrote:
   Hi all,
I'm developing an application which will be release in
   ASP(application service provider) mode, i.e. different
 customers will use
   the same appserver and database to do their actions.
   On the DB I'm already ok, but on the appserver I'm in
 trouble. The first
   model I'm trying to implement is one application server
 instance with
   different contexts, one for each customer. What I'd like
 to do is deploy
   the jsp under each customer context, but deploy the
 servlets and business
   objects to the shared\lib directory since they are always
 the same. the
   problem I'm facing is classloaders sequence, since in the
 shared\lib I
  have
   a class which loads a configuration file using the
 classloader(it is a
  3rdy
   part library and I cannot modify it), but the
 configuration file is under
   WEB-INF since is specific for each customer.
   If I try to put all the classes under WEB-INF I got a
 ClassCastException
   when loading a class form a context and this class is
 already loaded from
   another context. I read the classloader howto in order to
 understand how
   classes are loaded and if I have well understood the
 document there is no
   way to achieve what I want.
   Can anyone help me?
   I've already set up multiple tomcat instances using different
   CATALINA_BASE, but that's not what I want in this phase
 of the project.
   thanks in advance
Giovanni
  
  
   
   Giovanni Cuccu
   Sw [EMAIL PROTECTED]
   Dianoema S.p.A.
   Via de' Carracci 93 40131 Bologna
   Tel: 051-4193911
   e-mail:[EMAIL PROTECTED]
   
  
  
  
  
   --
   To unsubscribe,
  e-mail:   mailto

RE: 2ND TRY: Developing ASP applications with tomcat

2002-11-20 Thread Giovanni Cuccu
At 08:54 20/11/2002 -0500, you wrote:


To each, his own.  There's no such thing as waste of resources in a
service business...clients and customers pay for what they get.  If they
need 256MB RAM for the JVM, they pay for it.

I'm responsible for an ASP system right now...there are 17 (going on 21)
customers.  Each has their own Tomcat instance.  I can't imagine handling it
any other way...a proper service-oriented ASP must be open to customizations
per client.  For example, each of my clients demands their own logo, their
own color scheme, and their own workflow.  Even if the core of the system is
the same, each client is different enough that over time their individual
needs get farther and farther apart.  I guess if you ramrod them and tell
them they can only have it one way, your way, take it or leave it, you can
get away with one for all, but that's not something I am willing to do.  We
make lots more money catering to their specific requests.  Maybe its the
difference between mass market and niche.

John


I agree with you about allowing different lookfeel and workflow and about 
the fact that the customer pays for the resources that needs. But in my 
case workflow and look and feel will stored in each customer context 
allowing a high degree of flexibility. Personally I don't completely agree 
with you about customizations in term of product functionalities, that must 
be the same in order to reduce maintenance costs. Think of a product where 
you have one or at least two versions, instead of one for each customer, it 
will have lower administrative costs (and some drawbacks, I admit). Since 
I'm still evaluating the ASP model perhaps I have unrealistic expectations, 
but  I think my ASP model could be possible in a mass market. Moreover if I 
develop an application using this ASP model I can shift to your without 
problems.
Giovanni


 -Original Message-
 From: Giovanni Cuccu [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 20, 2002 8:38 AM
 To: Tomcat Users List
 Subject: RE: 2ND TRY: Developing ASP applications with tomcat


 At 07:47 20/11/2002 -0500, you wrote:
 John, thanks for the response

 My advice would be use a separate tomcat instance for every
 customer, for
 one very simple reason:  if the forums for customer A hang
 for whatever
 reason, you would be able to restart their Tomcat instance,
 and only their
 Tomcat instance.  In your scenario, customers B, C, and D
 would also be
 restarted, losing their sessions and anything in progress.
 If customer B
 happens to be making a big change to a database at the time,
 they would be
 screwed.

 yes it's true, but if I use different contexts I can reload
 each context
 with no problem.
 I agree about issues on consumption of shared resource such
 as memory,
 file/socket descriptor.


 Yes, from an academic standpoint it makes sense to try and
 use the same JAR
 file for every customer or site, but in practice that isn't
 always the best
 way to go if the big picture is considered.  Since customers
 in an ASP
 scenario pay for disk space, the cost to you for having
 multiple JAR files
 is zero.  In addition, you may run into situations in the
 future where
 customer A pays for a version upgrade of some software
 (requiring a new JAR
 file) but customer B does not.  How would you handle that if
 they shared the
 same JAR?
 
 John

 I agree with you, but consider a lot of little customers with
 low traffic
 (in the example 50 message forum/DAY) I believe using a jvm
 for each of
 these could be a waste of resources. About the question of
 version update
 an ASP application can have updates included in the annual
 fee, and for
 reducing internal costs all customers should have the same
 software version
 (I believe this is recommended if you want make ASP model profitable).

 What it's still unclear to me is if: is it possible to share
 the same jar
 between contexts (with the restrictions of the classpath I
 explained before
 (I think the answer is  negative but I'd like to have a
 confirm on this))?

 thanks in advance
  Giovanni


   -Original Message-
   From: Giovanni Cuccu [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, November 20, 2002 3:16 AM
   To: Tomcat Users List
   Subject: Re: 2ND TRY: Developing ASP applications with tomcat
  
  
   At 23:59 19/11/2002 -0800, you wrote:
   thanks for the response, but the load occurs in library that
   I cannot modify.
   my problem is how to share some classes including servlets
   and deploying
   only the jsp part.
   For example consider a forum application
   the logic, including servlets is in a jar (i.e forum.jar) and
   the jsp in
   each context.
   If I have multiple customers can I create multiple contexts
   on the same
   instance or should I startup a different
   tomcat instance for each customer?
  
   the problem I'm facing is that a class put in the shared lib
   cannot load
   via classpath a resource file under WEB-INF. returning to
 the forum

RE: 2ND TRY: Developing ASP applications with tomcat

2002-11-20 Thread Giovanni Cuccu
At 09:07 20/11/2002 -0500, you wrote:


You can share a JAR across Contexts.

From the ClassLoader HOWTO
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

Shared - This class loader is the place to put classes and resources that
you wish to share across ALL web applications (unless Tomcat internal
classes also need access, in which case you should put them in the Common
class loader instead).

John



Yes I read that doc, I have the jar in $TOMCAT_HOME\shared\lib, BUT (there 
is always a but) some classes in the jar try to load a file (which 
configures the customer application) using classpath, and  here I run into 
troubles since the file is under WEB-INF. I'm trying to overcome this 
situation changing the software (but it's an external library), but I'd 
like to know if there is a solution simply placing jar file and 
configuration files in 'strategic' directories.
Giovanni

 -Original Message-
 From: Giovanni Cuccu [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 20, 2002 8:38 AM
 To: Tomcat Users List
 Subject: RE: 2ND TRY: Developing ASP applications with tomcat


 At 07:47 20/11/2002 -0500, you wrote:
 John, thanks for the response

 My advice would be use a separate tomcat instance for every
 customer, for
 one very simple reason:  if the forums for customer A hang
 for whatever
 reason, you would be able to restart their Tomcat instance,
 and only their
 Tomcat instance.  In your scenario, customers B, C, and D
 would also be
 restarted, losing their sessions and anything in progress.
 If customer B
 happens to be making a big change to a database at the time,
 they would be
 screwed.

 yes it's true, but if I use different contexts I can reload
 each context
 with no problem.
 I agree about issues on consumption of shared resource such
 as memory,
 file/socket descriptor.


 Yes, from an academic standpoint it makes sense to try and
 use the same JAR
 file for every customer or site, but in practice that isn't
 always the best
 way to go if the big picture is considered.  Since customers
 in an ASP
 scenario pay for disk space, the cost to you for having
 multiple JAR files
 is zero.  In addition, you may run into situations in the
 future where
 customer A pays for a version upgrade of some software
 (requiring a new JAR
 file) but customer B does not.  How would you handle that if
 they shared the
 same JAR?
 
 John

 I agree with you, but consider a lot of little customers with
 low traffic
 (in the example 50 message forum/DAY) I believe using a jvm
 for each of
 these could be a waste of resources. About the question of
 version update
 an ASP application can have updates included in the annual
 fee, and for
 reducing internal costs all customers should have the same
 software version
 (I believe this is recommended if you want make ASP model profitable).

 What it's still unclear to me is if: is it possible to share
 the same jar
 between contexts (with the restrictions of the classpath I
 explained before
 (I think the answer is  negative but I'd like to have a
 confirm on this))?

 thanks in advance
  Giovanni


   -Original Message-
   From: Giovanni Cuccu [mailto:[EMAIL PROTECTED]]
   Sent: Wednesday, November 20, 2002 3:16 AM
   To: Tomcat Users List
   Subject: Re: 2ND TRY: Developing ASP applications with tomcat
  
  
   At 23:59 19/11/2002 -0800, you wrote:
   thanks for the response, but the load occurs in library that
   I cannot modify.
   my problem is how to share some classes including servlets
   and deploying
   only the jsp part.
   For example consider a forum application
   the logic, including servlets is in a jar (i.e forum.jar) and
   the jsp in
   each context.
   If I have multiple customers can I create multiple contexts
   on the same
   instance or should I startup a different
   tomcat instance for each customer?
  
   the problem I'm facing is that a class put in the shared lib
   cannot load
   via classpath a resource file under WEB-INF. returning to
 the forum
   example, if the class in the jar try to load a property file
   for reading
   the configuration it fails since the file is under WEB-INF.
   Is this correct
   or am I missing something?
  
   thanks
Giovanni
  
  
   If you're loading classes, then try using
   
  
 Thread.currentThread().getContextClassLoader().loadClass(myClass);
   
   Use this in the classes that you wish to place in the shared/lib.
   
   --Sriram
   
   --- Giovanni Cuccu [EMAIL PROTECTED] wrote:
 Hi all,
  I'm developing an application which will be
 release in
 ASP(application service provider) mode, i.e. different
   customers will use
 the same appserver and database to do their actions.
 On the DB I'm already ok, but on the appserver I'm in
   trouble. The first
 model I'm trying to implement is one application server
   instance with
 different contexts, one for each customer. What I'd like
   to do is deploy

Re: 2ND TRY: Developing ASP applications with tomcat

2002-11-20 Thread Giovanni Cuccu
At 15:39 20/11/2002 +0100, you wrote:

.

The rule of thumb is that no class in shared/lib will be able to see any
class from your webapps. Well, unless you
use Thread.getCurrentThread().getContextClassLoader() to load the class,
of course.
If you use getContextClassLoader().loadClass(), you will have to deal with
the reflection api. This make things harder to program and also a bit
slower.

Rodrigo,
can you give more details about this (articles on the web, code snippets,etc)?
Thanks in advance,
Giovanni



Giovanni Cuccu
Sw [EMAIL PROTECTED]
Dianoema S.p.A.
Via de' Carracci 93 40131 Bologna
Tel: 051-4193911
e-mail:[EMAIL PROTECTED]





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




Developing ASP applications with tomcat

2002-11-19 Thread Giovanni Cuccu
Hi all,
I'm developing an application which will be release in 
ASP(application service provider) mode, i.e. different customers will use 
the same appserver and database to do their actions.
On the DB I'm already ok, but on the appserver I'm in trouble. The first 
model I'm trying to implement is one application server instance with 
different contexts, one for each customer. What I'd like to do is deploy 
the jsp under each customer context, but deploy the servlets and business 
objects to the shared\lib directory since they are always the same. the 
problem I'm facing is classloaders sequence, since in the shared\lib I have 
a class which loads a configuration file using the classloader(it is a 3rdy 
part library and I cannot modify it), but the configuration file is under 
WEB-INF since is specific for each customer.
If I try to put all the classes under WEB-INF I got a ClassCastException 
when loading a class form a context and this class is already loaded from 
another context. I read the classloader howto in order to understand how 
classes are loaded and if I have well understood the document there is no 
way to achieve what I want.
Can anyone help me?
I've already set up multiple tomcat instances using different 
CATALINA_BASE, but that's not what I want in this phase of the project.
thanks in advance
Giovanni



Giovanni Cuccu
Sw [EMAIL PROTECTED]
Dianoema S.p.A.
Via de' Carracci 93 40131 Bologna
Tel: 051-4193911
e-mail:[EMAIL PROTECTED]





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



2ND TRY: Developing ASP applications with tomcat

2002-11-19 Thread Giovanni Cuccu
Hi all,
I'm developing an application which will be release in 
ASP(application service provider) mode, i.e. different customers will use 
the same appserver and database to do their actions.
On the DB I'm already ok, but on the appserver I'm in trouble. The first 
model I'm trying to implement is one application server instance with 
different contexts, one for each customer. What I'd like to do is deploy 
the jsp under each customer context, but deploy the servlets and business 
objects to the shared\lib directory since they are always the same. the 
problem I'm facing is classloaders sequence, since in the shared\lib I have 
a class which loads a configuration file using the classloader(it is a 3rdy 
part library and I cannot modify it), but the configuration file is under 
WEB-INF since is specific for each customer.
If I try to put all the classes under WEB-INF I got a ClassCastException 
when loading a class form a context and this class is already loaded from 
another context. I read the classloader howto in order to understand how 
classes are loaded and if I have well understood the document there is no 
way to achieve what I want.
Can anyone help me?
I've already set up multiple tomcat instances using different 
CATALINA_BASE, but that's not what I want in this phase of the project.
thanks in advance
Giovanni



Giovanni Cuccu
Sw [EMAIL PROTECTED]
Dianoema S.p.A.
Via de' Carracci 93 40131 Bologna
Tel: 051-4193911
e-mail:[EMAIL PROTECTED]





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



Re: Configuring tomcat 4.1.10 for working with both http and https

2002-09-10 Thread Giovanni Cuccu

At 18:19 09/09/2002 +0200, you wrote:
I found that if I use the old connector (JK) all works well. It seems like 
the jk2 connector (which is much faster than its predecessor) still need 
some testing before going really usable.
Giovanni
Hi all,
 I have just downloaded tomcat 4.1.10 and replaced tomcat 4.0.4
in the previous version I had a site working with both http and https.
Now I switched to the jk2 connector and I have this problem
the jk2 connector can't works with https and  http together.
In the server.xml i had to put the attribute scheme to https in order to 
work with https but if I try to get the same site with http I get the fist 
manually digited page in http but if I submit a form with a relative url 
(/context/servlet) as a target the response switches over https
here is a scheme
jsp page---(submit to a servlet)--servlet(redirecting with relative 
url)---other jsp page
httphttp--https
 
(switch made automatically)
the same happens if the scheme is set to http and I'd like to see the site 
in https mode (in this case the switch is from htts to http)
can I avoid this situation?
In tomcat 4.0.4 all worked as I expected.
here is my tomcat 4.1.10 server.xml
...
  Service name=Tomcat-ApacheSSL

 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=8009 minProcessors=5 maxProcessors=75
  enableLookups=true appBase=webapps scheme=https
  acceptCount=10 debug=0 
 protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler /

 Engine className=org.apache.catalina.core.StandardEngine
  name=Apache debug=0 defaultHost=giovanni
  Host name=giovanni debug=0 appBase=webapps unpackWARs=true
 Listener 
 className=org.apache.ajp.tomcat4.config.ApacheConfig append=true /
  /Host
  !-- Global logger unless overridden at lower levels --
  Logger className=org.apache.catalina.logger.FileLogger
   prefix=apache_log. suffix=.txt
   timestamp=true/

 /Engine

   /Service
...
and here is the tomcat 4.0.4 one

   Service name=Tomcat-Apache

 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=8009 minProcessors=5 maxProcessors=75
acceptCount=10 debug=0 secure=true /

 !--Connector 
 className=org.apache.catalina.connector.warp.WarpConnector
  port=8008 minProcessors=5 maxProcessors=75
  enableLookups=true appBase=webapps
  acceptCount=10 debug=0/--

 !-- Replace localhost with what your Apache ServerName is set to --
 Engine className=org.apache.catalina.core.StandardEngine
  name=Apache debug=0
  Host name=giovanni debug=0 appBase=webapps unpackWARs=true
 Listener 
 className=org.apache.ajp.tomcat4.config.ApacheConfig append=true /
 !--Context path=/Portal docBase=Portal  debug=0 /--
  /Host
   !-- Global logger unless overridden at lower levels --
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=apache_log. suffix=.txt
   timestamp=true/

   !-- Because this Realm is here, an instance will be shared 
 globally --
   Realm className=org.apache.catalina.realm.MemoryRealm /

 /Engine

   /Service

thanks in advance,
Giovanni



Giovanni Cuccu
Sw [EMAIL PROTECTED]
Dianoema S.p.A.
Via de' Carracci 93 40131 Bologna
Tel: 051-4193911
e-mail:[EMAIL PROTECTED]





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






Giovanni Cuccu
Sw [EMAIL PROTECTED]
Dianoema S.p.A.
Via de' Carracci 93 40131 Bologna
Tel: 051-4193911
e-mail:[EMAIL PROTECTED]





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




Re: creating scripting variables with TagExtraInfo

2002-09-10 Thread Giovanni Cuccu

At 14:54 10/09/2002 +0200, you wrote:
try
out.print( ciao );

Giovanni
hi all,
i have a problem with tag libraries tomcat 4.1.10. i'm trying to define a
scripting variable using TagExtraInfo, but jasper2 cannot compile my jsp and
gives this error:

---
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 4 in the jsp file: /webinfo.jsp

Generated servlet error:
 [javac] Compiling 1 source file
C:\java\jakarta-tomcat-4.1.10-LE-jdk14\work\Standalone\localhost\xaura\webin
fo_jsp.java:71: cannot resolve symbol
symbol  : variable ciao
location: class org.apache.jsp.webinfo_jsp
   out.print( ciao );
  ^
1 error
---

here's the jsp:
---
%@ taglib uri=http://www.tiscali.com/webinfo/taglib; prefix=webinfo %

webinfo:string id=ciao xpath=website/section[1]/@name/
%= ciao %
---

here's the tag definition in the TLD:
---
 tag
 namestring/name

tagclasscom.tiscali.xaura.frontend.webinfo.taglib.StringTag/tagclass

teiclasscom.tiscali.xaura.frontend.webinfo.taglib.StringTei/teiclass
 attribute
 nameid/name
 requiredfalse/required
 rtexprvaluefalse/rtexprvalue
 /attribute
 attribute
 namexpath/name
 requiredtrue/required
 rtexprvaluetrue/rtexprvalue
 /attribute
 /tag
---

in the tag handler i set the pageContext attribute:
---

public int doStartTag() throws JspException {
[...]
pageContext.setAttribute(id, data);
[...]
}
---

in the TagExtraInfo class:
---
 public VariableInfo[] getVariableInfo(TagData data) {

 String id = data.getId();
 if (id != null) {
 logger.debug(id;  + id);
 String classname = getClassName();
 VariableInfo vi = new VariableInfo(id, classname, true,
VariableInfo.AT_END);
 VariableInfo[] info = {vi};
 return info;
 } else {
 logger.debug(id is null);
 return null;
 }

 }
---

Am I missing something???

flavio tordini







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



Giovanni Cuccu
Sw [EMAIL PROTECTED]
Dianoema S.p.A.
Via de' Carracci 93 40131 Bologna
Tel: 051-4193911
e-mail:[EMAIL PROTECTED]





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




Configuring tomcat 4.1.10 for working with both http and https

2002-09-09 Thread Giovanni Cuccu

Hi all,
 I have just downloaded tomcat 4.1.10 and replaced tomcat 4.0.4
in the previous version I had a site working with both http and https.
Now I switched to the jk2 connector and I have this problem
the jk2 connector can't works with https and  http together.
In the server.xml i had to put the attribute scheme to https in order to 
work with https but if I try to get the same site with http I get the fist 
manually digited page in http but if I submit a form with a relative url 
(/context/servlet) as a target the response switches over https
here is a scheme
jsp page---(submit to a servlet)--servlet(redirecting with relative 
url)---other jsp page
httphttp--https
 
(switch made automatically)
the same happens if the scheme is set to http and I'd like to see the site 
in https mode (in this case the switch is from htts to http)
can I avoid this situation?
In tomcat 4.0.4 all worked as I expected.
here is my tomcat 4.1.10 server.xml
...
  Service name=Tomcat-ApacheSSL

 Connector className=org.apache.coyote.tomcat4.CoyoteConnector
  port=8009 minProcessors=5 maxProcessors=75
  enableLookups=true appBase=webapps scheme=https
  acceptCount=10 debug=0 
protocolHandlerClassName=org.apache.jk.server.JkCoyoteHandler /

 Engine className=org.apache.catalina.core.StandardEngine
  name=Apache debug=0 defaultHost=giovanni
  Host name=giovanni debug=0 appBase=webapps unpackWARs=true
 Listener 
className=org.apache.ajp.tomcat4.config.ApacheConfig append=true /
  /Host
  !-- Global logger unless overridden at lower levels --
  Logger className=org.apache.catalina.logger.FileLogger
   prefix=apache_log. suffix=.txt
   timestamp=true/

 /Engine

   /Service
...
and here is the tomcat 4.0.4 one

   Service name=Tomcat-Apache

 !-- Define an AJP 1.3 Connector on port 8009 --
 Connector className=org.apache.ajp.tomcat4.Ajp13Connector
port=8009 minProcessors=5 maxProcessors=75
acceptCount=10 debug=0 secure=true /

 !--Connector 
className=org.apache.catalina.connector.warp.WarpConnector
  port=8008 minProcessors=5 maxProcessors=75
  enableLookups=true appBase=webapps
  acceptCount=10 debug=0/--

 !-- Replace localhost with what your Apache ServerName is set to --
 Engine className=org.apache.catalina.core.StandardEngine
  name=Apache debug=0
  Host name=giovanni debug=0 appBase=webapps unpackWARs=true
 Listener 
className=org.apache.ajp.tomcat4.config.ApacheConfig append=true /
 !--Context path=/Portal docBase=Portal  debug=0 /--
  /Host
   !-- Global logger unless overridden at lower levels --
   Logger className=org.apache.catalina.logger.FileLogger
   prefix=apache_log. suffix=.txt
   timestamp=true/

   !-- Because this Realm is here, an instance will be shared globally --
   Realm className=org.apache.catalina.realm.MemoryRealm /

 /Engine

   /Service

thanks in advance,
Giovanni



Giovanni Cuccu
Sw [EMAIL PROTECTED]
Dianoema S.p.A.
Via de' Carracci 93 40131 Bologna
Tel: 051-4193911
e-mail:[EMAIL PROTECTED]





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




2 problems with TC 4.01

2001-12-28 Thread Giovanni Cuccu

hi,
 I have two distinct problems with Tomcat 4.01 running with apache 
1.3.14 with warp connector
1) I build a filter and put something like /shop/dealer/* in url-mapping 
section of the web.xml file
 but does not work. if I put /* or /*jsp my filter works fine (I must 
be more selctive than /* or /*.jsp).  I read the specs and /shop/dealer/* 
seems a good url-pattern. Can anyone help me?
2) I have a servlet controller which forwards request to other servlets; 
the net result of dispatcher.forward is this 404 message
The requested resource (/shop/servlet/DealerUpdate) is not available
both the controller and the called servlet are in the web.xml file.
If I type the address on my Browser it works. can anyone explain me why?
thanks in advance,
 Giovanni

-
Giovanni Cuccu
[EMAIL PROTECTED]
-


--
To unsubscribe:   mailto:[EMAIL PROTECTED]
For additional commands: mailto:[EMAIL PROTECTED]
Troubles with the list: mailto:[EMAIL PROTECTED]