Re: Jakarta Tomcat + Windows + PHP

2005-05-11 Thread d~l
On 11 May 2005 at 19:01, Janet Fraser jlfraser-at-infotech.monash. wrote:

 Maybe my question should have been 
 simpler, ie How do I install PHP to Tomcat?

Here is my installation of PHP on tomcat 5.0.28 (on WinXP) .. 

*   install PHP (preferably PHP5) into c:\PHP\

*   place php.ini in c:\windows\php.ini

*   download phpservlet.war from here ..

http://tools.herberlin.de/phpservlet/phpservlet.war

*   drop phpservlet.war into tomcat5\webapps\

*   in tomcat5\webapps\phpservlet\WEB-INF\web.xml

set paths 

param-namephp.executable/param-name
param-valuec:/php/php-cgi.exe/param-value

and

param-nameSystemRoot/param-name
param-valuec:/windows//param-value

note: use php-cgi.exe and not php.exe.

*   Launch http://localhost:8080/phpservlet/phpinfo.php

to check that PHP is working on tomcat.


RE: Tomcat 5.0.24 - JSP 2.0 SVG example (JSPX) - not opening rendered SVG object in IE 6

2004-11-11 Thread d~l
On 11 Nov 2004 at 11:05, Kumar Pandey kumar.pandey-at-transerainc. wrote:

 Were able to get this fixed?.
 I have similiar issue with IE 6 just displaying svg from a servlet with mime 
 type image/svg+xml.
  
 Downloading and opening the svg file works fine.
  
 Thanks
 Kumar

Hello Kumar ..

I was beginning to think that I was in a minority with my SVG display problem 
in IE 6 ..

I received one off list suggestion (poster Lars not subscribed to the forum).

My thanks to Lars for his suggestion (but it was not suitable since it still 
requires a renaming of file extension).

_

quote

I also have this problem, and I found an ugly hack that works.
 
1.add this to tomcat-root\conf\web.xml:
   servlet-mapping
  servlet-namejsp/servlet-name
  url-pattern*.svg/url-pattern
  /servlet-mapping
2.restart the tomcat server.
3.rename the file.jsp file to file.svg
 
Then http://server:port/file.svg will show nicely.
 
If you find a better solution, I will be happy to hear from you.
/quote.
_

In fact, I have been configuring web.xml to try out similar ideas ..

Although IE browser will open a file with *.svg extension, I need to be able to 
open the JSPX generated SVG file with extension jspx .. without having to 
change the extension to svg.

I concluded that this was an IE 6 browser problem .. since only IE 6 fails to 
open jspx generated svg files.

I had, in fact, read the link you found .. on IE 6 ..

http://wiki.svg.org/index.php/MimeType

which reads .. 

_

So, in order to have all browsers accept your content properly 

1. make sure that all URLS end in .svg, including generated content (for 
InternetExplorerBrowser --
 for example, using a dummy parameter as in http://mysvg.jsp?ielikes=.svg;); 

and 

2. set the MIME type on the server. 
_

also read here ..

http://lists.w3.org/Archives/Public/www-tag/2003Apr/0030.html

The main reason this is propagated is that IE (prior to v6) does not behave 
properly in
respect to SVG and MIME types. IE (prior to v6) treats SVG as SVG when, and 
only when, 
the url ends in .svg, it doesn't care about MIME. 



In fact, to generate and render SVG server side I have moved away from using 
jspx 
(because of the above unsolved problem) .. and I am now using 
php (yes, php running on Tomcat) to dynamically generate SVG server side.

here are two tutorials which I have followed with success .. 
delivering svg across all browsers ..including IE 6

http://www.zend.com/zend/trick/tricks12apr.php

http://www.carto.net/papers/svg/samples/serverside_svg_php.shtml


and .. I have a php servlet running on Tomcat in CGI mode .. so I can now 
generate the SVG server side using PHP.



But .. for my education .. I would still like to get the jspx.svg example to 
work in IE browsers.

In fact the SVG script is generated by this URL   
http://localhost:8080/jsp-examples/jsp2/jspx/textRotate.jspx.html

So I guess using PHP I could use cURL function to scrape the screen and write 
the source as a SVG file.


see here for an explanation of jspx.html usage ..

JSPX reference

http://www.onjava.com/pub/a/onjava/2004/04/21/JSP2part3.html

These new rules make it possible to write a JSP Document as a regular XHTML 
file 
(with JSP elements for the dynamic content, of course), for instance, without 
having to 
place all content within a jsp:root element. 


You can even use .html as the extension for such files if you create a JSP 
property group 
declaration like this:

in web.xml ..

  jsp-config
jsp-property-group
  url-pattern*.html/url-pattern
  is-xmltrue/is-xml
/jsp-property-group
  /jsp-config
  



for now .. PHP + SVG + Tomcat rules .. at least for my hybrid application!

of course PHP + SVG also works on Apache server (Apache server normally 
associated with PHP) but I need to integrate SVG graphics as components in a 
Tomcat hosted application.

d~l


Tomcat 5.0.24 - JSP 2.0 SVG example (JSPX) - not opening rendered SVG object in IE 6

2004-11-09 Thread d~l

Problem summary: 
Tomcat 5.0.24 JSP 2.0 SVG example does not display JSPX rendered SVG file in 
IE 6 browser.
O.k. in Opera and Mozilla.
_

I have Tomcat 5.0.24 running on my localhost - Win XP Pro SP1

I am trying out the JSP 2.0 SVG example found here .

http://localhost:8080/jsp-examples/jsp2/jspx/svgexample.html

and then to view the SVG file ..

http://localhost:8080/jsp-examples/jsp2/jspx/textRotate.jspx?name=JSPX

to dynamically render and display an SVG object in browser ..

quote from above page ...

_

JSP 2.0 SVG Example

This example uses JSP 2.0's new, simplified JSPX syntax to render 
a Scalable Vector Graphics (SVG) document. 
When you view the source, notice the lack of a jsp:root element! 
The text to be rendered can be modified by changing the value of the name 
parameter. 
SVG has many potential uses, such as searchable images, or images 
customized with the name of your site's visitor (e.g. a Susan's Store tab 
image).
JSPX is a natural fit for generating dynamic XML content such as SVG. 
_

