请问这个 JSP文件错在那里

jacksboy 2004-09-16 12:39:02
jsp源文件是这样的:在WEBLOGIC 8上部署也成功了,就是运行的时候总是报错:

<%@ page contentType="text/html; charset=GBK" %>
<html>
<head>
<title>
jsp1
</title>
</head>
<body bgcolor="#ffffff">


<% String bgcolor=request.getParameter("bgcolor");
if(bgcolor==null)||(bgcolor.trim().equals("")))
{
bgcolor="white";
}
%>
</body>
</html>



错误


Compilation of 'E:\Java\Bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_color_color\jsp_servlet\__bgcolor.java' failed:
--------------------------------------------------------------------------------
E:\Java\Bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_color_color\jsp_servlet\__bgcolor.java:123: illegal start of expression
probably occurred due to an error in /Bgcolor.jsp line 12:
if(bgcolor==null)||(bgcolor.trim().equals("")))


--------------------------------------------------------------------------------
Full compiler error(s):
E:\Java\Bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_color_color\jsp_servlet\__bgcolor.java:123: illegal start of expression
if(bgcolor==null)||(bgcolor.trim().equals(""))) //[ /Bgcolor.jsp; Line: 12]
^
1 error

请问这是什么错误.

...全文
112 点赞 收藏 5
写回复
5 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
gogollili 2004-09-16
你少加了一个括号:if((bgcolor==null)||(bgcolor.trim().equals("")))
回复
diaopeng 2004-09-16
哈,你的工程有问题,是不是忘记写web.xml了?或者再查查其它地方,这个原因跟你的JSP是没有关系的,跟工程有关,一般是web.xml错误
回复
tof214 2004-09-16
if((bgcolor=="")||(bgcolor.trim().equals("")))
回复
jacksboy 2004-09-16
我加了一个括号,然后重新启动WEBLOGI服务器部署的时候还是报错:


[J2EE:160029]I/O error while reading deployment - java.util.zip.ZipException: error in opening zip file. java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:112) at java.util.jar.JarFile.<init>(JarFile.java:117) at java.util.jar.JarFile.<init>(JarFile.java:82) at weblogic.j2ee.J2EEUtils.getArchiveModuleInfo(J2EEUtils.java:311) at weblogic.j2ee.J2EEUtils.getDeploymentInfo(J2EEUtils.java:205) at weblogic.j2ee.J2EEUtils.getDeploymentInfo(J2EEUtils.java:155) at weblogic.j2ee.J2EEApplicationContainerFactory.initializeDeployment(J2EEApplicationContainerFactory.java:467) at weblogic.management.deploy.DeployerRuntime.unprotectedActivate(DeployerRuntime.java:833) at weblogic.management.deploy.DeployerRuntime.access$000(DeployerRuntime.java:63) at weblogic.management.deploy.DeployerRuntime$1.run(DeployerRuntime.java:1499) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at weblogic.management.deploy.DeployerRuntime.checkAndPerformDeployerActions(DeployerRuntime.java:1490) at weblogic.management.deploy.DeployerRuntime.activate(DeployerRuntime.java:186) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:711) at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:690) at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557) at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525) at weblogic.management.internal.RemoteMBeanServerImpl.private_invoke(RemoteMBeanServerImpl.java:947) at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:908) at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:946) at weblogic.management.internal.MBeanProxy.invokeForCachingStub(MBeanProxy.java:481) at weblogic.management.runtime.DeployerRuntimeMBean_Stub.activate(DeployerRuntimeMBean_Stub.java:1064) at weblogic.management.console.actions.mbean.WebAppComponentDeployAction.prePerform(WebAppComponentDeployAction.java:141) at weblogic.management.console.actions.mbean.DoMBeanWizardAction.perform(DoMBeanWizardAction.java:215) at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:173) at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85) at javax.servlet.http.HttpServlet.service(HttpServlet.java:760) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402) at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118) at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635) at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
回复
wandou999 2004-09-16
少加了"("
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2004-09-16 12:39
社区公告
暂无公告