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

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

RaghupalReddyAsked:
Who is Participating?
 
rrzCommented:
>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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.