I am testing this jspx example across several browsers ... IE / Opera / Mozilla

IE 6 and Opera 7 both have Adobe SVG plugin, Mozilla has its native SVG reader.

These browsers all open and display static *.svg files correctly (with no file 
download? prompt as reported below with IE 6).

...

The problem arises with IE 6 trying to open the dynamically generated 
textRotate.jspx.svg file.

In IE 6, instead of opening the rendered SVG object  I see a file download 
pop-up 
window

some files can harm your computer etc. etc.

File name:  textRotate.jspx
File type:  SVG Document
from:   localhost

Would you like to open the file or save?
...

But in Opera, Mozilla and Firefox the jspx generated SVG (from above JSP 
example)
opens in the browser window.  And the URL opens SVG file in a Batik SVG viewer.

So this is more of a cross-browser problem than a server problem. IE 6 in 
particular.

###
Q. How can I get IE 6 browser to open and display this JSP 2.0 SVG example - on 
the fly - without need for SVG file download?
###

This same JSP 2.0 SVG test file can be seen online here .. Jetty server site ..

http://jetty.mortbay.org/jsp-examples/jsp2/jspx/svgexample.html

Perhaps an IE 6 / Tomcat 5.0.x (localhost) user can go to this standard JSP 2.0 
SVG 
Example and compare results? 

http://localhost:8080/jsp-examples/jsp2/jspx/svgexample.html

then ..

http://localhost:8080/jsp-examples/jsp2/jspx/textRotate.jspx?name=JSPX


But this preview does require an Adobe SVG plugin to be installed in your IE 
browser.

Here is the SVG plug-in test site to check if you have this plugin installed ..

http://www.adobe.com/svg/viewer/install/svgtest.html.

___

Finally, here are the My Computer | Tools | Folder Options | File Type settings 
..

for SVG document

*   Action: open

*   Application used 
to perform action:  
C:\Program Files\Internet Explorer\iexplore.exe -nohome %1

*   Use DDE:ticked

*   DDE Message:file:%1,,-1,
*   Application:Iexplore
*   DDE Application 
not running:blank

*   Topic:  WWW_OpenURL

___


Thanks for any insights into solving this IE6 / jspx.SVG display problem.

d~l


RE: Tomcat 5.0.24 - JSP 2.0 SVG example (JSPX) - not opening rendered SVG object in IE 6

2004-11-09 Thread d~l
On 9 Nov 2004 at 17:56, Didier McGillis codesmoker-at-hotmail.com wrote:

 You have to configure IE6 to know what svg is and how to display it.

Thanks for your reply ..

I tried to explain in my post that SVG files (stand alone) 
display absolutely fine in IE 6 ..  no problems there .. 

IE 6 just does not display JSP 2.0 rendered jspx.svg .. as in the JSP 2.0 SVG 
example in Tomcat

perhaps you can help by explaining how to setup IE 6 to display that 
particular textRotate.jspx.svg 
extension  .. without the file download prompt? 

In my post I included the SVG file type configuration I am using.

and/or .. confirm that you can see the JSP 2.0 SVG example content in IE 6 .. 
see links in 
my post .. and I'll take it from there if you confirm that it works for you?

here is the localhost link again .. JSP 2.0 SVG Example .. open in IE 6 ..

http://localhost:8080/jsp-examples/jsp2/jspx/textRotate.jspx?name=JSPX

thanks for your interest ..

d~l




RE: Tomcat 5.0.24 - JSP 2.0 SVG example (JSPX) - not opening rendered SVG object in IE 6

