0

tomcat 7.0.29 and above produces 404 errors

asked 2012-09-27 12:05:03 +0800

mclu gravatar image mclu
33

Hi.

We have used Tomcat 7.0.27 for our ZK application based on ZK 6.5.0.
I have a welcome zul file which uses

<?forward uri="/zk/start.zul"?>

to forward....
This start.zul includes /zk/footer.zul and so on.

After upgrading zu Tomcat 7.0.30 the application is not working any more because it "ignores" or "forget" its application context

So while loading it tries to load the start.zul from the wrong place
Instead of :

http://localhost:8080/MYAPP/zk/start.zul

it load it from
http://localhost:8080/start.zul

And I get:

HTTP Status 404 - /start.zul
type Status report
message /start.zul
description The requested resource (/start.zul) is not available.

This behavior is new since 7.0.29 so 7.0.28 it works.
Is this a known issue? what has changed or what should I do?

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2012-09-30 20:22:50 +0800

mclu gravatar image mclu
33

I investigated this issue a bit.

Seams to be an issue with the forward tag.

I have a small test zul file which forward to the well known hello.zul. This works if its in the same (root) dir.

<?forward uri="hello.zul"?>
<zk>
</zk>

When I put this hello.zul into a subdir like zk and try to forward there I got an 404 exception:

<?forward uri="zk/hello.zul"?>
<zk>
</zk>

or

<?forward uri="/zk/hello.zul"?>
<zk>
</zk>


Any Ideas?

link publish delete flag offensive edit

answered 2012-09-30 20:43:40 +0800

mclu gravatar image mclu
33

Ha... found it out myself...

If I change the subdir from zk to whatever it works again.
Is zk a reserved path name??

Is this a bug?

Greets Markus Lutum

link publish delete flag offensive edit

answered 2012-10-01 04:08:55 +0800

MontyPan gravatar image MontyPan
435 3
http://xitop.blogspot.com...

Hi mclu,

Actually, I can reproduce your issue on Tomcat 7.0.27 / ZK 6.5.0 (not Tomcat version problem), but Jetty 6.1.26 work fine.
I create a issue on ZK tracker: ZK-1380

Regards,
Monty Pan

link publish delete flag offensive edit

answered 2012-10-03 09:05:00 +0800

MontyPan gravatar image MontyPan
435 3
http://xitop.blogspot.com...

Hi mclu,

The issue ZK-1380 is fixed. The key factor is Tomcat's webapp initial routine is changed after Tomcat 7.0.29.
Tomcat 7.0.29 will ignore the version setting in web.xml and always scan anootation.
More detail information, please read Tomcat Changelog.

I can reproduce your issue on Tomcat 7.0.27, because I set web-app version="3.0" in web.xml.
I hereby apologize for provide incorrect information.

Regards,
Monty Pan

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-09-27 12:05:03 +0800

Seen: 210 times

Last updated: Oct 03 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More