dagmar timler

Greenhorn
+ Follow
since Nov 16, 2001
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 dagmar timler

Hi
The answer to your second question is easy - how do you find out the number of lines? Simply add a counter variable in the "while ((s=in.readLine()) != null)" loop and whatever the value of the variable when you have finished the loop is the number of lines.
The answer to your first question is trivial. You could simply add the VarConst.SEPARATOR after every System.out and before the end of your "while ((s=in.readLine()) != null)" loop, add a System.out.println("\n"). You could also create a StringTokenizer that returned the delimeter with the tokens it extracts [public StringTokenizer(String str, String delim, boolean returnDelims)]
Cheers,
Dagmar
15 years ago
Here is a link to a page about HttpSession - explaining what it is and how to set/get attribute values: http://developer.java.sun.com/developer/onlineTraining/JSPIntro/contents.html#JSPIntro9
I assume you will be creating some sort of user bean with session scope or putting it directly into the HttpSession.
I don't know if this answered your question, I found it difficult to understand.
Dagmar.
16 years ago
You would use java.io.File:
create a File object for each file that you need in folder "A", then use the renameTo(File) method to rename(move) the files into "B" folder. (you have to create File's in folder "B" that corresponds for each File in "A")
Does this help, or do you need more specifics?
16 years ago
JSP
<%
String[] values = {"value1", "value2", value3"};
Random random = new Random();
int randomValue = random.nextInt(values.length);
%>
<input type="text" value="<%=values[randomValue] %>">
NOTES: You'll have to check that the random number generator doesn't generate values outside of the index values - I haven't tested this piece of code.
Then just insert your values in the String Array instead of value1, value2 etc.
16 years ago
JSP
okay. what is the exception?
16 years ago
JSP
You need a mysql jdbc driver: http://mmmysql.sourceforge.net -mm.MySQL version 2.0.6 JDBC driver will do
and for connection pooling : http://www.bitmechanic.com/projects/jdbcpool/ -Bitmechanic's JDBC Connection Pool version 0.98 is one of many.
16 years ago
JSP
what exactly is your problem?
- the date not being inserted correctly?
- the date being inserted as a different date?
- the date not being inserted at all?
- an exception being thrown?
16 years ago
JSP
It probably has something to do with the server holding onto references to the file - do you close all your files/streams properly?
16 years ago
JSP
in the server.xml file in the conf directory, change the port parameter value in the following code:
<!-- Normal HTTP -->
<Connector className="org.apache.tomcat.service.PoolTcpConnector">
<Parameter name="handler"
value="org.apache.tomcat.service.http.HttpConnectionHandler"/>
<Parameter name="port"
value="8080"/>
</Connector>
16 years ago
JSP
If you are placing an object into the session before you add it to the table, why don't you create some sort of boolean flag too that could be used to see if the data has already been added.
appologies if this answer is too simple
16 years ago
JSP
Two Questions first:
(1) are you using tomcat?
(2) why are your jsp files under the WEB-INF folder?
<splurb>
As far as I would figure, this isn't the right place for them - I may stand to be corrected. Rather put them in the folder for your web app in the webapps folder and then you should be able to link to them how you mentioned.
</splurb>
16 years ago
JSP