For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 8 replies, 3 voices, and was last updated 21 years, 6 months ago by
yax3.
-
AuthorPosts
-
yax3MemberAfter deploying a web project, my JSP pages can only be half displayed. I’m sure the pages have no errors. Last time after I deployed it, same thing had happened. But after quite some tries, it went away by itself. Now I need to redeploy the project, same thing happened again. However, this time I seems not as lucky as last time. 😕
Any suggestions? Thanks a lot!!April 26, 2004 at 3:55 pm #206410
No OperationMemberwhich server do you use?
NOP
April 26, 2004 at 4:00 pm #206411
yax3MemberI’m using Tomcat 5. And MyEclipse version is 3.7.0. Thanks.
April 26, 2004 at 4:19 pm #206413
Riyad KallaMemberyax3,
If you mean that you only see 1/2 the page in your browser, then an exception is being thrown while the page is processing. If you don’t see anything in the MyEclipse console, open up your Tomcat log file (<TOMCAT INSTALL>\logs\) as the output will be there.Its usually a good idea to setup a logger for each app you are working on, so you can segregate the exceptions and messages for each app to their own logger. NOTE: This is a Tomcat functionality, it has nothing to do with MyEclipse, I was only making a “good practice” suggestion.
April 27, 2004 at 10:15 am #206425
yax3MemberThanks a lot, Riyad. By checking the tomcat log, I did find what the problem is. 🙂
Just a quick question though concerning your reply: how to set up a logger for each app?April 27, 2004 at 10:40 am #206427
Riyad KallaMemberAhh, good question. You can fire up the Tomcat Administrator (http://localhost:8080, click “Administrator” when Tomcat is running) and do it from there. Expand the Host node, then 1 other node and you should see your Web App’s Context node (along with some others), if you click that, then look in the right panel, in the dropdown is an option “Create New Logger”.
OR you can edit the .XML file for your context directly and add something that looks like this to the top of it (right after the <context open tag):
<Logger className="org.apache.catalina.logger.FileLogger" prefix="myapp_log." suffix=".txt" timestamp="true" verbosity="0"/>Where “myapp” is the name of your app. This will create log files for you in your log dir named similar to the localhost_ files that are there already.
April 27, 2004 at 1:27 pm #206432
yax3MemberRiyad, Sorry I came back with more questions. 😳
For your first method, I didn’t find username and pw to log into admin page. Where can I look for the info? I tried the user name and pw in tomcat-users.xml, none of them works.
For the second one: I found I can modify server.xml under <Tomcat install dir>/conf/ to specify the log info. But the contents of the log would be the same as the “localhost_log” already there in the logs/ folder. And I can only have one log file — if I add the logger to specify myapp_log, the original one would not be logged any more.
Then I tried modifying admin.xml under <Tomcat install dir>/conf/Catalina/localhost, add the logger right after the context open tag. It didn’t work. I also tried the admin.xml under <Tomcat Install dir>/server/webapps/admin, it still didn’t work. Which xml file should I change?
Thanks!April 27, 2004 at 1:40 pm #206433
Riyad KallaMemberRiyad, Sorry I came back with more questions.
No problem, that is what we are here for.
For your first method, I didn’t find username and pw to log into admin page.
Please check the Tomcat docs, you need to define the ‘admin’ and optionally ‘manager’ roles and logins. They are NOT in the users file for security reasons. An example, my Tomcat-users looks like this:
<?xml version='1.0' encoding='utf-8'?> <tomcat-users> <role rolename="tomcat"/> <role rolename="role1"/> <role rolename="manager"/> <role rolename="admin"/> <user username="tomcat" password="tomcat" roles="tomcat"/> <user username="both" password="tomcat" roles="tomcat,role1"/> <user username="role1" password="tomcat" roles="role1"/> <user username="admin" password="admin" roles="admin,manager"/> </tomcat-users>For the second one: I found I can modify server.xml under <Tomcat install dir>/conf/ to specify the log info.
You need to setup a permanent context (using the admin tool or by hand) for your webapp. This will create its very own appName.xml file under <Tomcat Inst>/conf/Catalina/localhost directory. Its in THAT file that you add the logged, or just use the admin tool to do it and use the settings I gave you above.
Then I tried modifying admin.xml under <Tomcat install dir>/conf/Catalina/localhost, add the logger right after the context open tag.
Bad idea, that is the context for the admin module, it already has a logger setup if I’m not mistaken. Each webapp will get its own XML file. The reason you don’t have one now for your existing app that you have been running is *probably* because you have Tomcat configured to hot-deploy WAR files that are dropped in, in which case a temporary in-memory context is created. To setup a logger make this context permanent by creating it yourself.
I need to cut this thread off here as we’ve diverged pretty far from MyEclipse support, I hope I’ve given you enough info to run with.
April 27, 2004 at 2:14 pm #206434
yax3MemberRiyad, Thank you very much for your resourceful response! 🙂
-
AuthorPosts
