Jonathan
Jonathan

Reputation: 11

How secure are classes used by JSP Pages?

If I have a form on a JSP page, and the form passes its data to a simple java file (.class) that I have written, which returns some sort of data that is printed to the user on a new page. Would that java file itself be accessible to users of the website ? In other words, would it be possible for a user to locate that .class file and download it ? If so, how can I prevent that from happening?

Upvotes: 0

Views: 279

Answers (2)

Ben
Ben

Reputation: 2801

short answer is no.

Longer answer, any .class file that runs on the client side they will have access to but any class that runs on the server side they will not have access to.

Upvotes: 0

Sean
Sean

Reputation: 7737

no they would not be able to download the class files, the servlet container running your application would have all the class files under WEB-INF/classes. Anything under the WEB-INF folder is not publicly visible.

Upvotes: 3

Related Questions