2004-11-09 Thread d~l
On 9 Nov 2004 at 20:04, Peter Crowther Peter.Crowther-at-melandra wrote:

  Problem summary: 
  Tomcat 5.0.24 JSP 2.0 SVG example does not display JSPX 
  rendered SVG file in 
  IE 6 browser.
  O.k. in Opera and Mozilla.
 
 Just check whether there's a blank line before the ?xml...? in the
 generated file.  I had the same problem in ASPX with Adobe's 3.01 SVG
 viewer - it won't work at all unless the  is the first character in the
 returned file.
 
 Just a guess.
 
   - Peter
_

Thanks for the guess .. but I have just checked the textRotate.jspx file which 
IE is 
prompting to be downloaded .. and there is no white space before the ? xml 
header 
..

here are the first few lines of textRotate.jspx . no leading whitespace

?xml version=1.0 encoding=UTF-8?
svg xmlns=http://www.w3.org/2000/svg; viewBox=0 0 450 500 height=500 
width=450
titleJSP 2.0 JSPX/title
g id=testContenttext text-anchor=middle font-size=15 y=10% x=50% 
class=title
JSP 2.0 XML Syntax (.jspx) Demo/texttext text-anchor=middle 
font-
size=15 y=15% x=50% class=title
Try changing the name parameter!/text
g id=rotatedText transform=translate(225, 250) opacity=1.0
  g opacity=0.95 transform=scale(1.05) rotate(15)

 snip
/svg
__

anybody got Tomcat 5.0.x  in  localhost just to try out this JSP 2.0 SVG 
example ?

http://localhost:8080/jsp-examples/jsp2/jspx/textRotate.jspx?name=JSPX 

d~l




RE: Tomcat 5.0.24 - JSP 2.0 SVG example (JSPX) - not opening rendered SVG object in IE 6

2004-11-09 Thread d~l
On 9 Nov 2004 at 21:13, Peter Crowther Peter.Crowther-at-melandra wrote:

 If you download and save it as file.svg on your desktop, then
 double-click it, does it load?  If so, I suspect a content-type issue.
 
   - Peter



yes .. if I save textRotate.jspx (in IE 6) as textRotate.svg .. into my Tomcat 
wepapps 

I can open it correctly in IE 6 ..

...

this is an article I'm reading on JSPX  ..

http://www.onjava.com/pub/a/onjava/2004/04/21/JSP2part3.html

talks about a property group declaration in web.xml .. or is this a red herring?

d~l

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



Configuring Tomcat 5.0.27 to run PHP 5.0.1 scripts

2004-09-15 Thread d~l

I may be in a minority here .. very sparse information found so far on this  ..

I would like to configure Tomcat 5.0.27 to run PHP 5.0.1 scripts on Tomcat server (in 
addition to PHP running on Apache server).

I do understand that PHP usually runs on Apache server (I have that combination 
working already).  I need a hybrid configuration.
__

My configuration:-

Two servers running on same Windows XP Pro platform (localhost testing mode) ..

*   Apache 2 running PHP 5.0.1  (port 88)
*   Tomcat  5.0.27 running some webapps (port 8080)

Also, Apache server is connected to Tomcat server via mod_jk2 connector

but I also require PHP 5.0.1 scripts to run on Tomcat  5.0.27..

.. for PHP (Apache) --- PHP (Tomcat) inter-server communications.

__

Searching around I found this single reference:-

http://wiki.apache.org/jakarta-tomcat/Tomcat/UsingPhp

note: on that site I read this ..



3. Patch for PHP configure Script
This is a patch for PHP's configure script to account for the servlet jar name 
change (from servlet.jar in Servlet Spec 2.3 and previous [tomcat 4 and 
previous] to servlet-api.jar in Servlet Spec 2.4 and above [tomcat 5 and 
later]):


I do have servlet-api.jar in my Tomcat 5.0.27 configuration .. \common\lib\

Does this mean I need to compile PHP 5.0.1 from source (I have used the PHP 
binary installer, not a build)?

I have in c:\Tomcat5\common\lib\

phpsrvlt.jar(copied from PHP)
servlet-api.jar
__

Here is what I have setup so far in Tomcat 5.0.27 .. 

(1) copied  phpsrvlt.jar from c:\php\ext\ intoc:\Tomcat5\common\lib\ 

(2) enabled php_java.dll extension (from this link  .. http://uk2.php.net/java/  ) 
not sure if I really need this .. but enabled it anyway

extension=php_java.dll 

(3) in C:\Tomcat5\conf\web.xml .. 

mime-mapping 
extensionphp/extension 
mime-typeapplication/x-httpd-php/mime-type 
 /mime-mapping 

 welcome-file-list 
welcome-fileindex.php/welcome-file 
 welcome-file-list 


But note ... no PHP 5.0.1 servlet mapping has yet been created in Tomcat web.xml. 

Is there a PHP 5.0.1 servlet mapping definition somewhere? 

__

Summary:-

Is there a configuration guide anywhere for configuring PHP 5.0.1 to run on Tomcat 
5.0.27 ... showing php.ini settings, and other settings in Tomcat?

__

Thanks

d~l