Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > JSP Basics
JSP Basics Beginning-level questions on JSP. More advanced coders should post to Pro JSP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the JSP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 29th, 2008, 03:15 AM
Authorized User
Join Date: Dec 2007
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to annumol
Default protect my source code

how to protect my source code which is in webapps from to copy or see others.Please help me

Old March 7th, 2008, 08:03 AM
Friend of Wrox
Join Date: Mar 2007
Posts: 373
Thanks: 0
Thanked 1 Time in 1 Post

First why is the java source code in webapps directory?
If you are worried about jsp code, then jsp code can never be accessed through browser it get compiled and executed into html and be served to browser.
If you think that some will hack you webapps/yourApp directory and get access to it, then you can try placing your jsp pages in your applications WEB-INF directory which is very difficult to get access to. You can probably create a seperate directory like "jsp" and place all your jsps in it.

- Rakesh
Old March 10th, 2008, 07:24 AM
Registered User
Join Date: Jul 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

I'm not sure I understand you correctly but If I do I think you are asking about a technique known as 'code obfuscation'. One of the better ones I've come across is by YGurad. See www.yworks.com here. As for protecting your JSPs and Servlets ie: making it inaccessible from 3rd party access , you could place it in the WEB-INF or META-INF directories. Note: your Java source code is not going to be exposed to the outside world regardless. As a side note web app security(for the purpose of constraining certain resources) should be inherently built into your app using things like authentication and authorizations. There are of course also other advanced ways but since this a beginner's forum I wont get into that .You can configure alot of this in the DDs as for most of the time, the security constraints should be done declaratively.

Similar Threads
Thread Thread Starter Forum Replies Last Post
protect source angelboy C# 2005 1 February 12th, 2007 04:13 PM
Protect .NET source code by obfuscating it??? cyberjoe General .NET 0 December 7th, 2006 03:28 PM
How to protect macro code? kotaiah Excel VBA 1 September 25th, 2006 02:57 PM
Protect my Code tamernice Pro VB.NET 2002/2003 1 May 14th, 2005 06:43 PM
Protect ACCESS CODE liviudiaconu Access VBA 1 February 6th, 2004 10:05 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.