-
Session Variables
Date: 02/21/05
(Web Development) Keywords: browser, html, asp, java
My ASP application uses several session variables. If the user exits properly - by using the in browser controls then they will clear (using session.abandon) and all will be good.
The problem is that there is a single HTML form with a javascript menu that remains open. If the user does not exit through the controls I have given them, but x's out of the browser, and then goes back in to the application - the session variables still exist.
I'm trying to figure out how/where I can clear these variables. I can't do it when the form loads because it reloads many times, and I need to keep the session variables. I can't put it in the HTML menu page either, because that one never reloads.
Any ideas/suggestions?
Thanks!
Source: http://www.livejournal.com/community/webdev/174225.html
-
Which Wiki
Date: 02/18/05
(Web Development) Keywords: php, mysql, rss, xml, sql, java
I’m thinking about putting together a Wiki for some stuff I am doing. Does anyone have any packages that they like and would recommend? Things I would like:
1) PHP (V5 would be a good thing)
2) Data stored in MySQL
3) User names to edit as an option.
4) New/changed Pages RSS feed.
5) Under active development
6) There is no #6
7) Page versioning.
8) Good support for inserting code of various forms (PHP, javascript, xml etc) in pages.
Thanks
--Zach
Source: http://www.livejournal.com/community/webdev/173178.html
-
Better Javascript code
Date: 02/16/05
(Web Development) Keywords: html, java
I have been thinking about the quality of the Javascript code in some projects I have been working on, and its not very good. So what can be done to improve this?
1) Remember all those things my first year Computer Science professors taught me. Which is to say good programing practice. I have way to much code that has very poor encapsulation, if any at all. I’m thinking to start refactoring things so that only the first level code accesses the main document’s element via DOM. Everything inside of that uses objects or variables passed by a wrapper function.
2) Start working on unit tests. By doing #1 it will be much easier to write unit tests for javascript under firefox. Yes some real fancy DHTML stuff may be tricky to do but much of the basic application logic, which is the major thing that I am worried about should be just fine.
3) Look for a test framework.
4) Ensure that the SOAP servers that my app requires also have test frameworks.
Source: http://www.livejournal.com/community/webdev/171921.html
-
Automated tests for Javascript code
Date: 02/16/05
(Web Development) Keywords: html, java
I’ve been building a lot of javascript and DHTML code recently. The problem I have is that I don’t really have any good ideas on how to write good unit tests for my javascript code. Anyone have any ideas?
Source: http://www.livejournal.com/community/webdev/171746.html
-
Slow JavaScript rollovers in Firefox
Date: 02/02/05
(Web Development) Keywords: browser, java, linux, seo
Hi all, I'm new around here. Have you ever run into amazingly slow javascript rollovers in the Windows build of Firefox? Check out this little test to see what I'm talking about. Basically there are 4 absolutely positioned gifs on top of each other, with the links to the side set up with onMouseOver events that toggle a given gif's src. This works just fine in IE 6, Safari, and Mac and Linux builds of Firefox, but in Firefox on Windows it's painfully slow. Or at least it is on my machine. Others have told me that it looks fine. A version with all the state's counties practically locks up my browser.
Any thoughts? A known bug, perhaps? Any better techniques? I've tried toggling style.visibility instead of the src, but to no avail.
Source: http://www.livejournal.com/community/webdev/168815.html
-
Deploying a simple servlet on Tomcat.
Date: 12/14/04
(Apache) Keywords: browser, html, xml, java, web
Edit: Thanks, solved.
Hi, I'm having problems deploying a very simple servlet on Tomcat 5.5. When I direct my browser to the expected URL, Tomcat just spits back a blank "Directory Listing for /" page, and I'm not seeing anything helpful in the logs.
I'm wondering if the problem is that I have not included any .html files in my webapp ... but I don't understand why I would need to, or what I would have to put in it.
Compiles fine.
Servlet Code:
public class HelloWorldExample extends HttpServlet {
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException
{
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("");
out.println("");
out.println("");
out.println("See my first demo work!");
out.println("");
out.println("");
}
}
The URL I type into my browser is
http://localhost:8080/Hello. No dice :(
Web.xml config:
Hello v2
Hello Demo
Hello
HelloWorldExamplelet-class>
Hello
/Hello
As I understand it, this configuration should allow me to access my servlet by http://localhost:8080/Hello
.war layout:
demo/
WEB-INF/web.xml
WEB-INF/classes/HelloWorldExample.class
WEB-INF/classes/HelloWorldExample.java
I've read the tomcat docs and "Tomcat - The Definitive Guide" (O'Reilly). Many thanks if anyone could offer me some pointers.
-Phil
Source: http://www.livejournal.com/community/apache/14800.html
-
Pear::DB vs. ADOdb?
Date: 02/03/05
(PHP Development) Keywords: php, mysql, database, sql, java, google
I'm sure this is going to create a firestorm of debate, but I'm tired of spending countless hours on Google. Before doing PHP, I was a Perl/Java programmer, and was used to doing database stuff with DBI in Perl more than anything else. I'm presently writing a PHP/MySQL app, which will be ported over to Oracle, so I'm looking to start using an abstraction layer (something I admittedly should've been doing the whole time). I've researched ADOdb and Pear::DB, and I can't make up my mind. Would some of you folks mind sharing your personal experiences?
Thanks!
Source: http://www.livejournal.com/community/php_dev/52325.html
-
POSTing and redirecting
Date: 02/02/05
(PHP Development) Keywords: php, browser, database, java
I'm in a situation where I want to create a page that redirects to another site and posts as it does so, as if it were a form (the page needs to record acceptance in a database before the site-user hares off into the unknown, possibly not to return). Is there a way of manually setting these post values in php? header() just seems to apply to the page you're in. I can't rely on Javascript, and somehow sending the post variables to the other site and mirroring the result of the first page on my site would be commercially problematic. Help!
Thinking about this, there just doesn't seem to be a solution. Header sets HTTP header variables in the document that goes back to the user's browser, not the second server. POST variables would usually be provided by the user's browser to the second server, not by the first server. I just don't think that there's a way of doing this kind of redirection, but I may be wrong, it's not really my area.
Fascinating problem, would anybody like to comment?
Source: http://www.livejournal.com/community/php_dev/52088.html
-
Security in websites, part deux....
Date: 01/02/05
(PHP Development) Keywords: php, html, database, sql, java, security, web
alright, so, i finally got around to designing my 'security system' for my family's website. here's how it'll work:
- user enters their username and password into an html form. a javascript function will confirm that both are between 6 and 16 characters long
- if they, are, they'll be passed to login.php which will double check the lenghts of the two strings, and then confirm that neither one contains anything but letters and numbers. if they don't pass muster, the user gets rerouted to the html login form.
- if the above two criteria evaluate to true, then a SQL query will run to see if there's a matching username and password row in a database.
- IF SO, the script calls session_start() and $_SESSION['UsrIsLogdIn']=true;. the script then redirects them to the rest of the site.
now, each page on the rest of the site will do a check like this:
if ($_SESSION['UsrIsLogdIn']!==true) {
header("Location:index.php");
exit();
}
do you all think that this is good security? do you see any problems, loopholes, other ways in or ways to emulate the session variable being set to true? is there anything else i should add or make the pages check for?
thanks for your help :)
[Edit: oh, and what do you think is the best way to handle the user logging out? just setting $_SESSION['UsrIsLogdIn'] to false?]
Source: http://www.livejournal.com/community/php_dev/51178.html
-
Co-Lo Hosting
Date: 08/27/04
(PHP Development) Keywords: php, java, hosting
Hey guys, just wondering if any of you recommend any particular co-lo providers.
Looking at hosting one box (maybe 2 in the future). At the moment I haven't talked to the customer enough to find how much traffic we're looking at, but somewhere between 50-100 GB a month max I'd have thought, possibly less.
Being located in the UK (particularly london) would be particularly useful, although I'm willing to consider other options.
X-Posted to php, php_dev java_dev livejournal_uk
EDIT: Dedicated hosting may also be possible, depending on how much flexibility we get...
Source: http://www.livejournal.com/community/php_dev/47594.html
-
Programming Goodness
Date: 10/15/04
(Elite PHP Development) Keywords: php, mysql, database, sql, java
I was lookin around and found this tonight. Very much kewlness, I am hopeing to join in on the fun in the development community so I can add in my ideas to make PHP even better.
This is a little bit of information I picked up on Creating Custom Exceptions and sending data to the parent class from a function in a subclass. Very spiffy.
query("SELECT NOW()");
var_dump($result->fetch_row());
}
catch(ConnectException $exception) {
echo "Connection Error\n";
var_dump($exception->getMessage());
}
catch(QueryException $exception) {
echo "Query Error\n";
var_dump($exception->getMessage());
}
/* Handle exceptions that we weren't expecting */
catch(Exception $exception) {
echo "Who was that masked exception?\n";
var_dump($exception->getMessage());
}
$result->close();
$my->close();
?>
very spiffy, and I will be posting something using the new MySQLi class. Maybe a whole class system for the generation of graphics pulled from a database. Possibly attach that to a javascript paint proggy, or even better a flash paint proggy..... hmmm the posibilities are endless, but i have to get back to my money making... Gotta love it, but it would be so much more fun if i had a project that really challenged my knowledge and abilities, but well get to that someday.
-=Levi=-
Source: http://www.livejournal.com/community/php_elite/504.html
-
new
Date: 12/26/04
(Algorithms) Keywords: java
umm im new to computer science im barely taking it as a junior in high school and im learning java.
does anyone know java ?
Source: http://www.livejournal.com/community/algorithms/41315.html
-
Mambo on FreeBSD 5.3
Date: 02/23/05
(PHP Community) Keywords: php, mysql, xml, sql, java, linux, apache
I'm having a few problems getting Mambo working on FreeBSD 5.3
Whenever I try to log in to the administrators account, with a valid username\password, you get presented with the same screen with the username\password boxes still filled in. /var/log/messages states "Feb 23 17:42:42 linux kernel: pid 15803 (httpd), uid 1006: exited on signal 11"
Nothing is written to the Apache access or error logs
If I try to log in with an invalid combo, a JavaScript popup tells me I got either the username or password wrong. So, the authentication is sort-of happening
The only useful thread I've found on the Mambo forums was this one. Which states "To all who have this issue, it is a problem with duplicate extension entries in your php.ini"
All I have in my php.ini that contains references to extension are:
extension_dir = "/usr/local/lib/php/20020429/"
extension=session.so
extension=mysql.so
So there aren't any duplicates
I really don't know much about setting PHP up. Does anyone have any pointers?
I seem to remember having this problem in the past with Gallery, and the issue was resolved by installing php4-extensions
Here's the version of all PHP stuff I have installed:
# portversion -v | grep php
mod_php4-4.3.10_2,1 = up-to-date with port
php4-bz2-4.3.10_2 = up-to-date with port
php4-ctype-4.3.10_2 = up-to-date with port
php4-extensions-1.0 = up-to-date with port
php4-gd-4.3.10_2 = up-to-date with port
php4-mysql-4.3.10_2 = up-to-date with port
php4-openssl-4.3.10_2 = up-to-date with port
php4-overload-4.3.10_2 = up-to-date with port
php4-pcre-4.3.10_2 = up-to-date with port
php4-posix-4.3.10_2 = up-to-date with port
php4-session-4.3.10_2 = up-to-date with port
php4-snmp-4.3.10_2 = up-to-date with port
php4-tokenizer-4.3.10_2 = up-to-date with port
php4-xml-4.3.10_2 = up-to-date with port
php4-zlib-4.3.10_2 = up-to-date with port
phpMyAdmin-2.6.1 = up-to-date with port
Any pointers would be most appreciated!
Update: Sorted. It seems that I did have 2 entries for session.so. One was in /usr/local/etc/php.ini and the other was in /usr/local/etc/php/extension.ini
I commented one out, and it started working
Leaving this entry in-tact, just in case anyone else has the same problem
Source: http://www.livejournal.com/community/php/265349.html
-
data compression
Date: 03/01/05
(Algorithms) Keywords: java
Anyone knows where I can find a good explanation of transformation coding, especially the Karhunen-Loeve and the Walsh-Hadamard algorithms? Pseudo- or C/C++/Java code would be great :) My lecturer wants me to compare them and in the moment all I can see are Greek letters and parentheses --'
Source: http://www.livejournal.com/community/algorithms/48301.html
-
Javascript help needed.
Date: 03/01/05
(Web Development) Keywords: java
I am working on an online estimate form for my job. You can see it here:
MGS Estimate Form
I have almost everything working except a few Javascript things that I can't get worked out. Code that seems to me should be working but for some reason isn't. They are commented in the file but the problems I am having are:
1) The email field will not reset focus to itself after I reset it's value to blank (ie "") to make the user re-enter a valid email address.
2) The date checking code that is run on the OnSubmit of the form doesn't stop the form from submitting if it fails validation. I tried adding return break; in the code and that didn't work. It actually stopped the validation code from working.
3) The file upload fields will not reset their values to blank (ie "") after the validation code finds that the file the person is trying to upload is of an invalid type.
All the script code is at the top of the file. Any help or suggestions would be appreciated before I pull my hair out.
Source: http://www.livejournal.com/community/webdev/176589.html
-
AdSense as java expert?
Date: 03/01/05
(Java Web) Keywords: java, jsp
I was responding to a pdf viewing (using java) question on Artima - http://www.artima.com/forums/flat.jsp?forum=1&thread=96447&start=0&msRange=30.
Source: http://feeds.feedburner.com/AngsumansBlogOnJavaAndWebTechnologies?m=170
-
AdSense as java expert?
Date: 03/01/05
(Java Web) Keywords: technology, java, jsp
I was responding to a pdf viewing (using java) question on Artima - http://www.artima.com/forums/flat.jsp?forum=1&thread=96447&start=0&msRange=30.
After I submitted my comments I noticed that the first AdSense ad contained the same link I had posted!
Looks like very soon AdSense may supplement the java and other technology experts!
The funny thing was the previous response which states - no [...]
Source: http://blog.taragana.com/index.php/archive/adsense-as-java-expert/
-
New opportunities: Health Industry Under Pressure to Computerize - The New York Times
Date: 02/19/05
(Java Web) Keywords: java
Looks like new opportunities for the Java industry.
The New York Times > Business > Health Industry Under Pressure to Computerize
Across the ideological spectrum, health care experts and politicians agree that the nation's hodgepodge of paper medical files needs to move into the digital era, so that eventually each person has an electronic health record [...]
Source: http://blog.taragana.com/index.php/archive/new-opportunities-health-industry-under-pressure-to-computerize-the-new-york-times/
-
Why Java is my language of choice?
Date: 02/11/05
(Java Web) Keywords: php, java
Background
I started my career with C then move to C++ and finally stuck on with Java ever since late 1995. I learnt other languages like VB, Basic, Fortran, Pascal (I loved it!) and recently php and some smattering of perl, lisp etc. Yes I also dabbled in C#. As you know structurally all [...]
Source: http://blog.taragana.com/index.php/archive/why-java-is-my-language-of-choice/
-
How to run javac 1.5 (or beyond) compiler for JSP compilation in Tomcat 5.5 with generics enabled (and other Java 1.5 only features like autoboxing)
Date: 02/03/05
(Java Web) Keywords: java, jsp
Target Audience
Java/JSP developers on Tomcat and Application Server administrators.
Problem
Tomcat 5.5 (unlike Tomcat 5.0 and versions below) comes with Eclipse JDT compiler enabled by default for JSP compilation. JDT compiler is not jdk 1.5 compliant as of now.
Solution
To just use the javac 1.5 compiler with Java 1.4 source code compliant JSP pages (you cannot [...]
Source: http://blog.taragana.com/index.php/archive/how-to-run-javac-15-or-beyond-compiler-for-jsp-compilation-in-tomcat-55-with-generics-enabled-and-other-15-only-features/