One of my managers was recently asking about the size of our project.
So, I started looking around on the web and I could not find a good LOC
counter.
Does anyone know of a tool (freeware preferable) that will count the lines
of code for java source and JSP's, or even one for each.
Thanks.
Josep
There is support for reading and writing microsoft formatted documents (.doc
and .xsl for sure) on the jakarta web-site. Don't recall the names of the
api's right now (POI?). I haven't started using them yet, but from what I
read about them I am planning on using the .xsl one api in a similar mann
Not sure if a type or not, but you are using two different file names.
myfile01.txt and file01.txt.
May want to double-check that.
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: Richard Yee [mailto:[EMAIL PROTECTED]]
Sent: Wednesda
Just ran into this exact problem yesterday believe it or not.
Add the javamail jars to the external directory of the test environment.
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: Chan Mal [mailto:[EMAIL PROTECTED]]
Sent: Frida
Not sure how you would do it to a JSP. However, you could open a URL
connection to a servlet and send the serializable object to the servlet.
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: Debopam Ghoshal [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 28, 2002 1:08 PM
To: [EMAIL PROTECTED]
Subject: Re: HttpServletRequest characterEncoding
Karau, Joe wrote:
> Hi,
> I'm working on internationalizing our site. So far, every thing
is
> coming from the server in UTF-8 fine. However, when a user sends
Hi,
I'm working on internationalizing our site. So far, every thing is
coming from the server in UTF-8 fine. However, when a user sends a request
to our server, the HttpServletRequest.getCharaceterEncoding method is
returning the encoding of "iso-8859-1". I've found that in the newer
Se
I believe all you have to do when you set your cookie is:
cookie.setPath("/");
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: Hans Liebenberg [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 20, 2001 8:53 AM
To: [EMAIL PROTECTED
And I got duplication fields in the drop down
> list)but when I put
> select distinct User from pcinfo order by User I got the error :
> Column index out of range.
>
> thanks.
>
>
>
> >From: "Karau, Joe" <[EMAIL PROTECTED]>
> >Reply-To: A
t distinct User from pcinfo order by User I got the error :
Column index out of range.
thanks.
>From: "Karau, Joe" <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
&
What's the code for where you build your SQL, retrieve the columns after
executing the query, and the table definition(s) for the table(s) that you
are querying?
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: sufi malak [mailto:[EMAI
Most probably there is a type somewhere between you form's fields, and the
name of the parameters you are trying to retrieve.
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: sufi malak [mailto:[EMAIL PROTECTED]]
Sent: Thursday, Septem
sure just do this
It is already HTML, why put it in a code snippet. But if you REALLY want to
just do this:
<%="&bsp;"%>
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: srinivas puppala [mailto:[EMAIL PROTECTED]]
Sent: Monday, Jul
you could...
but the
request.getParameter(String parameterName)
method returns a String.
All you would need to do is:
String sLoginName = request.getParameter("name");
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From:
Please ignore the majority of my previous reply, did not read the message
close enough. sorry.
The best method would be to use the javascript, unless you want to change
the html into a jsp and do a
instead of doing the include file directive.
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507
where
* is either <%=request.getParameter("[some_parm_value_name]")%>
or
<%= (String)request.getAttribte("[some_att_value_name]")%>
or
<%= [some_string_object] %>
otherwise, if it must be done dynamically, you can use javascript...
document.[form_name].[element_name].value = "[value t
Yes, you should wrap it in a try catch finally construct. And return the
connection in the finally. That way, you are GUARANTEED (as long as the
server is not killed in the middle of the code) that the connection will be
returned.
It would be possible to allow the error page to return it, but t
We've run into the same problem. What we did to solve was use an
to hold the table contents and put the headers on top. This did however,
cause the header column widths, and table column widths to be slightly
mismatched though. Definitely not the most elegant solutions, but it did
work.
(If y
Not sure what you need help with...
You know how to get values out of a database, correct?
You know how to build arrays in Java, correct?
Just get your data, build the two dimensional array per method spec, and
call the method.
What are you having problems with?
Joseph Karau
Kingland Systems
I'm not sure if it is the same problem but...
We use VA Java as a development IDE, and in the past we had a problem where
a class that we exported from VA Java could not be loaded by any other JVM.
After working with IBM we found that it is because VA Java had a bug and it
was exporting a java cl
This is SPECIFICALLY a javascript question. Sufi, please join a javascript
mailing list and post this question there. Here is the url for what I feel
is a fairly good javascript mailing list. It should be able to help you
with questions such as this in the future.
http://www.LaTech.edu/mailman
There is no way to guarantee that the user can not somehow use the back
button.
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: King Maurice [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, May 15, 2001 4:07 PM
To: [EMAIL PROTECTED]
Subject:
If you try to use Swing in an applet, it is going to require the browser to
download a Java2 Virtual Machine. I your app is going to be for many
people, you may want to rethink. By the way, not really a JSP question.
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
tried what exactly, you really need to be more specific. If you are talking
about using Swing components to create the GUI for the client...
You can, but shouldn't unless you have a small number of users that will be
using your app, and/or until browsers start shipping with a Java2 JVM. The
JVM'
It may not be the browser's fault in this particular instance. It is
possible that the webserver, or a proxy is caching the page. I believe
setting the header to something like Expires=0 will turn off proxy caching
(not sure about that one, should double check). Depending upon the server
you ar
not only does it use the last change date of the jsp file to see if it must
recompile the page. But the majority of servlet/JSP engines actually use
the file to get the static text. In other words, anything that is not
enclosed in JSP tags or scriptlets is read from the file when the jsp is
call
By the nature of JSP and Swing, you can not really use them together.
Technically you can of course, except any swing components created in the
JSP will appear on the server, but if multiple requests are made to the same
JSP multiple windows will open. (not the greatest idea) If you want the
cli
make sure that the class that you are using for the forName([class name])
method is in your classpath.
(not so much a JSP question by the way, but hope this helps)
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: Sharon Om [mailto:[EM
well, if you are talking about the output of the jsp (which I'm assuming you
are) not really. Most browsers will print as much of the page as they can,
and then truncate the rest (speaking about width of course). The best you
can do is try to design the page so that it will fit onto one page whe
We have had the same problems, and the safest way that we have found to
avoid it is after the user clicks the button that performs the submission we
disable any buttons that allow the form to be submitted.
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original
on the form element implement the onBlur() event handler to set the focus to
the 'NEXT' link.
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: Barbara Geelan [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 19, 2001 3:51 PM
To: [EMAIL
you'll probably want to put the <%= request.getParameter(name) %> in single
quotes, and use wild card characters.
example:
select * from [table name] where [column name] like '<%=
request.getParameter(name)%>[rdbms wild card]'
this would find any results where the column name had a value
If you are setting the value of pSHIP with javascript, I've seen the same
type of problem. To fix I gave an initial value to pSHIP of an empty
string, such as:
That seemed to fix it for me. Hope this helps.
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
make sure that you are returning an EmployeePayInfor object at the end of
the readEmployeeFile method
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: Dan Lopez [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 03, 2001 9:46 AM
To: [EMAI
Not sure, but willing to bet that it is because you're uri attribute has two
"=" before the value of it.
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: sufi malak [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 12:19 PM
To
Why does it need to be a servlet, why not just create a separate thread to
run while the webserver is running?
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: Ganesh MohanRao [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001
A print module would have to be a java applet, and I believe (but I very
well may be mistaken) that it would not be able to get the entire graphics
context of the page that the applet is embedded in. Even if it could, in
order to use the printer the applet would have to be a signed applet, not
re
Sufi, you could encode the url of the servlet, and pass the url of the
servletA as a parameter.
Example href=/servlets/YourLoginServlet?ToServlet=SerlvetA
Then, in your login servlet simply do a
String forwardTo = request.getParameter("ToServlet");
and the "forwardTo" String will
because response.sendRedirect takes a string, look, copied straight from the
documentatation:
sendRedirect
public void sendRedirect(java.lang.String location)
throws java.io.IOException
Sends a temporary redirect response to the client using the specified
redirect location URL.
its a syntax error
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
AIM: jkara3629
-Original Message-
From: sufi malak [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 10:05 AM
To: [EMAIL PROTECTED]
Subject: Off topic (MS Access query question) ?
I am using MS A
I agree with Joseph as well. There are way to many subscribers to this list
asking either off-topic, or "simple" questions. They are, in my opinion,
being quite lazy.
Those asking off-topic questions should probably try to find the appropriate
forum for their questions, they would probably get
from
<%= the_jsp_output %> to the applet, I saw this somewhere but could not
remember where.
Thanks
>From: "Karau, Joe" <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
> reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTEC
Sufi, a JSP file is a source file that contains bits of JAVA code, and HTML.
When the user requests a JSP file, it is first parsed into a regular *.java
source file, then compiled into a *.class file (which by the way is a
servlet), and finally the servlet executes providing the user's browser wit
you also want to user == (which is the comparison operator) instead of =
(which is the assignment operator). Two suggestions for you.
1. Spend a little more time reviewing syntax (and all other options) before
asking for help.
2. To prevent problems similar to this in the future do null == whatev
Hi, this is both on and off topic, but more off topic than on I feel.
Here is the situation:
We have a JSP in the root directory that allows a user to enter
their username and password, and this JSP posts to a servlet to do the
processing. When the servlet completes the processing is does
A JSP is only compiled, and thus parsed, when the source JSP is newer than
the compiled java source, and class file it generates. When this parsing is
completed, a JAVA source file is created, following which a JAVA class file
is compiled based on the generated source.
Even if the content is cha
I understand that disabling the "Back" feature of a browser (whether the
user uses the back button, right click -> back, etc) is not really a valid
option in most web-applications. However, we are having problems with the
user choosing to go back to previous pages, and I was wondering how others
You can not access JSP variables directly using javascript because of the
most basic difference between the two. JSP is a server-side scripting
language. The JSP engine builds source code for a servlet from the JSP
page, the servlet is executed and html is sent to the browser. Whereas,
javascri
Doug, I don't know of any way to automatically translate from one language
to another because of all the considerations that go along with translating
between languages, not only the words but also the grammar would have to be
translated. However, if you do happen to find one, I'd greatly appreci
this is simple java and/or c/c++; but here:
if( thisIsTrue && thisIsAlsoTrue)
this gets done
else if((thisIsTrue || thisMightBeTrue) && (thisIsAlsoTrue))
this will get done
else if(thisIsTrue || thisMightBeTrue)
this will be
So.. do you want someone on the list to write the JSP for you, or point you
in the right diretion, or what?
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
-Original Message-
From: Mukka, Srikanth [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 19, 2000 2:27 PM
To: [EMAI
Maybe it's just me, but all I see if code, I don't see a description of your
problem anywhere. Are we supposed to load your code, try to run it, and
find what the problem is ourselves, and then try to fix it for you, just
because you need to, and I quote: "..solve this problem very fast:"?
Josep
check out the method request.getParameterNames(); -- or something very
similar, returns a list of parameter names
Joseph Karau
Kingland Systems
[EMAIL PROTECTED]
507-536-3629
-Original Message-
From: rgu [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 13, 2000 9:14 AM
To: [EMAIL PROTEC
Stored procedures will be more efficient then using JDBC and directly
running queries. However, the difference may not be noticed unless a large
and complex query was performed. The reason that stored procedures are more
efficient, is that they are stored in the database as optimized queries.
Th
Well first thing is, when I followed the link I received the following
error:
***
Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please
You could use an applet, however I wouldn't. If you are worried about the
time it takes a gif to download, than you should be more worried about the
time it would take to download the applet with the gifs. With the applet it
will be done all at once, making it appear to the user that it takes
fo
Yes, the blank lines will increase the size of the documnt, but only by one
or two characters per blank line. However, I believe those lines are
inevitable because they are placed there by the JSP processor.
-Original Message-
From: Sushil Singh [mailto:[EMAIL PROTECTED]]
Sent: Wednesday
because what <%= someVariable %> is actually doing is:
<% out.println(somVariable); %>
therefore all you are doing is passing the argument for the out.println
method
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "si
Add quotes around it
" >
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.o
Make sure the parameters are named, and then use a
request.getParameter(parmName) to get the value of the parameter.
Ex.
then, when processing the post/get do
String parm1 = request.getParameter("Parm1");
and parm1 will be equal to "Value1".
You will then be able to manipulate
Because of the system.out's you're probably outputing the data in the inner
functions to the web-server, instead of to the response's out stream.
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
61 matches
Mail list logo