The selection cannot be run on any server

版权声明:本文为博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/T_Prometheus/article/details/84994032

原因tomcat版本与你的web项目的版本冲突比如我的tomcat是8.5.31的web项目是4.0,

Run on server时会报The selection cannot be run on any server,

tomcat8.5.31只支持J2EE 1.2、1.3、1.4和JavaEE 5, 6而J2EE 1.2、1.3、1.4和JavaEE 5, 6对应的Dynamic web module是3.0以下的所以出现The selection cannot be run on any server这个错误时可以将Dynamic web module改成对应的版本:

 

但有时你会发现,在如下的操作中无法更改Dynamic web module的版本,比如在maven的项目中,你在pom.xml文件中配置了jdk的版本如:jdk1.8对应的Dynamic web module是4.0配置后这里是无法更改至4.0以下的,

 

 

所以你需要使用另一种方式:找到F:\工作区间\项目名\.settings\org.eclipse.wst.common.project.facet.core.xml

这个配置文件<installed facet="jst.web" version="3.0"/>更改version对应的版本即可解决问题,如果有发现本片博客的问题或者本篇博客没有解决这个问题欢迎留言讨论0.0。

 

 

展开阅读全文

Cannot run program "jad"

01-04

/*jadclipse*/rnrn/*rn DECOMPILATION REPORTrnrn Decompiled from: C:\Program Files\Genuitec\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\jre\lib\rt.jarrn Total time: 16 msrn Jad reported messages/errors:rn Exit status: 0rn Caught exceptions:rnjava.io.IOException: Cannot run program "jad" (in directory "C:\Documents and Settings\Administrator\.net.sf.jadclipse\1262594305781"): CreateProcess error=2, ϵͳÕҲ»µ½ָ¶rn at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)rn at java.lang.Runtime.exec(Runtime.java:593)rn at net.sf.jadclipse.JadDecompiler.decompile(JadDecompiler.java:160)rn at net.sf.jadclipse.JadDecompiler.decompileFromArchive(JadDecompiler.java:217)rn at net.sf.jadclipse.JadclipseSourceMapper.findSource(JadclipseSourceMapper.java:150)rn at net.sf.jadclipse.JadclipseSourceMapper.findSource(JadclipseSourceMapper.java:83)rn at net.sf.jadclipse.JadclipseClassFileEditor.doOpenBuffer(JadclipseClassFileEditor.java:87)rn at net.sf.jadclipse.JadclipseClassFileEditor.doSetInput(JadclipseClassFileEditor.java:45)rn at net.sf.jadclipse.JadclipseActionBarContributor.setActiveEditor(JadclipseActionBarContributor.java:87)rn at org.eclipse.ui.internal.EditorActionBars.partChanged(EditorActionBars.java:335)rn at org.eclipse.ui.internal.WorkbenchPage$3.run(WorkbenchPage.java:628)rn at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)rn at org.eclipse.core.runtime.Platform.run(Platform.java:880)rn at org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:617)rn at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3487)rn at org.eclipse.ui.internal.WorkbenchPage.activate(WorkbenchPage.java:610)rn at org.eclipse.ui.internal.WorkbenchPage.makeActive(WorkbenchPage.java:1228)rn at org.eclipse.ui.internal.WorkbenchPage.bringToTop(WorkbenchPage.java:837)rn at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2835)rn at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2729)rn at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2721)rn at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2673)rn at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)rn at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2668)rn at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2652)rn at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility$1.run(SourceLookupFacility.java:355)rn at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)rn at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.openEditor(SourceLookupFacility.java:365)rn at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.openEditor(SourceLookupFacility.java:274)rn at org.eclipse.debug.internal.ui.sourcelookup.SourceLookupFacility.display(SourceLookupFacility.java:218)rn at org.eclipse.debug.ui.DebugUITools.displaySource(DebugUITools.java:776)rn at org.eclipse.debug.internal.ui.elements.adapters.StackFrameSourceDisplayAdapter$SourceDisplayJob.runInUIThread(StackFrameSourceDisplayAdapter.java:155)rn at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:94)rn at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)rn at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133)rn at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3800)rn at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3425)rn at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)rn at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)rn at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)rn at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)rn at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)rn at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)rn at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)rn at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)rn at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)rn at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)rn at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)rn at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)rn at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)rn at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)rn at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)rn at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)rn at java.lang.reflect.Method.invoke(Method.java:597)rn at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)rn at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)rn at org.eclipse.equinox.launcher.Main.run(Main.java:1236)rnCaused by: java.io.IOException: CreateProcess error=2, ϵͳÕҲ»µ½ָ¶rn at java.lang.ProcessImpl.create(Native Method)rn at java.lang.ProcessImpl.(ProcessImpl.java:81)rn at java.lang.ProcessImpl.start(ProcessImpl.java:30)rn at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)rn ... 56 morernrnrn*/ 论坛

Struts:Cannot find bean XXX in any scope

11-17

小弟最近开始学习struts遇到这样一个问题rnstruts-config.xmlrnrnrnrnrn rn rn rnrn rnrn rn rn rn rn rn rnrn rnrn rnrnrnRegditForm.javarnpublic class RegditForm extends ActionForm rn /*rn * Generated fieldsrn */rnrn /** age property */rn private String age;rnrn /** address property */rn private String address;rnrn /** name property */rn private String name;rnrn /*rn * Generated Methodsrn */rnrn /** rn * Method validatern * @param mappingrn * @param requestrn * @return ActionErrorsrn */rn public ActionErrors validate(ActionMapping mapping,rn HttpServletRequest request) rn // TODO Auto-generated method stubrn return null;rn rnrn /** rn * Method resetrn * @param mappingrn * @param requestrn */rn public void reset(ActionMapping mapping, HttpServletRequest request) rn // TODO Auto-generated method stubrn this.address="china";rn rnrn /** rn * Returns the age.rn * @return intrn */rn public String getAge() rn return age;rn rnrn /** rn * Set the age.rn * @param age The age to setrn */rn public void setAge(String age) rn this.age = age;rn rnrn /** rn * Returns the address.rn * @return Stringrn */rn public String getAddress() rn return address;rn rnrn /** rn * Set the address.rn * @param address The address to setrn */rn public void setAddress(String address) rn this.address = address;rn rnrn /** rn * Returns the name.rn * @return Stringrn */rn public String getName() rn return name;rn rnrn /** rn * Set the name.rn * @param name The name to setrn */rn public void setName(String name) rn this.name = name;rn rnrnrnRegditAction.javarnpublic class RegditAction extends Action rn /*rn * Generated Methodsrn */rnrn /** rn * Method executern * @param mappingrn * @param formrn * @param requestrn * @param responsern * @return ActionForwardrn */rn public ActionForward execute(ActionMapping mapping, ActionForm form,rn HttpServletRequest request, HttpServletResponse response) rn RegditForm regditForm = (RegditForm) form;// TODO Auto-generated method stubrn request.setAttribute("regditForm", regditForm);rn return mapping.findForward("show");rn rnrnrnregdit.jsprn<%@ page language="java"%>rn<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> rn<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%> rn rn rn JSP for RegditForm formrn rn rn rn name : rn age : rn address : rn rn rn rnrnrnrnrnshow.jsprn<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>rn<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>rn<%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic"%> rnrn rn rn rn name: rn age: rn address: rn rnrnrn为何在regdit.jsp中输入内容跳转到show.jsp页面后,出现javax.servlet.ServletException: Cannot find bean regditForm in any scope错误。rn哪位大虾帮小弟解决一下。rn 论坛

没有更多推荐了,返回首页