Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to refer a html using file system path in an html which is deployed in war file?  RSS feed

 
yogi reddy
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I think I have a got requirement. I have 3 html pages out of which 2 (dash.htm and domain_list.html are under the same app root in tomcat webapps) are deployed in a war file and the 3rd html (out.html) will not be a part of war file. But I have to include the 3 page which is somewhere located in the system. I have listed below the html files. The domain_list.html is getting included but out.html is coming up as blank.

Any thoughts or suggestion on this is really appreciated.

dash.htm
********

<html>
<frameset cols="150,*">
<frame src="domain_list.html">
<frame src="C:\result\out.html">
</frameset>
</html>

out.html
*******

I am not adding the entire text in here

<html>
<body>
This is a Out HTML
<body>
/</html>

Thanks,
Yogesh
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using a file path is a disaster. It has no chance of working on any system but yours. None. Do really think everyone is going to have a copy of that file on their C drive? Or even have a C drive?

Why can't that file simply be moved into the web app as part of the build process? Why make things hard?
 
yogi reddy
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear,

Thanks a lot for your immediate response.

Actually I am trying to help out my friend here, his exact requirement is to refer DOMAIN1_out.htm in /wls_domains/wlrmar04/Domain_Monitor/DOMAIN1/ in the unix system.

I have already suggested him to have this file also part of the war.

Just curious if the above requirement can be implemented without deploying in war file.

As always Thanks,
Yogesh
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The hard way would be to implement a servlet to read the file off the disk and stream it.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's a C drive?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
David Newton wrote:What's a C drive?

Hmmmm, c is the speed of light, so maybe it's a new rocket engine that approaches light speed? ;)

Seriously, is it understood why file paths in web pages will never work?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!