Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why the server doesn't compile my JSP page ?

Status
Not open for further replies.

javdeit

Programmer
Nov 17, 2003
4
IT
Greetings, i'm a beginner in Servlet/JSP, i'm trying to execute a simple JSP page on the server where is hosted my site.
The server use Resin server for J2EE application.
When i try to execute this page :

<%@ page contentType=&quot;text/html&quot;%>
<html>
<head><title>JSP Page</title></head>
<body>
<%= &quot;Java Server Page&quot;%>
</body>
</html>

i got a blank page only.
When i browse the html code, i found the same code i wrote; the server seems doesn't recognize the JSP page.
 
Sounds like you are running a static web server like Apache, and this server is not forwarding your requests for JSP through the servlet container ...
 
and check if u have named the file as .jsp...

Known is handfull, Unknown is worldfull
 
The web server is indeed Apache and the page suffix is .jsp .
I tried to ask to my web site host many times, they said me all works fine.
I'll try to ask'em again...
 
The web server is indeed Apache and the page suffix is .jsp .
I tried to ask to my web site host many times, they said me all work fine.
I'll try to ask'em again...
 
byam : He says he is already running resin.

It sounds like the JKMount in apache is not there - so any request URL for his &quot;JSP&quot; area of the site is not being forwarded to resin from apache ...
 
I want to wait before submitting a query to my web site host, i wanna be sure there's no other mistakes by my self.
I read carefully Resin site if there's a particular way to deploy a JSP page, but i can't found it.
I thought maybe it needs to be packaged or so, but they say to deploy a simple JSP page in the main directory as a simple text file with a .jsp extension.
Do i need specify a .xml descriptor anyway?
 
If you just deploy JSP pages to existing web appliation. you can just copy JSP files to existing webapps folder. However, if you want to deploy a whole new web site/application, you will need to package your web application into a WAR file. It's basically a jar file from the top-level directory of the web application, which must include:

/WEB-INF/classes - all necessary class file
/WEB-INF/lib - any require external java package lib
/WEB-INF/web.xml - depolyment descriptor

Once you create a WAR file, copy that to the webapps directory of Resin. Restart Resin, and it will automatically depoly the site for you. The context path of your site would be the name of the war file. e.g. Let say you name the war file as MySite.war, then to access your site, the URL would be To deploy the site to Root context, name the war file to ROOT.war.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top