P SOLAIAPPAN

Ranch Hand
+ Follow
since Oct 20, 2000
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 P SOLAIAPPAN

Select your codes first then copy using mouse right click menu (or <CTRL> <a> --for selecting , <CTRL> <c> -----for copying if you use key board ) and paste(<CTRL> <v> ---for pasting) it in the reply window. There will not be any problem, people can read it (except some time if you use jsp codes smiling face will appear)

[This message has been edited by P SOLAIAPPAN (edited December 14, 2000).]
23 years ago
Hi,
In the beginning I never expected you are using JBuilder, I thought you are using command line prompt or a simple editor like "TEXTPAD"(This is very simple easy to use text editor and can be used for compiling /running java programs/applets). Any how you are giving information bit by bit. Why don't you simply post your code for the above servlet/dabase program so that error can be easily detected. From your above statement it appears that you have not properly declared checked exceptions which are mandatory.

solaiappan

[This message has been edited by P SOLAIAPPAN (edited December 14, 2000).]
23 years ago
You go to MSDOS window and simply type only(of course press enter also)
set
nothing else, You will see list of all environment variables set, in dos window.
"classpath" is a environment variable used by java to search class files. It is a must that you set your classpath to use "servlet.jar"

[This message has been edited by P SOLAIAPPAN (edited December 13, 2000).]
[This message has been edited by P SOLAIAPPAN (edited December 13, 2000).]
23 years ago

c:\windows>set
23 years ago
Hi,
I thing your servlet.jar file is OK. There is very little chance it is get corrupted when down loaded. If it is inside a zip file definetely your WINZIP will complain about it.
It is most likely classpath problem. In dos prompt you can checkup classpath by typing "set" command
solaiappan
23 years ago
Hi,
If you have installed TOMCAT then there is no need to down load "servlet.jar". Give the class path name in "autoexc.bat"
as below
set classpath=%classpath%; F:\jakarta-tomcat\lib\servlet.jar
Here "F:\jakarta-tomcat" is my tomcat installation dir.
solaiappan
[This message has been edited by P SOLAIAPPAN (edited December 13, 2000).]
[This message has been edited by P SOLAIAPPAN (edited December 13, 2000).]
23 years ago
Hi Pandian,
You can keep your jar file in classpath sothat the servlet engine can search it or you can keep it where your application keeps all your servlets class files. Like "servlet.jar" you can include your "*.jar" file in classpath in autoexec.bat file.
for example say your bean class is in "bean.jar" which is in d:\beanjars dir then
set classpath=%classpath%;d:\beanjars\bean.jar
Then your JSP engine will search bean.jar also(apart from other classpaths mentioned) for your class file which you are using in <jsp:useBean ........class="..." />
solaiappan
23 years ago
Hi,
I donot understand what is
"The order of columns changes for every Submit."
If you give some more details with code, may I may able to help.
solaiappan
23 years ago
Hi,
you can keep your tld file where ever you feel like keeping it by entering in web.xml file. The default location is where your jsp programs is kept.
I have corrected the errors in the above program run the following
"taglib.tld"
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC
"-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>mut</shortname>
<uri> </uri>
<info>
RSExplorer java server pages
</info>
<tag>
<name>HelloWorldTag</name>
<tagclass>HelloWorldTag</tagclass>

</tag>
</taglib>
The error in yours is
(a)
"Microsystems, Inc./DTD " but should be "Microsystems, Inc.//DTD" (i.e //)
(b) remove this item
<bodycontent>empty</bodycontent>
When you are using <body> of HTML document you can not use "Empty" .

"test.jsp"
<html>
<head>taglib test</head>
<body>
<%@taglib uri="taglib.tld" prefix="mut" %>
<mut:HelloWorldTag>
</mut:HelloWorldTag>
</body>
<html>
You have to use "mut" as prefix as defined in your taglib.tld
Remainning are ok.
Run your program ,it will be ok now (I verified it)
solaiappan


[This message has been edited by P SOLAIAPPAN (edited December 07, 2000).]
23 years ago
Hi,
Your above code contain multiple errors. I have give sample code below you can try it.
(a)
"FileName.html"
<html>
<head>
<title>File Name</title>
</head>
<body>
<form method="post" action="FileName.jsp">
<br>
<center>
<br>
<b>
Enter File name here:
<input name="fileName" type="text">
<br>
<input type="submit" name="submit" value="ENTER">
</b>
</center>
</form>
</body>
</html>
(b)
FileName.jsp
<%-- Get the filename here--%>
<% String file=request.getParameter("fileName"); %>
%>;
<%-- if there is no entry for filename,prompt user to enter some name ,redirect him to the same page --%>
<%
if(file.equals("")) {%>
<jsp:forward page="FileName.html"/>
<%}
if(file.length()!=0) {%>
<jsp:forward page="Import.jsp">
<jsp aram name="noFilename" value="<%=file%>"/>
</jsp:forward>
<% } %>

(c)
Import.jsp
<% out.println(request.getParameter("noFilename")); %>
When you execute
"http://localhost:8080/FileName.html"
You can enter some filename or leave blank and press enter
If the file name is entered , it will be echoed back, If nothing is entered then the same page will be displayed.
solaiappan
23 years ago
Hi,
I created 2 files
"one.jsp"
<jsp:forward page="two.jsp">
<jsp aram name="noFilename" value="HI WORLD"/>
</jsp:forward>
"two.jsp"
<% out.println(request.getParameter("noFilename")); %>
Similar to your above example, it is printing
HI WORLD
when I executed
"http://localhost:8080/one.jsp"
It appears the problem is in
value="<%=nofilename%>"
If you give your full code, then it will be easier to debug
solaiappan
23 years ago
Hi,
It looks like that you donot have "servlet.jar" file in your class path ie. in "c:\tomcat\lib\" directory. Check up the directory or use find command in start menu to search "servlet.jar' in C: drive.
solaiappan
23 years ago
Hi,
When "servlet.jar" is class path, why the servlet program is not compiling ? Problem is somewhere else.
By the way are you using any IDE for compiling or simply you are using MSDOS prompt for compiling. Type "set" command in MSDOS prompt check up your class path. If you use any IDE you may have to add class path for the IDE set up (for TEXT PAD there is no need to add)
solaiappan
23 years ago
hi,
For Tomcat 3.2 keep your html & jsp files in
"D:\jakarta-tomcat\webapps\ROOT" directory (here my installation dir is "d:\jakarta-tomcat" )
to run html/jsp file.
"http://localhost:8080/Hello.jsp "
or
"http://localhost:8080/Hello.jsp "

To run servlets keep your compiled servlets files in
"D:\jakarta-tomcat\webapps\ROOT\WEB-INF\classes" dir
To run "Hello.class" (servlet file)
"http://localhost:8080/servlet/Hello "
solaiappan
23 years ago
Hi,
Copy all your demo jsp files (for e.g in dir "D:\JRun\servers\default\demo-app\jsp" to
"D:\JRun\servers\default\default-app"
Now run http://localhost:8100/hello.jsp
Try it.
I thing you may need virtual map settings to run directly the demo JSPs. To avoid it you can copy them to "\servers\default\default-app" dir

solaiappan
23 years ago