www.webdeveloper.com
Results 1 to 2 of 2

Thread: Dynamic Link ? from PHP to JSP..HELP!

  1. #1
    Join Date
    Jun 2004
    Location
    los angeles
    Posts
    324

    Red face Dynamic Link ? from PHP to JSP..HELP!

    hello, I have a scriptlet question..I have never written code in JSP. I need to turn the following code from PHP into JSP..(dynamic link):

    PHP Code:
    <?php
    if(isset($_GET['menu'])) {
        
    $mnu $_GET['menu'];
    } else {
        
    $mnu "home";
    }
    ?>

    <?php
    if($mnu == "comm") { 
    ?>
    <li class="arrow-down"><a href="/menus/itstf/default.htm"><b>Communication</b></a><ul>
    <li><a target="_blank" href="/transform/pxframe.htm?urlid=http://www2.pepperdine.edu/intra/it/pepperdinexpress/statusreports.htm">
       Status Reports</a></li>
    </ul></li>
    <?php
    } else {
    ?>
    <li><a href="/menus/itstf/default.htm?menu=comm"><b>Communication</b></a></li>
    <?php
    }

    if(
    $mnu == "language") { 
    ?>
    <li class="arrow-down"><a href="/menus/itstf/default.htm"><b>Communication</b></a><ul>
    <li><a target="_blank" href="/transform/pxframe.htm?urlid=http://www2.pepperdine.edu/intra/it/pepperdinexpress/statusreports.htm">
       Status Reports</a></li>
    </ul></li>
    <?php
    } else {
    ?>
    <li><a href="/menus/itstf/default.htm?menu=comm"><b>Communication</b></a></li>
    <?php
    }
    can someone please assist me or guide me the right directions. THANKS!

  2. #2
    Join Date
    Nov 2003
    Location
    Jerryville, Tejas
    Posts
    11,715
    First I have no idea what $_GET is.
    Code:
    <% String mnu = "home";
       if ( ??the _GET thing?? ) mnu = "comm";
    %>
    
    <% if (mnu.equals("home")) { %>
    ...
    <% } else { %>
    ...
    <% } %>
    As you can see the syntax is VERY similar.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles