olivier dutranoit

Ranch Hand
+ Follow
since Aug 20, 2011
olivier likes ...
IBM DB2 Eclipse IDE Java
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
5
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 olivier dutranoit

Hi,

The error has nothing to do with your doctype...thats for you HTML.

don't you forget the *.tld extention?


<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
should be
<%@ taglib uri="http://struts.apache.org/tags-bean.tld" prefix="bean" %>
Hi,

What is see in your jsp is the following :


String dist=(String)sess.getAttribute("distance");
String transport=(String)sess.getAttribute("service");
String amt=(String)sess.getAttribute("estimateamt");



First of all, your primitives "long" are put into session, trough autoboxing.

Further, you want to get them out. (code above)
You need to cast them back to long.
You cannot cast a primitive long to String
use String.valueOf(value) instead to get your string.


12 years ago
Hi,

If you want tu use client-side validation, with javascript, the best way is to use regular expressions.
Plenty of examples on the web.

if you want use HTML5, you can use the build in validators (no script needed) :



BUT, html5 is not supported very well at hte moment :-)
Hi,

Seems to me that it is not the java Mail, but the mail server that gives you problems.

You should check the mail server configuration (if possible).
Also your ISP could be the problem...
12 years ago
Hi,

You will have to use some script for that.
Clicking the href, the value of username should be retrieved trought script, and be passed along with the href-url.

What don't you just let the user post his data, and just give an error, telling that the username exists? You just show the same page again with the same data, but with an error on top. You could even go further and suggest a username...
Hi,

just a thought...
try seting your "Content-Length" in your response header.

like

response.setHeader("Content-Length", String.valueOf(lenght-of-your-file));

what happens?
12 years ago
I googled some.
Must say, its pretty new to me.

But one thing that comes up is, not to do it trough servlets that are keeping open the connection...

They all talk about java websockets.

for example i found this : http://jwebsocket.org/

i will try to experiment with this too!
if you have a working example, can you share it?

Thanks!
12 years ago
maybe you should import the "doMarkDoneOutboundCall"
Just like the other imports.
12 years ago
Oh i see :-)

didn't see the html5-thing
Now i see what you are asking.
I got your question totaly wrong :-)
12 years ago
Hi,

there are existing systems out there doing this stuff

for example, check COMET

http://en.wikipedia.org/wiki/Comet_(programming)

12 years ago
try changing your

that should be enough i think...
it should be ignored by jsp and shown good in html
12 years ago
JSP
inside your dopost method you do first your consumedLO stuff
right after that , still in the same dopost,
you do a response.sendredirect(the_url_that_was_given);

nothing more...
12 years ago

Nada Bajnaid wrote:Yes it external website. Can I call another servlet passing the address of the link through the href. then in the new servlet I call the java method passing to it this address. After that I use go to go to the link.
Is it right way?



its a solution.

But why 2 servlets?
1 servlet will do.

from your browser, after click, request with the url as parameter comes in the servlet.
you do your stuff with you java methods
and then you do a response sendredirect (from within your servlet of course) to the url that was send as parameter.

so , 1 servlet.

12 years ago

Nada Bajnaid wrote:Can I call a servlet that will call the java method then go to the website without any more clicks. In this case I will pass the address of the website to the server through the href.

Is this the right way?



or, indeed, you can pass the address of the website to the server through the href.
12 years ago