Advertisement

07.09.2008 at 10:11PM PDT, ID: 23552716
[x]
Attachment Details

correct jsp import code with variable

Asked by spydesign in Java Server Pages (JSP), New to Java Programming

Tags: JSP

I normally work in PHP, but want to import a php page to jsp.  I have the following code and the idea is to read a variable from the browser URL, then pass that variable through to the import so it can be used by php.

<%@ page language="java" contentType="text/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
<% String room_id = request.getParameter("room_id"); %>
<c:import url="http://mydomain.com/test.php?room_id=<%=room_id%>" />

Obviously this is wrong. Can anyone tell me how to add the String value to the import url?

Thanks!!
Start Free Trial
[+][-]07.09.2008 at 10:15PM PDT, ID: 21970570

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.09.2008 at 11:14PM PDT, ID: 21970767

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Java Server Pages (JSP), New to Java Programming
Tags: JSP
Sign Up Now!
Solution Provided By: objects
Participating Experts: 2
Solution Grade: A
 
 
[+][-]07.10.2008 at 01:25AM PDT, ID: 21971380

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628