aspose file tools*
The moose likes JSP and the fly likes weired wep application error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "weired wep application error" Watch "weired wep application error" New topic
Author

weired wep application error

Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

hi guys,

we are developing a web application that we test on both a local tomcat server (version 5.0) and also on a remote tomcat server (same version).

in first versions of application things were ok on both local & remote servers-
after we added an applet to our application-and this applet is not loaded until user logs in to our web app system..
now when we tested latest ver on the local server things look OK.
but the problem is that -on our remote server-the index.jsp file doesn't display at all -even before any call to applet & we get the below exception .

the other annoying problem is that our ISP said they couldn't provide log files of tomcat ...

i can't figure out the cause of this obscure error. any Ideas guys ?

thanks.


Herman Schelti
Ranch Hand

Joined: Jul 17, 2006
Posts: 387
hi othman,

If your ISP can't find Tomcat log files...

Can you post the code of your index.jsp>
Did you try if even a very simple index.jsp or other page compiles remotely.
(just to check if that is still possible).

Herman
Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

thanks Herman for prompt reply.

yes the previous versions are still on remote server & they run ok.

here is the index.jsp file :



and here is leftNavBar.jsp

Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

one change i added in last version is in bean User:
i made this class User implements Serializable.
could this be a problem ?
that's the only change i can think of now.

i would appreciate your help guys
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Compile failed; see the compiler error output for details.
org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:938)
org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:407)





Are you using ant to precompile all the jsps up on your production machine?

When doing so, it is a good idea to name files that are to be included with the <%@ include ...%> tag with a ".jspf" extension.

The pre-compiler task will look for all files with a '.jsp' extension and try to compile them. Often files meant for static include do not contain everything needed to compiled and run as standalone JSPs. Changing the extension causes ant to ignore these files except as includes.

I don't see anything wrong with your index.jsp page or the include you've posted but, if the production environment is trying to compile everything before running, any problem in any JSP will keep the app from starting up.
[ July 20, 2007: Message edited by: Ben Souther ]

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Also, if your hosting company can't give you access to your own logs, you may want to consider shopping around for one that can.
Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

Originally posted by Ben Souther:





Are you using ant to precompile all the jsps up on your production machine?

When doing so, it is a good idea to name files that are to be included with the <%@ include ...%> tag with a ".jspf" extension.

The pre-compiler task will look for all files with a '.jsp' extension and try to compile them. Often files meant for static include do not contain everything needed to compiled and run as standalone JSPs. Changing the extension causes ant to ignore these files except as includes.

I don't see anything wrong with your index.jsp page or the include you've posted but, if the production environment is trying to compile everything before running, any problem in any JSP will keep the app from starting up.

[ July 20, 2007: Message edited by: Ben Souther ]


thanks ben,
i tried what you suggest but things are worse now -no jsp page could be displayed at all with this jspf extension.
I told the guys to change the ISP asap...
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You did, exactly what?.

What I was suggesting is that you change the file extensions of the file that are to be included in other pages with the static include directive.

Of course if you do this, you need to change the file="" property in the directive tags.

Is this what you've done?
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

You did, exactly what?.

What I was suggesting is that you change the file extensions of the files that are to be included in other pages with the static include directive.

Of course if you do this, you need to change the file="" property in the directive tags.

Is this what you've done?
Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

sorry it seems i didn't got your point well.

can you explain the solution more clearly ?

thanks.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Well before you change anything, answer my earlier question.
Are you (or your hosting company) using ANT to pre-compile all of the JSPs in the application before or during deployment?

If no, then none of what I've said applies.

If yes, it's possible that you have a file, which could not be compiled on its own with Jasper, that has a file extension of ".jsp".
If this is the case, Jasper (the JSP compiler) may be blowing up when it sees one of these files. The solution to this problem, if it exists, is to change the extension for files which are only used as static includes from ".jsp" to something else ('.jspf' has become the convention for these fragment files).

Note, you wouldn't want to do this with files that are being included with the jsp:include action. Those files need to have a ".jsp" extension.
Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

i changed all include tags with <jsp:include page="url.." flush="true"/>

but still no luck !

what puzzles me is that this app was working before & i didn't touched the jsp code at all in new version-i only worked on java code for a client applet-.
& now the jsp web app refuses to run at all !
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by othman El Moulat:
i changed all include tags with <jsp:include page="url.." flush="true"/>


Why did you do that?

Why are you changing anything?

From my last post:
Well before you change anything, answer my earlier question.
Are you (or your hosting company) using ANT to pre-compile all of the JSPs in the application before or during deployment?


You still haven't answered that and nobody suggested changing your includes from directives to actions.
If this is production code, you should really stop grabbing at straws and make sure you understand what you are about to do before you do it.

Are you pre-compiling your JSPs on the production machine?
Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

Originally posted by Ben Souther:



Are you pre-compiling your JSPs on the production machine?


i don't know.this question should be asked to ISP. i know nothing about production server.
Yahya Elyasse
Ranch Hand

Joined: Jul 07, 2005
Posts: 510

Originally posted by Ben Souther:


You still haven't answered that and nobody suggested changing your includes from directives to actions.
If this is production code, you should really stop grabbing at straws and make sure you understand what you are about to do before you do it.

i didn't like your offending way of replying..
this gives impression i don't know what I'm doing !
makes me feel bad!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61648
    
  67

Originally posted by othman El Moulat:

i didn't like your offending way of replying..


Ben is trying his best and hardest to help you. He is, in fact begin very patient and helpful. You can best help yourself by paying attention to what he is trying to tell you rather than being offended where no offense is intended or warranted.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: weired wep application error