Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is there a way to prevent viewing source codes  RSS feed

 
Anil Verghese
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is there a way to avoid people from viewing the source code of my jsp pages?

Anil
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When the JSP is delivered to the browser, only the rendered HTML can be viewed by the end user.

Besides, modern JSP pages shouldn't contain any source code.
 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you want to hide the source code from being viewed once the application is developed, is it?

If this is the case, you can precompile jsp pages.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moreover, in a modern web application following the Model 2 pattern, the JSP pages are typically deployed within the hierarchy of the WEB-INF folder which prevents direct access of any kind.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!