Tomcat compiles JSP but all I get is blank

J

jason.tomlins

Everything was fine until I restarted tomcat after just making one
change to a .java file. I recompiled, everything fine, started Tomcat
and now when I access the website the URL resolves as usual but I just
get a blank page, no errors, nothing. All my other webapps under tomcat
are still running fine. Nothing else has changed. I tried deleting the
/work directory to remove cached compiled JSP but still same. The JSPs
even get compiled when requested but are still returning an empty page.

Help. I'm lost on this one.

Thanks.
 
M

muttley

i get this sometimes if the tomcat thread executing the jsp / servlet
throws a low level error. look in the catalina.out and access_log files
for evidence of a 500 internal server error problem.
remove any nice error trapping as this might be hiding the default
stack trace page too.

hth

kev.
 
J

jason.tomlins

Thanks for the tip but no errors being reported in any of the logs.

Arrrggghhhh !!
 
A

Andrew Thompson

Everything was fine until I restarted tomcat after just making one
change to a .java file.

What change?
...I recompiled, everything fine, started Tomcat
and now when I access the website the URL

What is the URL?
...resolves as usual but I just
get a blank page, no errors, nothing.

Are you certain? What is the actual *source* of the page
that arrives in the *browser*. (And no, I'm not suggesting
you post 250 lines of HTML to the group, just a summary
will be fine)

[ Note that '<html><body><h1></h1></body></html>' will render
absolutley *nothing* in a browser. ]

Have you validated the end result of your JSP?

What browsers(s) are you using, and have they been updated
or patched recently?

Does the page use any Javascript?

Note that I might have answered all the above questions
in the time it took to type this (and perhaps solved the
problem) if you'd provided the URL...
 
J

jason.tomlins

The change I made was to a simple string in an area of the app that
would not impact JSPs. Recompilation of the file was fine)

The source returned to the browser is minimal, as in your example, just
a few lines of HTML. The JSPs are validated, no changes to jsps was
done. All was working until Tomcat restart. The jsps get compiled etc.

I am using IE6, no changes there.

Some pages us javascript some dont, the problem persists throughout.

As a test, I created a JSP called index.jsp (it contains no code, just
one line of text) and threw it in http://forums.fooforums.com , a
directory containing JSPs (prior to placing index.jsp in this directory
you could see this list of jsps but clicking on them just returned
blank pages again). This index.jsp gets compiled fine but still renders
a blank page (just minimal html), try for yourself.

Ideas ?

Thanks,
Jason.
 
A

Andrew Thompson


No, unfortunately.

[ The only immediate suspicion I had was that you'd
made a simple HTML error that caused every page to be
'delivered complete' but render incorrectly. Your extra
info. - ruled that out. ]
 
J

jason.tomlins

Well, I resolved the issue. There was a jsp-api.jar in the WEB-INF/lib
directory of the application in question. After removing this jar
everything was fine. Dont ask me.

Jason.
 
R

Roedy Green

I restarted tomcat after just making one
change to a .java file.

It looks to me like the change you made to the .java file (I presume
you meant .jsp file) is the culprit. Back it out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top