Brett Lee

Greenhorn
+ Follow
since Apr 21, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Brett Lee

Sir,
Sorry for the delay.Here is the JSP code.


Thanks
BrettLee
17 years ago
Sir,

Thanks for the swift reply.This is in my web.xml file.

<?xml version="1.0" encoding="ISO-8859-1"?>

<!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>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>

<welcome-file-list>
<welcome-file>signup.jsp</welcome-file>
</welcome-file-list>

<!-- Struts Tag Library Descriptors -->
<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-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>

<taglib>
<taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-template.tld</taglib-location>
</taglib>

</web-app>

Thanks

BrettLee
17 years ago
Sir,

I am getting the following exception while calling the jsp.I have updated the server.xml and the web.xml but still doesnt work.

Apache Tomcat/4.0.1 - HTTP Status 500 - Internal Server Error

--------------------------------------------------------------------------------

type Exception report

message Internal Server Error

description The server encountered an internal error (Internal Server
Error) that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet jsp threw
exception
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:871)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)

at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)

at java.lang.Thread.run(Unknown Source)


root cause

java.lang.ClassCastException:
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source)

at
org.apache.jasper.parser.ParserUtils.parseXMLDocument(ParserUtils.java:183)

at
org.apache.jasper.compiler.TldLocationsCache.processWebDotXml(TldLocationsCache.java:165)

at
org.apache.jasper.compiler.TldLocationsCache.(TldLocationsCache.java:138)

at
org.apache.jasper.EmbededServletOptions.(EmbededServletOptions.java:324)

at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:266)
at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:615)

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)

at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)

at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)

at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)

at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)

at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)

at java.lang.Thread.run(Unknown Source)
Thanks

Brettlee
17 years ago
Sir,
I have a set of class files zipped in a directory.I put them in my webapps/Myapp folder.The changes made to the classes doesnt reflect or Tomcat does not access the zip file.The only other way is to unzip the files and create a jar file.Should I need to configure the Tomcat to access the .zip file or Should i create an jar seperately.
Thanks
BrettLee
17 years ago
Sir,
I haven't created the war file but I have it as .class file itself.Is there a way to remove the ClassLoader.Is there any way to signal the Tomcat server that a change has been made to the java file
Thanks
BrettLee
17 years ago
Sir,
If I make any changes to a servlet the Tomcat recognizes and updates accordingly but I also have an java file to update but it does not recognize the changes made to the java file.Is there any other way to do this?

Thanks
BrettLee
17 years ago
Sir,
I am not able to load the gif images.I have given path of the gif files inside the <img> tag.Its still not loading.The following is the tag i have given in my html file - <img src="/temp/red_bar.gif" width="100%" height="19" alt="" border="0">.I have the temp directory in which i have all the gif files.Still its not loading.Please guide me.
Thanks
Brett
17 years ago
Sir,
This is the exact error that it gives.

Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> TestServlet in servlet mapping
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2238)
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:2214)
Thanks
BrettLee
17 years ago
Sir,
The following is the content of my web.xml file.
17 years ago
Sir,
I created a directory under webapps called test.Under test/WEB-INF/classes I copied all the java class files.For deploying the servlets I have added the entries in the web.xml file.But still it says resource not available.I have also added the entry into my server.xml file for context root as /test.
Thanks
Brett
17 years ago
Respected Sir,
I put my html file index.html and all the class files in the same directory.It gives me the following error.
load: class WcClient.class not found.
java.lang.ClassNotFoundException: WcClient.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
But my class file is there in the same directory as the index.html.

Thanks

Brett Lee
17 years ago
Respected Sir,
I need to display a set of gui screen using tomcat.I know i should create an applet which I have done.I have got the set of class files and I have also created a jar file.Can I copy the the jar file in the lib directory and start the application.I just need to display the GUI first.
Is that enough?

Thanks
BrettLee
17 years ago