G-WAN URI servlet的剖析 [英] Anatomy of G-WAN URI servlets

查看:102
本文介绍了G-WAN URI servlet的剖析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以通过http://domainName.com/strangesubfolder/?inc

访问

gwan/csp/strangesubfolder/inc.c

我觉得这个servlet映射很奇怪,但是很适合我的需求.我在gwan用户手册中找不到映射说明.

如果我错了,请纠正我,并确认这是否是预期的行为.

解决方案

是的,这是标准功能.

?"告诉G-WAN它是一个servlet.如果没有?"它将在WWW文件夹中查找文件.

更新:

现在我明白您的困惑了.

自版本3.3.27以来,此更改已更改,因此用户可以轻松创建静态URL.

G-WAN时间线

阅读2012年3月27日的更新.

现在您需要放置'?'在实际的servlet名称之前.通过这样做,G-WAN可以有效地将"/"重写为&"因此您可以使用类似这样的Restful URL,而无需编写任何代码.

//Old way
http://domain/?user/profile&user1
http://domain/?blog/archive&2012&march

//New way (more restful no '&')
http://domain/user/?profile/user1
http://domain/blog/?archive/2012/march

gwan/csp/strangesubfolder/inc.c can be visited via http://domainName.com/strangesubfolder/?inc

I feel this servlet mapping strange but that suits my need. I can't find the mapping description in the gwan user's manual.

Please correct me if I am wrong and confirm if it is the expected behavior.

解决方案

Yes it is a standard feature.

The '?' tells G-WAN that it is a servlet. If there's no '?' it will look for the file in WWW folder.

Update:

Now I understand your confusion.

Since version release 3.3.27 this has been changed so users can easily make restful URL's

G-WAN timeline

Read the update for March 27 2012.

Now you need to place the '?' before the actual servlet name. By doing this G-WAN can efficiently rewrite '/' to '&' so you can use restful URL's like these without writing any code.

//Old way
http://domain/?user/profile&user1
http://domain/?blog/archive&2012&march

//New way (more restful no '&')
http://domain/user/?profile/user1
http://domain/blog/?archive/2012/march

这篇关于G-WAN URI servlet的剖析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