For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 24 replies, 2 voices, and was last updated 20 years, 4 months ago by
Riyad Kalla.
-
AuthorPosts
-
amareshwarMember– System Setup ——————————-
Operating System and version:
Eclipse version:
Eclipse build id:
Fresh Eclipse install (y/n):
If not, was it upgraded to its current version using the update manager?
Other installed external plugins:
Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*:
MyEclipse version:
Eclipse JDK version:
Application Server JDK version:
Are there any exceptions in the Eclipse log file?– Message Body ——————————-
Hi,
I have been developing a Struts application for the past several months using MyEclipse. Everything seem to have work properly. I tired to deploy the same application on to my UNIX Server using Tomcat 5.x. I get the following message while i try to access any JSP’s.Below is my web.xml
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”>
<web-app>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping><!– Struts Tag Library Descriptors –>
<taglib>
<taglib-uri>WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>WEB-INF/struts-bean.tld</taglib-location>
</taglib><taglib>
<taglib-uri>WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>WEB-INF/struts-html.tld</taglib-location>
</taglib><taglib>
<taglib-uri>WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>WEB-INF/struts-logic.tld</taglib-location>
</taglib>
</web-app>Below is the error received
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: File “/WEB-INF/struts-html.tld” not found
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:404)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:202)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:458)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:523)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1577)
org.apache.jasper.compiler.Parser.parse(Parser.java:171)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:253)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:137)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)note The full stack trace of the root cause is available in the Tomcat logs.
I havent changed any of the directory structure.
Please let me know if there are any changes that needs to be made in order for the deployment to be successful.
Greatly appreciat your help.
AmarJuly 23, 2004 at 4:30 pm #210829
Riyad KallaMemberAmar,
Change your ” <taglib-location>” elements in your web.xml file to have preceeding / slashes, also how do you reference your taglibs in your JSP pages? What URI are you using?July 23, 2004 at 4:35 pm #210832
amareshwarMember<%@ taglib uri=”/WEB-INF/struts-bean.tld” prefix=”bean” %>
<%@ taglib uri=”/WEB-INF/struts-html.tld” prefix=”html” %>July 23, 2004 at 4:38 pm #210834
amareshwarMemberAlso, Although i have the web.xml file in the WEB-INF dir under WebRoot i get the following while i start tomcat
ul 23, 2004 4:37:42 PM org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/StrutsNextProject]
Jul 23, 2004 4:37:43 PM org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/StrutsBlank]
Jul 23, 2004 4:37:43 PM org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Tom1]
Jul 23, 2004 4:37:43 PM org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/StrutsTestProject]
Jul 23, 2004 4:37:43 PM org.apache.catalina.core.StandardHost getDeployerJuly 23, 2004 at 4:50 pm #210835
amareshwarMemberAlso changing the ” <taglib-location>” elements in your web.xml file to have preceeding / slashes does not help
July 23, 2004 at 5:38 pm #210837
Riyad KallaMemberYou need to change your taglib location and URI entries to include the slash, becuase in your JSP pages you are using the slash in the uri attribute for the taglib… Struts predefines its own URIs, but you are overriding those with your entries in web.xml, which is fine, but keep in mind that whatever you type into web.xml for the URI, has to be EXACTLY in the jsp page to reference the tld.
As far as the Tomcat startup errors, those are errors for 4 separate web applications, are any of them the web application you made this original post about? I imagine if you have a bunch of applications deployed, and you’ve removed the deployments for them, then those are empty directories that Tomcat is just using the default settings for.
July 26, 2004 at 4:09 pm #210927
amareshwarMemberWell i did change the tag lib locations to what i have in the web.xml. The thing that surprises me is that everything works fin while i tryt o do things on a windows machine, but the same project fails when i try to deploy it on a UNIX machine. Are there any changes that needs to be made in order for the application to work on a UNIX machine ? All i am doing is creating a war file and using the Tomcat console to deploy it on the UNIX machine. I do a restart of the Tomcat server.
F.Y.I Below is my latest web.xml file and also the tag libs as defined in my JSP’s
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE web-app PUBLIC “-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN” “http://java.sun.com/dtd/web-app_2_3.dtd”>
<web-app>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping><!– Struts Tag Library Descriptors –>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib><taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib><taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
</web-app><%@ taglib uri=”/WEB-INF/struts-html.tld” prefix=”html” %>
<%@ taglib uri=”/WEB-INF/struts-bean.tld” prefix=”bean” %>July 26, 2004 at 6:49 pm #210929
Riyad KallaMemberAmar,
This is very strange, but we will figure it out.First, Lets make sure that we don’t have a stale version of that web application on your Unix box. Login to your unix machine, go into the Tomcat webapps directory and look for a) a directory that has the same name as your webapp and b) a WAR file with the same name as your webapp. Erase (or backup if you need them) both of those items to clean things up.
Second, I would say lets rule out some obvious problems, from your exception in your first post (where Tomcat complains about the missing TLD) lets do a sanity check and actually go into that directory on your unix system and see if the tld file is infact there. Go ahead and deploy your WAR file, then on the unix machine go back into the webapps dir and into the dir for your exploded WAR file and into the WEB-INF dir, do you see your TLD file? I wonder if there was a problem during uncompression of the WAR that caused the file to not be written to the proper location.
Third, try and do an exploded deployment to your local machine, make sure it works. Now use winzip or Windows XP integrated zip and zip the contents of your webapp into a zip file and rename it to <webapp name>.war, and now try and deploy that file to your Unix server. Did that work?
I think the steps above will help us narrow down if something funky is going on with duplicate deployments, corrupt zips, incorrect WAR files or all of the above.
As far as any changes when deploying across platform, no you don’t need to make any. Our devs work in a hybrid environment and deployment to a Windows, Linux or Unix machine is just a matter of copying a WAR file (of course assuming that your app itself doesn’t rely on any native code or things of that nature).
I will try and stay close to the computer tonight to run down this issue with you, I know lost work time is one of the most frustrating things that can happen to a developer.
July 27, 2004 at 9:18 am #210955
amareshwarMemberRiyad,
Thank you for your suggestions.I have tried too follow all the said procedures, but was not successfull in getting the application deployed correctly. I would like to bring to u’r notice the following things which were noticed by me.
I am using the Export option available when i right click on the project to get the war file. Please let me know if this is the correct way to do that.
Also i noticed that the JDK version on the Unix box is different from the version on my computer.
I am not really sure if any of the above changes might be causing these problems.
Your help is greatly appreciated.
Amar
July 27, 2004 at 11:17 am #210975
amareshwarMemberAlso for some reason i dont see the classes directory under the WEB-INF/lib dir in the myEclipse view. Although i see it if i open the workspace in windows explorer.
July 27, 2004 at 12:22 pm #210984
Riyad KallaMemberAmar,
Ahhh using “Export” is not the intended way to get a WAR file, so lets try this. Look at your tool bar for the deploy button, it is highlighted in red:
Go ahead and click that and you will get the deployment dialog like this:
Make sure to select your web project from the dropdown at the top, then click the “Add” button to add a new deployment for this project, you will get a popup like this:
Here you select the server (you need to set this up ahead of time) that you want to deploy to, and then selected a packaged or exploded deployment. A packaged deployment will create a WAR file for you that you can deploy to your UNIX server, and the exploded deployment will just do a straight copy of your project over to the application server.
After you set this up and hit OK, your application should be deployed. You can hit the browser button on the deployment page tojump dir to the directory containing your WAR file, try and deploy this file to yoru Unix server and see if everything works as expected.
Please let me know if you run into any trouble and I’ll see what I can do to help.
July 27, 2004 at 1:25 pm #210990
amareshwarMemberWell i tried that. But the war was not been able to explore. The was not started by Tomcat because of the below error
SEVERE: Exception during cleanup after start failed
LifecycleException: Container StandardContext[/SSBilling] has not been started
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4402)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4300)
at org.apache.catalina.core.StandardHostDeployer.start(StandardHostDeployer.java:767)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:1000)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1327)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:578)
at org.apache.catalina.manager.HTMLManagerServlet.doGet(HTMLManagerServlet.java:153)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:587)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:195)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:564)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:536)July 27, 2004 at 1:27 pm #210991
amareshwarMemberBelow are the details of the aplication as seen on UNIX server
-rwxrwxrwx 1 wfaoper wfa 0 Jul 27 10:54 SSBilling
-rw-rw—- 1 wfaoper wfa 3217335 Jul 27 13:08 SSBilling.warThe war i deployed is SSBilling.war
July 27, 2004 at 2:07 pm #210993
amareshwarMemberFinally it worked !!!!!
Thanks a lot Riyad. I t does work the way you told me. I just had to delete the file and re-deploy the war.
Appreciate all your help.
July 27, 2004 at 2:47 pm #210996
Riyad KallaMemberFinally it worked !!!!!
Thank god, i was really running out of ideas 😉
Thanks a lot Riyad. I t does work the way you told me. I just had to delete the file and re-deploy the war.
Nice job troubleshooting it… its always the little things that take the most time isn’t it…
Appreciate all your help.
It’s my pleasure, I’m glad its working now.
-
AuthorPosts