• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JSP configuration issues (displays code)

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, I did not.

- C
 
Tim Holloway
Saloon Keeper
Posts: 27763
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic