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,300
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,300
Likes: 116
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, Scouters World
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
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Who's Online Now
0 members (), 736 guests, and 155 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240505)