Using jasper with web application in .war file

2004-05-12 Thread Dennis Thrysøe
Hi,

I'm trying to figure out whether jasper can be used with a web 
application that's still in it's war file (unexploded)?

A classpath for jasper can be specified, but it seems that only direct 
filenames can be specified here and not - for instance - a jar URL.

Any suggestions for using jasper without unpacking the web application 
are welcome.

TIA,

-dennis

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


Re: JSP Include and URL encoding

2004-04-02 Thread Dennis Thrysøe
Veniamin Fichin wrote:
Dennis Thrysøe wrote:

Hi,

I'm having problems including a JSP page from another JSP page using 
parameters with special characters.

I looked through the archives, but couldn't find anything about this 
issue.
   Try this URL: http://issues.apache.org/bugzilla/show_bug.cgi?id=23929 
. Connector attributes mentioned there available since 5.0.19, as I 
understand.
Thanks, that may be related. Perhaps it could override the VM's language 
properties. But we fixed it by changing those properties instead.

Besides the problem was on 4.1.29.

-dennis

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


Re: JSP Include and URL encoding

2004-04-02 Thread Dennis Thrysøe
Hiroshi Iwatani wrote:
(1)Set page directive attributes right
   (Maybe, pageEncoding = your platform encoding and charset = UTF-8)
They are correct. The generated servlet already contains the wrong value 
'%3F'.

(2)Use a Servlet/JSP container other than Tomcat. For example, Resin
from caucho.com.
I guess that could be an option, but this Tomcat instance is running at 
our service provider, so they would have to think so too.

The problem has now been fixed by setting the language and country 
properties to 'da' and 'DK' respectively. This was apparently necesarry 
for the JSP parser to read the file correctly.


Scott Ferguson wrote:
 > Actually, the underlying problem is a difficult one. Unfortunately, URLs
 > don't have an official character encoding. It looks like we're drifting
 > toward UTF-8 as a default, but that's not specified in the HTTP
 > specifications.
 >
 > Because the HTTP request does not specify the URL encoding, the web
 > server needs to guess. It's somewhat of an ugly problem.
For JSP includes this doesn't seem to be the problem. It is because of 
characters being replaced with '?' when reading the JSP.

Thanks anyway,

-dennis

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


JSP Include and URL encoding

2004-04-02 Thread Dennis Thrysøe
Hi,

I'm having problems including a JSP page from another JSP page using 
parameters with special characters.

I looked through the archives, but couldn't find anything about this issue.

I can encode a string, and the result is correct

  URLEncoder.encode("blåbærgrød", "ISO-8859-1")

But if I make an include with the same value

  

  
The special characters are replaced with question marks '?' (%3F). So 
the query string seen from bar.jsp becomes

  word=bl%3Fb%3Frgr%3Fd

In fact the generated java code for the main jsp file contains this 
string also. So the problem is already during parsing or servlet generation.

The requests character encoding is null. The page directive's 
pageEncoding attribute is "ISO-8859-1" (or not present - doesn't make a 
difference.

The user properties user.country and user.language are 'US' and 'en' 
respectively. Might that be the cause?

The problem is on Tomcat 4.1.29 on Linux.

By the way: I still haven't figured out whether Tomcat 4.1.30 is 
supposed to be able to run on JDK 1.3.1.

Any help appreciated,

-dennis

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


Re: JSP problems

2004-04-01 Thread Dennis Thrysøe
Dennis Thrysøe wrote:
Dennis Thrysøe wrote:
Nope. Just plain old JSP's in a webapp. Jasper generates servlets and 
compiles them just fine. But it cannot load them. I get

java.lang.ClassNotFoundException: org.apache.jsp.index_jsp


I'm still having the problem. Is there anybody out there with a really 
detailed knowledge of how Jasper uses it's temp-dir?
It seems that I just found a workaround for the issue: Use JDK 1.4.2 
instead of JDK 1.3.1.

Shouldn't TOmcat 4.1.30 be able to run on JDK 1.3.1?

-dennis

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


Re: JSP problems

2004-03-31 Thread Dennis Thrysøe
Dennis Thrysøe wrote:
QM wrote:

: [snip] the classes are declared in the package org.apache.jsp.
: : Any ideas, how I can make tomcat (jasper?) load the classes that 
it just : generated and then compiled?

So then, you're precompiling the JSPs?
Nope. Just plain old JSP's in a webapp. Jasper generates servlets and 
compiles them just fine. But it cannot load them. I get

java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
I'm still having the problem. Is there anybody out there with a really 
detailed knowledge of how Jasper uses it's temp-dir?

What I experience is that Jasper compiles

  /foo/index.jsp

into

  /foo/index_jsp.class (which contains org.apache.jsp.index_jsp)

But Jasper's classloader doesn't seem able to load the file. Actually I 
see two problems here:

1) How can the classloader load a class in the org.apache.jsp package if 
the org/apache/jsp directory structure isn't present. Should this work?

2) What would the fully qualified classname of for instance 
/bar/index.jsp be?

Thanks,

-dennis

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


Re: JSP problems

2004-03-31 Thread Dennis Thrysøe
QM wrote:
: [snip] the classes are declared in the package org.apache.jsp.
: 
: Any ideas, how I can make tomcat (jasper?) load the classes that it just 
: generated and then compiled?

So then, you're precompiling the JSPs?
Nope. Just plain old JSP's in a webapp. Jasper generates servlets and 
compiles them just fine. But it cannot load them. I get

java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
	at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:209)
	at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131)
	at 
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:497)
	at 
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:150)
	at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:195)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

I don't have any URLs -- do a web search -- but there are examples for
building the JSPs into WEB-INF/classes and having Ant create the servlet
mappings (for web.xml) for you.
I wish that was the problem :)

-dennis

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


JSP problems

2004-03-31 Thread Dennis Thrysøe
Hi,

I'm still having the problem I already wrote about, as a result of 
upgrading a tomcat 4.0.1 installation to 4.1.30.

I get a ClassNotFoundException for the generated JSP class. The 
generated classes are written to the context work directory with the 
same nameing and structure as the JSPs in the webapp. But the classes 
are declared in the package org.apache.jsp.

Any ideas, how I can make tomcat (jasper?) load the classes that it just 
generated and then compiled?

Thanks,

-dennis

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


Re: Vedr.: Upgrading from 4.0.1 to 4.1.30

2004-03-29 Thread Dennis Thrysøe
Thomas Nybro Bolding wrote:
Hi Dennis,
this is just a wild guess but are your classes placed in packages? As I 
recall at some point around 4.0x this became a prerequisite.
I'm unsure which classes your are speaking of. The generated class in 
this case is org.apache.jsp.index_jsp, but it is not placed in the 
package (folder) org/apache/jsp. Instead it's placed in the same folder 
as the JSP in the webapp.

I can see how this is a problem, if the webapp classloader isn't 
implemented in an unusually creative way. But I don't know how to alter 
this behaviour.

-dennis

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


Upgrading from 4.0.1 to 4.1.30

2004-03-29 Thread Dennis Thrysøe
Hi,

I'm having problems with upgrading an existing environment from Tomcat 
4.0.1 to 4.1.30.

I just tried running the new version with the existing configuration 
(attached). But whenever I request a JSP I get an error like this:

java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
	at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:209)
	at org.apache.jasper.servlet.JasperLoader.loadClass(JasperLoader.java:131)
	at 
org.apache.jasper.JspCompilationContext.load(JspCompilationContext.java:497)
	at 
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:150)
	at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:195)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

The class is generated and compiled fine, and placed in the context's 
work-dir (placed similarly to the JSP file in the webapp).

I've run out of things to try. Any ideas?

-dennis




  







  




  

  






  



  



  



http://java.sun.com/dtd/web-app_2_3.dtd";>


  
  
  
  
  
  
  
  
  


  


  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

  
default

  org.apache.catalina.servlets.DefaultServlet


  debug
  0


  listings
  true

1
  


  
  
  
  
  
  
  
  
  
  
  
  

  
invoker

  org.apache.catalina.servlets.InvokerServlet


  debug
  0

2
  


  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

  
jsp
org.apache.jasper.servlet.JspServlet

  logVerbosityLevel
  WARNING


  fork
  false

3
  


  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

  


  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  

  


  


  
  
  
  

  
  
default
/
  

  
  

  
  
jsp
*.jsp
  

  
  

  
  


  
  
  

  
30
  


  
  
  
  
  
  

  
abs
audio/x-mpeg
  
  
ai
application/postscript
  
  
aif
audio/x-aiff
  
  
aifc
audio/x-aiff
  
  
aiff
audio/x-aiff
  
  
aim
application/x-aim
  
  
art
image/x-jg
  
  
asf
video/x-ms-asf
  
  
asx
video/x-ms-asf
  
  
au
audio/basic
  
  
avi
video/x-msvideo
  
  
avx
video/x-rad-screenplay
  
  
bcpio
application/x-bcpio
  
  
bin
application/octet-stream
  
  
bmp
image/bmp
  
  
body
text/html
  
  
cdf
application/x-cdf
  
  
cer
application/x-x509-ca-cert
  
  
class
application/java
  
  
cpio
application/x-cpio
  
  
csh
application/x-csh
  
  
css
text/css
  
  
dib
image/bmp
  
  
doc
application/msword
  
  
dtd
text/plain
  
  
dv
video/x-dv
  
  
dvi
application/x-dvi
  
  
eps
application/postscript
  
  
etx
text/x-setext
  
  
exe
application/octet-stream
  
  
gif
image/gif
  
  
gtar
application/x-gtar
  
  
gz
application/x-gzip
  
  
hdf
application/x-hdf
  
  
hqx
application/mac-binhex40
  
  
htc
text/x-component
  
  
htm
text/html
  
  
html
text/html
  
  
hqx
application/mac-binhex40
  
  
ief
image/ief
  
  
jad
text/vnd.sun.j2me.app-descriptor
  
  
jar
application/java-archive
  
  
java
text/plain
  
  
jnlp
application/x-java-jnlp-file
  
  
jpe
image/jpeg
  
  
jpeg
image/jpeg
  
  
jpg
image/jpeg
  
  
js
text/javascript
  
  
jsf
text/plain
  
  
jspf
text/plain
  
  
kar
audio/x-midi
  
  
latex
application/x-latex
  
  
m3u
audio/x-mpegurl
  
  
mac
image/x-macpaint
  
  
man
application/x-troff-man
  
  
me
application/x-troff-me
  
  
mid
audio/x-midi
  
  
midi
audio/x-midi
  
  
mif
application/x-mif
  
  
mov
video/quicktime
  
  
movie
video/x-sgi-movie
  
  
mp1
audio/x-mpeg
  
  
mp2
audio/x-mpeg
  
  
mp3
audio/x-mpeg
  
  
mpa
audio/x-mpeg
  
  
mpe
video/mpeg
  
  
mpeg
video/mpeg
  
  
mpega
audio/x-mpeg
  
  
mpg
video/mpeg
  
  
mpv2
video/mpeg2
  
  
ms
application/x-wais-source
  
  
nc
application/x-netcdf
  
  
oda
application/oda
  
  
pbm
image/x-portable-bitmap
  
  
pct
image/pict
  
  
pdf
application/pdf
  
  
pgm
image/x-portable-graymap
  
  
pic
image/pict