LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-29-2005, 01:24 PM   #1
Ziggie
Member
 
Registered: Nov 2005
Distribution: Red Hat AS 3
Posts: 49

Rep: Reputation: 15
Using Php in a Java jsp file


OK...I inherited a Java based app that I assume is coded completely in Java (isn't that what jsp files are?). I needed to make an addition to it, so rather than learning Java (since I'm trying to phase away from it) I am wanting to make additions in php (as I know php, this was the best thought to me).

Here's my problem. The Java app (at least all the jsp files) are in the tomcat directory, so that Java/tomcat interprets them. Unfortunately, any php code that is dropped into the tomcat file is ignored by the php parser and spit out as html code. As Html doesn't know php from a hole in the ground, I get some neato errors.

So...what do I need to change (and where please) so that a) php is parsed within the tomcat directory; b) I can make a call to a php script outside the tomcat directory or c) copy, rename, and open the renamed copy using Java (if this is my only option...)

for PHP in the jsp files I've been trying one of the following (with no success)

<script language="php">blah blah blah</script>
and
<?php blah blah blah ?>

Thoughts?
 
Old 11-30-2005, 06:31 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
I think you are in a dead end, PHP and JSP are mutually exclusive.
You'd rather learn using JSP for that task.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about PHP vs. JSP PerfectReign Programming 8 06-10-2005 12:42 PM
[ JSP/JAVA ] MySQL connection fails White R4bbit Programming 4 04-27-2005 08:31 AM
path to jsp/java? chadi Linux - General 0 11-18-2004 09:17 PM
whats better: PHP vs JSP yanix Linux - Software 2 11-15-2004 04:07 AM
java jsp ????? 2 databases Atrocity Programming 2 06-30-2004 10:26 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration