taglib and html problem

Posted on 2003-12-08
Last Modified: 2013-11-24
Hello everyone, below is a test.jsp coding, in the locator portion, i tried to incorporate a jsp string below to make my file name  dynamic but keeping the "file///:C:/" potion static. how can i do that? i tried the coding below and the error given is file not found. How can i slove that? Thanks a lot.

<%@ taglib uri = "http://coyote/taglibs" prefix="m" %>
<title>Test Streaming</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<% String filename = "friend.avi";%>
<m:slides IPAddress  = "" port = "3336" type = "mixed" locator= "file:///C:/<%=filename%>"/>
Question by:ahnui
LVL 14

Accepted Solution

kennethxu earned 125 total points
ID: 9898498
it should be as:
<m:slides IPAddress  = "" port = "3336" type = "mixed" locator='<%="file:///C:/" + filename%>'/>

or this version is more easier to read:

<% String fullPath = "file:///C:/" + filename"; %>
<m:slides IPAddress  = "" port = "3336" type = "mixed" locator= "<%=fullPath%>"/>


Author Comment

ID: 9898887
thanks kennethxu,

i managed to think of the solution along that line too....what i have was

<% String fullPath = "file:///C:/" + filename; %>
<m:slides IPAddress  = "" port = "3336" type = "mixed" locator= "<%=fullPath%>"/>

but they works the same!!!! thanks again

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
My project did see openJDK that I installed. What could be the problem 7 160
json format text only 4 100
servlet example issue 6 56
dao vs facade design patterns 2 29
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

680 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question