Sri Sar

Ranch Hand
+ Follow
since Mar 25, 2004
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 Sri Sar

Hi,
i know the following question may sound a bit silly!!! but really i an curious to know the answer to this question..
regarding universities/colleges in India, what is the difference between ME and MTech???
some people say that it is just that some colleges offer ME (Master of Engineering) and some colleges just rename it as M.TECH (Master of Technology)... but i feel that there is some difference between the two..
can u enligthen me on what this difference is??
thanks in advance and looking to a useful reply......
16 years ago
Hi,
i have a Win 98SE HP Pavilion PC (667 MhZ, 64MB RAM, Aureal Sound card).
today when i was playing the game "Age of Empires", all of sudden, there was a loud sound from my speakers and the system hung.
the game was installed 3 years back and i am using it regularly without any prolems..
when i restarted the system, the error that showed was:

Error # 11; CODEC failure. Driver not loaded

the real intersting aspect is that: when i remove my speakers (Polk audio) and use other speakers, it works fine.

also, when i use my speakers with another system, my speakers work well.

i would like to hear ur comments on this,
thanks in advance...
16 years ago
Hi,
i am using Netscape 7.0 browser. i have written a program in which the output is a SVG figure. when i access it using Netscape 7.0, the SVG is not displayed and instead i get a message "click here to get the plugin".
when i click on that link, i am directed to the hoem page of netscape where i get the message "no plugins found".
i want to know if Netscape 7.0 supports the use of SVG and from where i can get a SVG plug-in for netscape 7.0
thanks in advance.
16 years ago
Hi,
thank you for the reply. as per ur suggestions, i have checked the web.xml file in conf folder of tomcat (my version is 5.0)
the directory tree for my application is:

tomcat
- webapps
- prog
- WEB-INF
- classes - lib - src - web.xml
- fopack
-formserv.class
(fopack is the package present in classes folder and under fopack, formserv.class is located)

also i have another doubt: a small portion of my server.xml file is given below: in this, the xmlValidation="false" is given. can i change it to xmlValidation="true"??
<!-- Define the default virtual host
Note: XML Schema validation will not work with Xerces 2.2.
-->
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

i have got this idea because of the following code taken from:
http://www.coreservlets.com/Apache-Tomcat-Tutorial/tomcat5-files/server.xml

in the URL given above, the corresponding code is:
<!-- Define the default virtual host -->
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true">

<!-- Add the following attributes if you want to turn XML validation
on. Remember to comment the Host element above.

Note: XML Schema validationn will works with Xerces 2.0.1 or
Xerces 2.1. Xerces 2.0.2 and Xerces 2.2 have bugs that prevent
their use with Tomcat-->
<!--
<Host name="localhost" debug="0" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="true" xmlNamespaceAware="true">
-->

thanks in advance and waiting to hear from you.
[ June 11, 2004: Message edited by: Sri Sar ]
16 years ago
Hi,
i changed my default port to 8085 and this works fine.
but it seems that there is some problem with my web.xml
i am posting below some key points in my Tomcat log:

Jun 10, 2004 11:10:31 AM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on port 8085
Jun 10, 2004 11:10:32 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2372 ms
Jun 10, 2004 11:10:32 AM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 10, 2004 11:10:32 AM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.16
Jun 10, 2004 11:10:32 AM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jun 10, 2004 11:10:32 AM org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/DemoProject]
Jun 10, 2004 11:10:33 AM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
org.xml.sax.SAXParseException: Content is not allowed in prolog.
Jun 10, 2004 11:10:33 AM org.apache.catalina.startup.ContextConfig applicationConfig
SEVERE: Parse error in application web.xml
org.xml.sax.SAXParseException: Content is not allowed in prolog.
Jun 10, 2004 11:10:33 AM org.apache.catalina.startup.ContextConfig applicationConfig
SEVERE: Occurred at line 1 column 1
Jun 10, 2004 11:10:33 AM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Jun 10, 2004 11:10:33 AM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jun 10, 2004 11:10:33 AM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Jun 10, 2004 11:10:33 AM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
org.xml.sax.SAXParseException: Content is not allowed in prolog.
Jun 10, 2004 11:10:33 AM org.apache.catalina.startup.ContextConfig applicationConfig
Jun 10, 2004 11:10:33 AM org.apache.catalina.startup.ContextConfig applicationConfig
SEVERE: Occurred at line 1 column 1
Jun 10, 2004 11:10:33 AM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Jun 10, 2004 11:10:33 AM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jun 10, 2004 11:10:33 AM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Jun 10, 2004 11:10:33 AM org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/srikanth]
Jun 10, 2004 11:10:34 AM org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/TomcatProject]
Jun 10, 2004 11:10:34 AM org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Inputserv]
Jun 10, 2004 11:10:34 AM org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/SriProj]
SEVERE: Parse error in application web.xml
org.xml.sax.SAXParseException: Content is not allowed in prolog.

the same errors are repeatedly displayed in the log. i am not able to figure out on how to proceed?
what should i do now? thanks in advance
16 years ago
Hi,
thanks for the reply. as suggested by you, since there is a line in my tomcat console that says:
java.net.BindException: Address already in use:8080
i am trying to change the port to say 8081 etc... to see if it works.

also, in my server.xml file in tomcat>conf, i have the following content:
<!--
<Context path="" docBase="ROOT" debug="0">
-->

has this to do something with my errors and if i uncomment the above, will my application work??
thanks in advance.
16 years ago
Hi,
thanks for the reply.
i am not using a separate stand-alone tomcat instance to test my work. in Eclipse, i have installed a special Tomcat plug-in from Sysdeo.
also i am working on the things u suggested.
16 years ago
Hi,
please find below the contents displayed in the Console:

Jun 7, 2004 4:25:12 PM org.apache.coyote.http11.Http11Protocol init
SEVERE: Error initializing endpoint
java.net.BindException: Address already in use:8080
......
Jun 7, 2004 4:25:12 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 2314 ms
Jun 7, 2004 4:25:12 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Jun 7, 2004 4:25:12 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/5.0.16
Jun 7, 2004 4:25:12 PM org.apache.catalina.core.StandardHost start
INFO: XML validation disabled
Jun 7, 2004 4:25:13 PM org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/DemoProject]
Jun 7, 2004 4:25:13 PM org.apache.commons.digester.Digester fatalError
SEVERE: Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
org.xml.sax.SAXParseException: Content is not allowed in prolog.
........
Jun 7, 2004 4:25:13 PM org.apache.catalina.startup.ContextConfig applicationConfig
SEVERE: Parse error in application web.xml
org.xml.sax.SAXParseException: Content is not allowed in prolog.
....
Jun 7, 2004 4:25:13 PM org.apache.catalina.startup.ContextConfig applicationConfig
SEVERE: Occurred at line 1 column 1
Jun 7, 2004 4:25:13 PM org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
Jun 7, 2004 4:25:13 PM org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
Jun 7, 2004 4:25:13 PM org.apache.catalina.core.StandardContext start
SEVERE: Context startup failed due to previous errors
Jun 7, 2004 4:25:14 PM org.apache.catalina.startup.ContextConfig applicationConfig
INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/srikanth]
Jun 7, 2004 4:25:14 PM org.apache.commons.digester.Digester endElement
SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException

i have listed only a snapshot of the console contents which i feel could be useful. there is a line that says XML Validation disabled..
does this have something to do with my errors?
16 years ago
Hi,
yes, i restarted the server after making the changes.
regarding the URL in the form tag, i have it given as:
<form method="post" action="/hello">

also my web.xml file is as follows:

<web-app>

<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>formpack.formservlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>

</web-app>
thanks in advance.
16 years ago
Hi,
thanks you very much for the prompt reply. i did as you directed and placed my formpack dir as you had mentioned.
but still the same problem persists. when i enter a name in my HTML form and then click on submit, i still get the same error as before. i feel there are problems in specifying the parameters properly for <servlet-class>
and <url-pattern> tags.
is it possible for you to give an example of how the <serrvlet-class> and <url-pattern> tags should be mentioned (especially for files in local system)??
thanks in advance.
16 years ago
Hi,
i have created a html form named form1.html and stored it in
/opt/tomcat/webapps/project
ie the path now is: /opt/tomcat/webapps/project/form1.html
in eclipse, i have created a new tomcat project "Formpro". inside
this project is a package "formpack". now in formpack, i create a new
servlet "formservlet.java" that contains the servlet that takes the
input from form1.html and displays the output (ie the input data
entered with a greeting)
now in "Formpro" i created a web.xml file like this:

<web-app>

<servlet>
<servlet-name>hello</servlet-name>
<servlet-class>formpack.formservlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>hello</servlet-name>
<url-pattern>/hello</url-pattern>
</servlet-mapping>

</web-app>

now i go to my Mozilla browser, open my form1.html program
and give the input, but the error message i get is:
the file /hello cannot be found. Please check the location and try again.
i feel that there is some problem in my web.xml file. i am not
sure how to specify the <servlet-class> and <url-pattern> tags??
please help me out,
thanks in advance
[i am using Eclipse 2.1.2, Tomcat 5.0]
16 years ago
Hi paul,
thank u very much for the reply. i am working using the idea u suggested. now i need one more clarification from u.
once my jsp receives the request from the hidden form element, is it possible to do the following:
in my xml tags, i had mentioned two file paths:"C:\abc.txt" and "C:\fig.svg"
now how can i write an JSP code that takes the data from the "abc.txt" file and applies that values on the "fig.svg" file.
say for eg, "fig.svg" is a map of a country, whereas "abc.txt" is a text file that contains the names of the various states in that country with their population values. now i want to map the population values onto the svg map. how can it be done.
some sort of sample code will be quite helpful.
thanks in advance
16 years ago
JSP
Hi,
in my html/javascript form, the output is a javascript window with a set of XML tags like
<emp>
<na>C:\abc.txt</na>
<ag>C:\fig.svg</ag>
</emp>

how can i write a JSP code that, on form submission, gets the above window as input and extracts the data present in the path specified by the tags.
thanks in advance
16 years ago
JSP
Hi lasse,
thank u very much for explaining the difference between an XML file and an XML document,
Hi,
i have two text files (abcd.txt and efgh.txt). text file abcd.txt contains names of districts in a country with their area values whereas the file efgh.txt contains the names of the same districts but with their population values. (the text files have only two columns: name of the district and either the area/population values)
now i want to write a servlet that extracts the 'area' values from abcd.txt and 'population' values from efgh.txt and calculates Density ie divides the area values by the population values and obtain the result.
since i am new to Servlets, i am in desperate need of some sort of sample code in proceeding with the above functionality.
thanks in advance.
16 years ago