免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12345下一页
最近访问板块 发新帖
查看: 17297 | 回复: 46

TOMCAT不符合J2EE标准!! 大家尽量别用。 [复制链接]

论坛徽章:
0
发表于 2005-02-23 08:44 |显示全部楼层
URL是这种地址:
http://localhost:8080/struts-example/editRegistration.do

TOMCAT4.x:结果也是
http://localhost:8080/struts-example/editRegistration.do

websphere 6.0 结果
http://localhost:8080/struts-example/registration.jsp

weblogic 8.1 结果
http://localhost:8080/struts-example/registration.jsp

TOMCAT不符合J2EE标准!! 大家尽量别用。

将来应用服务移植会有问题。

论坛徽章:
0
发表于 2005-02-23 09:37 |显示全部楼层

TOMCAT不符合J2EE标准!! 大家尽量别用。

原帖由 "lamei" 发表:
URL是这种地址:
TOMCAT不符合J2EE标准!! 大家尽量别用。

将来应用服务移植会有问题。
  

论坛徽章:
0
发表于 2005-02-23 10:29 |显示全部楼层

TOMCAT不符合J2EE标准!! 大家尽量别用。

楼主的意思是文件 扩展名 不同就不符合J2EE标准?

论坛徽章:
0
发表于 2005-02-23 10:30 |显示全部楼层

TOMCAT不符合J2EE标准!! 大家尽量别用。

原帖由 "lamei" 发表:
URL是这种地址:
将来应用服务移植会有问题


会有什么问题啊?楼主

论坛徽章:
0
发表于 2005-02-23 11:13 |显示全部楼层

TOMCAT不符合J2EE标准!! 大家尽量别用。

[quote]原帖由 "ruknow"]楼主的意思是文件 扩展名 不同就不符合J2EE标准?[/quote 发表:


不是扩展名不同。而是页面转发之后,获取的实际地址不同。


J2EE规范应该获取真正的目的页面名称。

而不是URL地址上虚地址。。


大家现在都在用什么中间件?

论坛徽章:
0
发表于 2005-02-23 11:59 |显示全部楼层

TOMCAT不符合J2EE标准!! 大家尽量别用。

原帖由 "lamei" 发表:


悟空,你又在吓为师的了...


真的又有多少应用要移植,就算要移植也只要支持STRUTS就行

  

论坛徽章:
0
发表于 2005-02-23 13:15 |显示全部楼层

TOMCAT不符合J2EE标准!! 大家尽量别用。

Tomcat 确实存在这种问题,但可以有一个work around

  1. /*
  2. * Created on 2004-12-15
  3. */
  4. package com.jilaninfo.app;

  5. import java.io.IOException;
  6. import java.io.PrintWriter;

  7. import javax.servlet.ServletException;
  8. import javax.servlet.http.HttpServlet;
  9. import javax.servlet.http.HttpServletRequest;
  10. import javax.servlet.http.HttpServletResponse;

  11. /**
  12. * @author elgs
  13. */
  14. public class InterServlet extends HttpServlet
  15. {
  16.     public void doGet(HttpServletRequest request, HttpServletResponse response)
  17.             throws ServletException, IOException
  18.     {

  19.         response.setContentType("text/html; charset=GBK");
  20.         PrintWriter out = response.getWriter();
  21.         String location = request.getParameter("location");
  22.         location = location.replaceAll(Const.QM, "?");
  23.         location = location.replaceAll(Const.NM, "&");
  24.         out
  25.                 .println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">;");
  26.         out.println("<HTML>;");
  27.         out.println("  <HEAD>;<TITLE>;Please wait...</TITLE>;");
  28.         out
  29.                 .println("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gbk\">;");
  30.         out.println("<meta http-equiv=\"refresh\" content=\"0;URL=" + location
  31.                 + "\">;");
  32.         out.println("</HEAD>;");
  33.         out.println("  <BODY>;");
  34.         out.println("  </BODY>;");
  35.         out.println("</HTML>;");
  36.         out.flush();
  37.         out.close();
  38.     }

  39.     public void doPost(HttpServletRequest request, HttpServletResponse response)
  40.             throws ServletException, IOException
  41.     {
  42.         doGet(request, response);
  43.     }

  44. }
复制代码


然后所有东西都转发给它。

论坛徽章:
0
发表于 2005-02-23 13:35 |显示全部楼层

TOMCAT不符合J2EE标准!! 大家尽量别用。

原帖由 "ruknow" 发表:


真的又有多少应用要移植,就算要移植也只要支持STRUTS就行

  



姑娘看来不太明白。  STRUTS 也是基于jsp 与 servlet 的标准呀?

STRUTS 只是在jsp 与 servlet  实现了更多的功能罢了。。

论坛徽章:
0
发表于 2005-02-24 09:44 |显示全部楼层

TOMCAT不符合J2EE标准!! 大家尽量别用。

就因为不符合什么标准就不用?

论坛徽章:
0
发表于 2005-02-24 09:52 |显示全部楼层

TOMCAT不符合J2EE标准!! 大家尽量别用。

tomcat一般都是拿了玩的
真正的项目,
只要是稍微大一点的有谁用它?
楼主多虑了
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP