RE: How to "include" across contexts/webapps?

2002-01-03 Thread Marcin Jaskula

> > I'm trying to build a website in a typical sort of way, with headers
> > and footers isolated and "<%@include%>"'ed into the actual
> > pages. However, now I'd like to modularize somewhat and decompose
> > parts of the site into their own projects/contexts, while still having
> > each project share common headers and footers. Unfortunately,
> > "<%@include%>" is relative to the current context, so I haven't been
> > able to figure out a good way to share the header/footer information
> > across each of the contexts/apps. Is there a canonical way of doing
> > something like this?
> >
> 
> In my own apps, I accomplish your goal in an indirect manner -- I keep a
> single copy of the shared header/footer files in a CVS repository that is
> separate from my Tomcat webapps directory.  Then, as part of deploying a
> particular webapp, I copy in the shared files out of this repository into
> *each* webapp that requires them.  That way, I still have a single source
> file to change in case updates are needed, at the (insignificant) cost of
> a little extra disk space.

Hi

If you work on UNIX make one directory with the common files and
in each of apps directories make symbolic links to the common dir.
If you modify a file in a common dir you see the changes in all apps
without committing and updating CVS. And you do not need extra
disk space.

Marcin

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


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




RE: Clear Cache In IE5

2001-12-20 Thread Marcin Jaskula

Hi

Try to add headers:

response.setHeader("Cache-Control", "no-cache, must-revalidate,
max_age=0");
response.setDateHeader("Expires", 0);
response.setHeader("Pragma", "no-cache");

just at the begin of a script. Should work on almost all browsers.

Marcin

> -Original Message-
> From: Yiu Wing [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 19, 2001 10:07 PM
> To: [EMAIL PROTECTED]
> Subject: Clear Cache In IE5
>
>
> Hello all,
>
> This is a little bit off topic. Can you tell me how can I clear
> the cache in
> IE so that I can see the change I've in made in my webapp after invoking
> TomCat4.0 again?  Thanks in advance.
>
>  _ Do You
> Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
> --
> To unsubscribe:   
> For additional commands: 
> Troubles with the list: 
>


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




RE: Character Encoding problems

2001-12-04 Thread Marcin Jaskula

> I'm developing a web application that uses textual data for
> Central&Eastern Europe. The text is in a database which is
> internally UNICODE. I also have another DB instance which is
> ISO-8859-2 encoded, so all options are in the play.
>
> I thought I should set contentType="text/html;
> charset=ISO-8859-2", declare a page to the same (just in case)
> and "sit back and enjoy myself". Unfortunately, I was wrong.
>
> Not only is the Latin-2 support in both IE and Netscape buggy
> (they wouldn't display "s-caron" and "z-caron", but would display
> Caps versions of those characters), but Java is bugging me, too.
> Instead of letters specific to our alphabet, I'm getting "?".
>
> With the help of a dedicated PostgreSQL JDBC developer, I have
> tracked this problem down to JVM, which has a default encoding of
> "ISO-8859-1". In a standalone Java application I can do explicit
> encoding, like this:
>
> System.out.write( testString.getBytes( "ISO-8859-2" ) );
>
> and it will print the characters I expect, instead of "?".
>
> What do I do in Tomcat?
>
> I have set contentType to "text/html; charset=ISO-8859-2" and in
> a generated Servlet code it really has:
>
> response.setContentType("text/html; charset=ISO-8859-2");
>
> So, no trouble there. How do I get a (Unicode) string to convert
> to a ISO-8859-2 encoded byte stream? Because, eventually, that is
> what the browser should get. I cannot use the method from above,
> since JspWriter doesn't accept byte[] as an argument.

Hi

I used to have similar problem.
I'm using Tomcat 4.0 with PostgreSQL, DB encoding LATIN-2.
I couldn't get proper characters from the page source, an input form (post
method) and from the DB.
I managed it by:
1. The page with the input form MUST have encoding=iso-8859-2

2. The DB encoding LATIN-2
3. In the source of the jsp page:
<%@ page
contentType="text/html; charset=iso-8859-2"

%>
request.setCharacterEncoding("iso-8859-2"); // just after <%@page !! before
you
 // read any
argument from request

and in the http headers:

// ^ it looks unnecessary but otherwise it doesn't work ???

All the best
Marcin


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