Previous Thread
Next Thread
Print Thread
Hop To
#187893 06/20/2007 1:58 PM
Joined: Dec 2003
Posts: 70
H
journeyman
journeyman
H Offline
Joined: Dec 2003
Posts: 70
Our site was created using JSP. I'm trying to get a post island working on our main page but the page is .jsp NOT .php. Are there any work arounds for .jsp pages? My web guy suggests javascripts. Is there a javascript version I can use?

Simply changing the file suffix to .php won't work, at least according to him.

Any help would be appreciated.

-Harry

Joined: Jun 2006
Posts: 196
I
enthusiast
enthusiast
I Offline
Joined: Jun 2006
Posts: 196
You could create a php script that did the normal includes and just printed out the result, escaped with javascript

Something like
Code
<?php
ob_start();
// This is where the include code specified in the control panel would go
$out = ob_get_contents();
ob_end_clean();

header('Content-type: text/javascript');
echo "document.write('" . str_replace("'", "\\'", $out) . "');";
?>

You would include this script as such

Code
<script type="text/javascript" src="/script_i_just_made.php"></script>

Joined: Dec 2003
Posts: 70
H
journeyman
journeyman
H Offline
Joined: Dec 2003
Posts: 70
Ian,
I really appreciate the help. You have to pardon me as I know very minimal html. So would you mind giving me step by step directions.

For example, the two pieces of code you provided, where do I put that? Thanks for your help. I'm sure I'm going to have more questions.

Joined: Dec 2003
Posts: 70
H
journeyman
journeyman
H Offline
Joined: Dec 2003
Posts: 70
The above suggestion doesn't make sense to me because a .jsp page wouldn't be able to read php coding, right?

I need advice. Is it impossible, as my friend suggests, that the content islands which are now in php cannot be installed in jsp pages? Is there another work-around?

I really like this feature before the upgrade to php. We've not had this feature in a awhile and I miss it. I think it added a lot of value to our jsp-enabled site.

Joined: Jun 2006
Posts: 16,532
Likes: 150
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,532
Likes: 150
You could use a php include to snag the parsed version of your jsp page


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
PHP 8 bug in membermanage.tmpl
by phoenix011235 - 09/08/2026 7:47 PM
Are any of these legitmate?
by Baldeagle - 09/06/2026 1:37 PM
After server reboot
by Morgan - 09/02/2026 8:27 AM
Email Settings
by Outdoorking - 05/13/2026 2:44 AM
Who's Online Now
0 members (), 171 guests, and 128 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Ride safe!
Ride safe!
by Morgan, December 7
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 8.1.0
(Snapshot build 20260527)