[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 234
  • Last Modified:

How do I hide the included file form viewers in JSP page?

In my JSP page, I use <%@ include file="test.txt" %> include a file, but I don't want viewers to see this file, do you know a way to do it?

Thanks.
0
jen2483
Asked:
jen2483
  • 5
  • 5
1 Solution
 
petmagdyCommented:
Do u mean hiding this text file from the browser viewers or people have access to the JSP code?
0
 
jen2483Author Commented:
Yes, I don't want to display the file on JSP page.
0
 
petmagdyCommented:
then remove it
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
jen2483Author Commented:
I will use this file when I do bandwidth test, the file is very big file, I use it to test the loading speed. I can remove it!
0
 
jen2483Author Commented:
I mean I can not remove it!
0
 
petmagdyCommented:
try this:

<!--
<%@ include file="test.txt" %>
-->
0
 
jen2483Author Commented:
I tried, it doesn't work.
0
 
petmagdyCommented:
what is ur jsp page content type?

because I tried this on my machine and it works
0
 
jen2483Author Commented:
Acctually I put it on a widget, then put it on my page. I tried on a single page, it works, but I don't know why it doesn't work on my widget.
0
 
petmagdyCommented:
for the comments to hide (<!--   -->) the page content-type should be "text/html"

Another thing what do u mean by a widget??
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.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now