Re: Can't use Cookies in tag libraries ?????

2001-10-02 Thread Marcel May

On Tue, Oct 02, 2001 at 04:53:04PM +0200, Arnaud H?ritier wrote:
> I done it, but I would to store the info between two sessions, that's why I tried 
>this.

Store it somehow in application scope bean then?

> 
> > -Message d'origine-
> > De: Marcel May [SMTP:[EMAIL PROTECTED]]
> > Date:   mardi 2 octobre 2001 16:40
> > ?:  [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Cc: '[EMAIL PROTECTED]'
> > Objet:  Re: Can't use Cookies in tag libraries ?
> > 
> > Store your information in a bean with e.g. session scope?
> > Is much simpler ... 
> > 
> > On Tue, Oct 02, 2001 at 04:40:05PM +0200, Arnaud H?ritier wrote:
> > > After studying the problem, I'm agree with you Fernando.
> > > It's not a good idea to access to the header components from a taglibrary.
> > > I found a bypass to my problem substituting a  tag which flush 
> > > the content by a <@ include> which doesn't.
> > > It works in this case but it's very bad and it reduces enormously the reuse 
> > > of my taglibrary.
> > > I thinks that this problem is very annoying. I wouldn't do a very 
> > > complicated thing. I developped a page by page iterator, and I wanted to 
> > > store from the taglibrary in a cookie the number of lines selected by the 
> > > user, in order to be transparent in the jsp page.
> > > what a shame that cookies are transfered in the header :-(
> > > 
> > > too bad for me
> > > 
> > > arno
> > > 
> > > 
> > > > -Message d'origine-
> > > > De: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> > > > Date:   mardi 2 octobre 2001 16:16
> > > > ?:  [EMAIL PROTECTED]
> > > > Cc: Tomcat-User (Adresse de messagerie)
> > > > Objet:  RE: Can't use Cookies in tag libraries ?
> > > >
> > > >
> > > > I would say its not good practice for a taglib to write any HTTP header 
> > > --
> > > > of course,  that includes cookies.
> > > > Since tag extensions are designed to make scripted markup more 
> > > expressive,
> > > > compact, etc., they have to
> > > > be allowed anywhere that markup is allowed.  If possibly Struts is 
> > > causing
> > > > headers to be committed sooner
> > > > that you are used to, even if Struts did nothing, you could still never
> > > > insure that your tag would be successfully
> > > > be able to write a cookie in all instances -- there's nothing to stop 
> > > your
> > > > tag from being included at the bottom
> > > > of a 50K JSP page.  Unless the servlet container had a large buffer, the
> > > > headers would already be committed.
> > > >
> > > > In apps I've worked on, we've always had a usage of putting any 
> > > statements
> > > > that write headers -- those controlling page
> > > > caching, for example -- at the top of our JSP's, before any markup is
> > > > transmitted.  The mechanism is not
> > > > foolproof, in that it relies on developers to understand and employ the
> > > > usage, but then again this is no more
> > > > burdensome that the 100 other things you need to know to make this stuff
> > > > operate correctly.
> > > >
> > > > - Fernando
> > > >
> > > >
> > > >
> > > > 
> > >
> > > > Arnaud 
> > >
> > > > H?ritier To: "Tomcat-User (Adresse de 
> > > messagerie)" <[EMAIL PROTECTED]>
> > > >  > > messagerie)" <[EMAIL PROTECTED]>, (bcc: Fernando
> > > > ra.com>   Salazar/CAM/Lotus) 
> > >
> > > >  Subject: RE: Can't use 
> > > Cookies in tag libraries ?
> > > > 10/02/2001 
> > >
> > > > 07:42 AM 
> > >
> > > > Please respond 
> > >
> > > > to struts-user 
> > >
> > > > 
> > >
> > > > 
> > >
> > > >
> > > >
> > > >
> > > >
> > > > Same think if I try to add a Cookie in the response from a JSP page :-(
> > 

Re: Invalid virtual hostname ?, At the directive: WebAppDeploy ?

2001-09-25 Thread Marcel May

Try out setting the http server name: "ServerName myServer.myDomain.com"
This worked for me ... the Warp conf you use should be ok.

On Tue, Sep 25, 2001 at 02:03:27PM +0200, Hans-Erik Skyttberg wrote:
> Starting httpd: Syntax error on line 331 of /etc/httpd/conf/httpd.conf:
> Invalid virtual host name
> 
> When having a vanilla installed Tomcat 4.0 that I just started and added
> following to httpd.conf:
> WebAppConnection conn warp localhost:8008
> WebAppDeploy examples conn /examples
> 
> Any ideas suggestions...
> 
> Hans - Erik Skyttberg
> Boxer TV Access AB
> Tegluddsv. 64
> 115 28 Stockholm
> +46 (0)8 587 899 64
> +46 (0)733 35 70 64

-- 
Marcel May
Development
ConSol* GmbH

 PGP signature


Re: changes with mod_webapp

2001-09-24 Thread Marcel May

On Mon, Sep 24, 2001 at 06:05:43PM +0200, Jos? Juan Rodr?guez wrote:
> 
> Hi!!
> 
> with the old mod_jk connector I have the next configuration for a context:
> 
> Alias /plataforma "/opt/jakarta-tomcat-3.2.1/webapps/myexample/public"
> 
> Options Indexes FollowSymLinks
> 
> JkMount /myexample/servlet/* ptf12
> JkMount /myexample/*.jsp ptf12
> 
> but with the new mod_webapp connector I don't know how I separate servlets
> from the html content. What do I must to add to this new configuration for
> the mod_webapp connector to have the same directory structure (all html,
> javascript and images in the /public directory)??

The warp connector configures apache automatically so that static
content (images, html etc.) is handled by apache and the dynamic stuff by catalina,
as far as I know (check apache/tomcat access log files).

> 
> WebAppConnection conn  warp  localhost:8018
> WebAppDeploy     myexample  conn   /myexample
> 
> 
> 
> 

CU,
Marcel

-- 
Marcel May
Development
ConSol* GmbH

 PGP signature


Re: Hi! I have followed the instructions in

2001-09-24 Thread Marcel May

Set the server name in httpd.conf should solve that (commented out by default), e.g.
"ServerName myhost.mydomain.com"

On Mon, Sep 24, 2001 at 04:10:37PM +0200, Hans-Erik Skyttberg wrote:
> Starting httpd: Syntax error on line 331 of /etc/httpd/conf/httpd.conf:
> Invalid virtual host name
>[FAILED]
> 
> This is in my httpd.conf:
> LoadModule webapp_module modules/mod_webapp.so
> AddModule mod_webapp.c
> 
> 
> WebAppConnection conn warp localhost:8008
> WebAppDeploy examples conn /examples
> 
> 
> I have not touched server.xml, do I need to in order for the examples to
> work ?
> With mod_jk you could tell htat only .jsp files should be sent to
> tomcat, is this gone with tomcat 4.0 and webapps ?
> 
> Any help greatly appreciated ?
> 
> I read something in server.xml that I should exchange localhost for the
> same values as in ServerName in http.conf, I didn't find any value that
> was localhost underneath this comment so if someone can give me an
> example of how the standard  should look like for this to
> work
> 
> Regrads
> 
> Hans - Erik Skyttberg
> Boxer TV Access AB
> Tegluddsv. 64
> 115 28 Stockholm
> +46 (0)8 587 899 64
> +46 (0)733 35 70 64

-- 
Marcel May
Development
ConSol* GmbH

 PGP signature