RE: [Proposal] Default Encoding option for JSP/Tomcat in server.xml or web.xml

2001-05-14 Thread Christian Mallwitz

Hi Craig,

 For POST requests, the request parameters will be parsed in 
 the character encoding specified by the browser (as part of
 the content type header).  If they did not, a new feature
 in Servlet 2.3 lets you call request.setCharacterEncoding()
 before trying to read any request parameters, if the app
 knows what character encoding was used.

I personally have never seen any browser specifing a character encoding
while POSTing FORM data. In general it seems to use the encoding of the page
containing the form to encode the POST data but if the user chooses to
change that it never tells the server in the POST request.

Am I missing something? 

Cheers
Christian
-- 
Christian Mallwitz INTERSHOP Communications Germany
Senior Software Engineerphone: +49 3641 50 3453



RE: About hotspot jvm

2001-05-14 Thread Christian Mallwitz

No, see http://developer.java.sun.com/developer/bugParade/bugs/4390238.html
Christian
-- 
Christian Mallwitz INTERSHOP Communications Germany
Senior Software Engineerphone: +49 3641 50 3453


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
 Sent: Monday, May 14, 2001 12:45
 To: [EMAIL PROTECTED]
 Subject: About hotspot jvm
 
 
 Hello everybody:
 
 Nowadays we're thinking about removing our jvm* (included
  in jdk 1.2.2_008 distribution) and put the HotSpot jvm...
 I have read in tomcat users' list something about hotspot jvm 
 crashes in production after a few hours working and
 that may be a serious problem in our bussiness...
 does this 'bug' really exists?
 if so...
 is it already solved?
 
 Thanks in advance:
 
 
 *(Sun Solaris 5.6 with Tomcat 3.2.1 and JDK 1.2.2_008)
 __
 Jaume Soriano Sivera [EMAIL PROTECTED]
 Tel: 96504 -ext. 44744 Fax: 965040047
 Portal y servicios multimedia - Nuevas tecnologias 
 W a n a d o o E s p a n a - http://www.wanadoo.es 
 __
 



Jasper Architecture Question (Was: How to do my own JSP processing)

2000-12-22 Thread Christian Mallwitz


 -Original Message-
 From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, December 21, 2000 19:23
 To: [EMAIL PROTECTED]
 Subject: Re: How to do my own JSP processing
 
 Sounds like you are planning on inventing your own variant of 
 a servlet+JSP server, since you're wanting to change or ignore
 many of the spec requirements.
 And you will end up with an app that will only run in your 
 own server.  Unless you like building servers as a hobby, 
 you've got a *lot* of hard work ahead of you.
 
 I would suggest you look at how you can architect your 
 application *within* the requirements of the servlet and
 JSP specs.  That way, you can focus on writing an app rather 
 than a server, and have some assurance that you can run that app
 elsewhere if and when you outgrow Tomcat.

Actually I have my own template language which is compiled to a JSP file.
Everything is supposed to be as much Servlet 2.3 spec conformant as
possible. Here is a simplistic view on my main servlet

service()
   1.  begin database transaction
   2.  do some business logic
   3.  execute JSP file
   4.  commit transaction
   5a. if commit successful send response content to the network 
   5b. if not generate error response (and discard result of JSP)

The problems with 3.) are
I.)   the JSP files are located outside my servlet context 
II.)  JSP execution must be buffered because the content is not be sent
before the database transaction commits
III.) the JSP execution must be able to set response header lines (e.g.
cookie)
IV.)  it should be possible in JSPs to use tag libraries and do all other
things possible if the JSP is served directly by Tomcat

Because of 
I.)   I cant use a "simple" servlet request dispatcher
II.)  forward() won't work because if the forward() returns the response is
already committed and closed by the container
III.) includes() won't do because I can't set headers

On top of this I want my servlet to pick a JSP file, run it, capture the
output and send this output be email before saying "sending email was
successful." over HTTP.

From what I read about Jasper it should be possible to call it compile my
JSPs and trigger their execution independent of the all of this is running
in a servlet itself or a standalone application, right?

Thanks
Christian
PS: I know it will be a nice piece of work ... 
-- 
Christian Mallwitz INTERSHOP Communications Germany
Senior Software Engineerphone: +49 3641 50 3453



JASPER: largeFile init parameter

2000-11-17 Thread Christian Mallwitz

Hi,

I want to use the largeFile parameter mentioned in the FAQ but couldn't get
it to work. Jasper always generates static HTML content into the Java class
file. How can I change this?

