myeclipse

myeclipse开发javaweb难点总结

心不动则不痛 提交于 2019-12-16 14:02:25
修改项目部署名:右键项目首选项—搜web 创建servlet:先在src下面建包,com.yhh.servlet,然后建新servlet,第二页改url为别名,这种方法xml会自动配置好 配置哪个服务器运行哪个项目:菜单栏找服务器图标,点下拉菜单,找Manage Deployments 重定向(resp.sendredirect)和请求转发(req.getRequestDispatcher)的区别是:重定向刷新后页面不会再变,;而请求转发刷新后会回到登陆前的状态 请求转发地址栏没变,重定向地址栏变为新页面 Cookie是把用户不同请求使用需要使用的相同数据存在浏览器里 操作:设置cookie页面ck,第一次访问ck正常登陆,利用c.setPath(“/login/ck”)在ck这个页面添加cookie,第二次访问执行ck的servlet中检查代码,检查到有cookie,则自动执行跳转到“/login/main”,这个跳转还是ck的servlet中的代码 Session指的是在一段时间内,单个用户与web服务器的一连串相关交互过程 写一些全局共享变量或路径,最好写道web.xml中作为全局变量,好处是将代码与变量解耦 Servlet的<load-on-startup>属性,是指启动时自动加载这个Servlet,并调用其init()方法,其值含义表示被加载顺序,越小越先

java was started but returned exit code = -1073740771

做~自己de王妃 提交于 2019-12-13 03:35:50
问题 Maybe some people have encountered this problem, but my question is quite strange. After the recent reloading, My eclipse 2014 was installed. After each close, the following dialog box is popped up. What's the problem? Error screenshot The following is my MyEclipse configuration: #utf8 (do not remove) -startup plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar --launcher.library plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_64_3.2.0.v201103301700 -vm binary/com.sun.java

HTTP Status 404 - The requested resource is not available

拟墨画扇 提交于 2019-12-12 20:13:52
问题 I'm running into a recurring problem while using the Tomcat server within the MyEclipse IDE, with the Struts 2 framework. I'm running my program as a server application and when it runs the default index.jsp file will open successfully but none of the other pasts of the application will work. When trying to load any of my my .do pages, I get the following error: HTTP Status 404: The requested resource .... is not available. When I ran into this error previously, I just restarted the server

Regex to match start of line and end of line for quick find and replace

六眼飞鱼酱① 提交于 2019-12-11 16:46:32
问题 Hey guys I've got a whole lot of HTML to format with myString + "<somehtml></somehtml>"; Need 2 regex things, one to replace all new lines with myString + " and one to replace all end of lines with "; Just using MyEclipse, Find and replace with regex enabled. Could anyone help me out? 回答1: Individual regular expression engines may vary, but generally speaking, '^' will match the beginning of a line and '$' will match the end of a line. 来源: https://stackoverflow.com/questions/10003908/regex-to

pmd rule for checking java code for comments

此生再无相见时 提交于 2019-12-11 07:35:42
问题 i need a PMD java class for checking comments on java code. I am working on MyEclipse IDE. any idea? 回答1: You don't need a PMD rule, you can use the internal compiler to raise missing documentation as warning (or even error). Look under Eclipse preferences -> Java -> Compiler -> JavaDoc 来源: https://stackoverflow.com/questions/3965937/pmd-rule-for-checking-java-code-for-comments

Myeclipse is throwing some error when i debug server

偶尔善良 提交于 2019-12-11 01:59:03
问题 When i try debug server . Myeclipse is showing some error. Perspective switch job has encountered a problem.An internal error has occurred. java.lang.NullPointerException. And after that it hangs. Here is the attatched error message pic. And here is the log. !ENTRY org.eclipse.ui 4 0 2014-01-30 15:22:34.684 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException at org.eclipse.ui.internal.Perspective.onDeactivate(Perspective.java:1120) at org.eclipse.ui.internal

MyEclipse Web Project转Eclipse Dynamic Web Project

前提是你 提交于 2019-12-10 16:06:08
由于工作原因,需要将svn上的MyEclipse Web Project导入到Eclipse(Eclipse Java EE 4.2)中开发。但是在部署到tomcat时,发现无法发布这个项目。 MyEclipse Web Project被识别为Java Project。所以决定从Java Project和Dynamic Web Project的区别开始分析。 一、分析 Java Project .classpath .project .settings org.eclipse.jdt.core.prefs Dynamic Web Project .classpath .project .settings .jsdtscope org.eclipse.jdt.core.prefs org.eclipse.wst.common.component org.eclipse.wst.common.project.facet.core.xml org.eclipse.wst.jsdt.ui.superType.container org.eclipse.wst.jsdt.ui.superType.name .classpath中增加了J2EE Standard Tools (JST)的配置,.project中增加了Eclipse Modeling Framework Project (EMF

MyEclipse_10.7安装egit

[亡魂溺海] 提交于 2019-12-10 15:55:39
网上有很多关于eclipse安装egit的方法, 一般有两种, 但是在 MyEclipse_10.7中,有一种方法我尝试了很久,最终成功! 第一钟方法:安装Eclipse MarketPlace,然后再通过Market Place自动下载安装。 但是我的 MyEclipse_10.7找不到这个选项,搜索不到egit这个插件,可能版本问题,其他版本没有试。 第二种方法:去官网下载egit插件包【不同版本的 MyEclipse对应的不同的egit,我一开始下载最新版本,结果怎么也安装不了,可以在这里查询 http://www.phperz.com/article/14/1015/29146.html 我的 10.7本吧 用的是1.3.0.201202151440-r-site 】,解压下来,有features,plugins两个文件夹和两个jar包一个xml文件, 在 MyEclipse的安装目录下,找到dropins,在文件夹里面建一个egit文件夹,把上面解压好的文件全放进来【除了xml文件】, 重启 MyEclipse,在window -->preferences-->team里面找到git,安装即成功了 安装好后,网上教程大多是从网上clone项目,这里是写加入已有项目,可以copy别人的项目到自己的电脑,然后添加项目,可以不用再下载 打开Git repository视图

myeclipse开发Webservice

余生颓废 提交于 2019-12-09 21:12:01
MyEclipse 下开发 Web Service Sun Java 5+ Eclipse 3.2 +MyEclipse 5.0.0. 本文介绍了使用 MyEclipse Web Service 来迅速开发和测试一个 HelloWorld Web Service, 其中包括 : 1. 介绍了 MyEclipse Web Services 的基本概念 2. 创建一个 MyEclipse Web Services 工程 3. 创建一个简单的 HelloWorld Web Service 4. 在 Web 容器中 , 如 Tomcat 5 中部署 Web Service 5. 使用 Web Services Explorer 来测试部署的 Web Services XFire Java SOAP 框架概述 MyEclipse Web Services 是建立在 XFire Java SOAP 框架和工具基础上的 , XFire 是一款开源的 Java SOAP 框架。它拥有一个轻量级的信息处理模块,通过 STAX 来与 SOAP 信息相结合。提供了一个工作在 Web Services 下的简单 API ,支持 POJO 和 schema 开发 . XFire 支持 Web Services standards,Spring 整合 , 支持 JBI , 支持 JAXB ,XMLBeans