?
Solved

how to create a directory in web.xml file i want  to store  .xml file dynamically generated into this directory?

Posted on 2009-04-25
2
Medium Priority
?
284 Views
Last Modified: 2013-11-19
how to create a directory in web.xml file i want  to store  .xml file dynamically generated into this directory?

i am using jwplayer and playlist  using xml file so i want to store dynamically generated playlist.xml
file into the directory.I don't know how to set the absolute path in File f=new File("-- - -  - -");for this
dynamically generate playlist.xml file.
please help me?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"  "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
 </head>
 <body>
 <jsp:include page="header.xhtml"></jsp:include>
  <script type="text/javascript" src="swfobject1.js"></script>
 
  <div id="player"  style="position:absolute;left:300px;top:200px;bgcolor:white;width:500px;height:400px;">This text will be replaced</div>
 
  <script type="text/javascript">
    var so = new SWFObject('player-viral.swf', 'mpl', '380', '280', '8');
        so.addParam('allowscriptaccess',     'always');
        so.addParam('allowfullscreen',       'true');
        so.addVariable('file',               '<%=session.getAttribute("flv")%>');
        so.addVariable('width',              '770');
        so.addVariable('height',             '380');
        so.addVariable('displaywidth',       '550');
        so.addVariable('backcolor',          '0xFFFFFF');
        so.addVariable('frontcolor',         '0x6666FF');
        so.addVariable('bufferlength',       '5');
        so.addVariable('overstretch',        'fit');
        so.addVariable('autoscroll',         'true');
        so.addVariable('thumbsinplaylist',   'true');
        so.addVariable('autostart',          'true');
        so.write('player');
  </script>
 
</body>
</html>

Open in new window

0
Comment
Question by:RaghupalReddy
1 Comment
 
LVL 28

Accepted Solution

by:
rrz earned 2000 total points
ID: 24235406
>how to set the absolute path in File f=new File("-- - -  - -");for this dynamically generate playlist.xml file.
Where do you want to create the file  ?
If you want to create it in your webe app's root folder, then you can use the following in a JSP.
String path =  application.getRealPath("/playlist.xml");
File f = new File(path);
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

840 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