Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP configuration issues (displays code)

 
C Harrison
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having an issue running a custom JSP page on my server, it just displays the source code. It appears like the server is
serving the JSP file as text/plain, with no JSP processing, and without telling the browser that it's actually html.

Here is some information I have on hand not sure how useful it is:
- ran /usr/sbin/httpd2 -M and mod_jk is loaded on the server
- ran /usr/sbin/httpd2 -l and it returned:
Compiled in modules:
core.c
prefork.c
http_core.c
mod_so.c
- ran ps aux | grep -i tomcat and the process was running

- apache: 2.2.15
- tomcat: 6.0.29
- OpenSuse 11.4
- Linux version 2.6.34-12-desktop

I have been stuck at this point for quite some time and am not sure what steps to take to try and resolve this. Any help would be much appreciated!

- C
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch!

The details of how the server was put together are probably not important here, if you're seeing the original JSP text come back to the browser. What we need to determine is why the identity of the JSP isn't properly known.

First question is how you deployed said JSP. Are you set up as a proper J2EE webapp with the JSP in a WAR?
 
C Harrison
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Thanks for the quick response. I am just loading the jsp file manually through apache by using jkmount.

- C
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All jmount does is redirect your URL to the Tomcat server. Apache httpd only routes the traffic and doesn't actually process the JSP in any way.

So the question remains: Did you create a WAR and deploy it in the Tomcat server?
 
C Harrison
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, I did not.

- C
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
C Harrison wrote:No, I did not.

- C


Do so, then.

J2EE is not quite as slapdash as ASP where you can just throw a page at the server and it runs. There are certain architectural requirements for J2EE web applications. On the other hand, there's a reason why ASP is J2EE is one of the preferred platforms for industrial-strength webapps.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic