3 Replies - 3380 Views - Last Post: 23 August 2012 - 05:29 PM

#1 andre1011  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 87
  • Joined: 12-January 11

Xampp, Tomcat, .jsp

Posted 21 August 2012 - 09:01 PM

Hello I am using Tomcat with Xampp 1.8 to serve .jsp pages but the browser (Firefox 14) show the source code on the served page when it is in the xampp/tomcat/webapps folder. If I move the .jsp file to the xampp/webapps/examples folder the .jsp works. Why? By the way what is a WEB-INF folder?

<%@page contentType="text/html" import="java.util.*" %>
<HTML>
 <HEAD>
  <TITLE>Hello World</TITLE>
 </HEAD>
 <BODY>
  <H1>Hello World</H1>
  Today is: <%= new java.util.Date() %>
 </BODY>
</HTML>



Is This A Good Question/Topic? 0
  • +

Replies To: Xampp, Tomcat, .jsp

#2 fromTheSprawl  Icon User is offline

  • Monomania
  • member icon

Reputation: 513
  • View blog
  • Posts: 2,056
  • Joined: 28-December 10

Re: Xampp, Tomcat, .jsp

Posted 21 August 2012 - 10:14 PM

The webapps folder contains all the projects you want to deploy, separated by folders per project. In this case, examples is treated as a project. It is called webapps because it is assumed you'll put multiple web applications inside it and the root folder of a project is the one visible on the webapps folder view.

The WEB-INF folder contains your configurations and class files. This is where all the compiled java classes are dumped. It is also used for resources you don't want outside users getting access to, like the aforementioned config files. ^^
Was This Post Helpful? 1
  • +
  • -

#3 andre1011  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 87
  • Joined: 12-January 11

Re: Xampp, Tomcat, .jsp

Posted 23 August 2012 - 09:04 AM

Thank You for this information. I understand now.
Was This Post Helpful? 0
  • +
  • -

#4 fromTheSprawl  Icon User is offline

  • Monomania
  • member icon

Reputation: 513
  • View blog
  • Posts: 2,056
  • Joined: 28-December 10

Re: Xampp, Tomcat, .jsp

Posted 23 August 2012 - 05:29 PM

No problem. ^^
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1