Thanks
Christian
-- 
Christian Mallwitz INTERSHOP Communications Germany
Senior Software Engineerphone: +49 3641 894 334


 -Original Message-
 From: Christian Mallwitz [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, November 13, 2000 16:49
 To: '[EMAIL PROTECTED]'
 Subject: RE: largeFile init parameter
 
 I tried JSP files of different sizes up to 512 KB size. All 
 static text is generated into the class file. So how do I 
 enable the largeFile option?
 
  I read about the largeFile init parameter and set it to true in my
  conf/web.xml file. but the static HTML is still in the class file.
  
  The FAQ says: "If the file is really large then all the 
  static html is stored is a separate data file if the value of this 
  param is set to true."
  
  How large is large and can I modify that?



RE: Using Jasper for template processing?

2000-11-16 Thread Christian Mallwitz

Please follow up on this in tomcat-dev as well ...
Thanks
Christian
-- 
Christian Mallwitz INTERSHOP Communications Germany
Senior Software Engineerphone: +49 3641 894 334

 -Original Message-
 From: Jaroslav Gergic [mailto:[EMAIL PROTECTED]]
 Sent: Thursday, November 16, 2000 11:15
 To: [EMAIL PROTECTED]
 Subject: Using Jasper for template processing?
 
 
 NOTE: I posted the message below to the tomcat-user mailing list
 several days ago, but without any meningful response.
 
 I am NOT tomcat-dev mailing list member, so respond
 directly to my email address, please.
 
 Thanks for any help and suggestions,
 in case I will succeed in my task, 
 I can contribute back to the community of course...
 **
 *
 Hello Tomcat developers and advanced users!
 
 I have following question:
 
 I would like to use Jasper engine for template processing.  I use
 Tomcat with JSPs and its good, but I would like to alter Jasper usage
 this way:
 
 An JSP page is compiled into a Java source where the user's JSP
 page extends the class HttpJspBase and overrides several methods
 notably _jspService().
 
 I want to use Jasper for more generic task. Template processing
 independent on Servlets and HTTP. Imagine following interface:
 
 public interface Template {
   void renderTemplate(Writer out) throws java.io.IOException;
 }
 
 I want to alter Jasper to process files with JSP-like syntax (of
 course with other intrinsic variables accessible inside the
 renderTemplate() method) and generate Java source code implementing
 the Template interface and than compile the source code using Java
 compiler into executable classes. Then load and run generated classes
 as they have been written manually.
 
 So I ask:
 1) is it possible or is Jasper tightly coupled with HTTP and Servlet
 API?
 2) if it is possible, how to do that? (which classes can be re-used,
 which interfaces and classes have to be re-implemented
 3) how much time it can take (1 day, 3 days, a week, two weeks, ...)
 
 Thanks for any comments and suggestions.
 
 Jaroslav Gergic
 
 =
 Jaroslav Gergic (Gergi)
 mailto:[EMAIL PROTECTED]
 http://nenya.ms.mff.cuni.cz/~gergic/
 
 __
 Do You Yahoo!?
 Yahoo! Calendar - Get organized for the holidays!
 http://calendar.yahoo.com/
 



tomcat 4.0 m4: bug while submitting UTF-8 data to JSP page

2000-11-13 Thread Christian Mallwitz

Hi,

I have a JSP file (see attachment) which lets you submit text in UTF-8 to
the same JSP file. For this to work the JSP file contains code for
converting the submitted text from Unicode to UTF-8. 

I run some test to submit the Euro symbol. In Unicode this is code point
0x20ac and in UTF-8 it is 0xE2 0x82 0xAC (3 bytes). It works for all servlet
engines I know of incl. Tomcat up to 3.2 beta 6 but not for Tomcat 4.0m4

if you have an URL like http://host/post.jsp?text=%E2%82%AC I expect the
following output:

text [as text]   = â'¬
text [as hex]= 0xe2 0x82 0xac 
text [corrected] = EUR

but I get

text [as text]   = â'¬
text [as hex]= 0xe2 0x201a 0xac 
text [corrected] = 

Note the second hex code. Interestingly 0x201a is a Unicode code point
containing a , character but I'm clueless how Tomcat got there ...

Bye
Christian
PS: I have attached a JSP file for more multibyte samples ...
-- 
Christian Mallwitz INTERSHOP Communications Germany
Senior Software Engineerphone: +49 3641 894 334


 post.jsp
 complete-charset-unicode-utf8.jsp

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