Charles 'King

Ranch Hand
+ Follow
since Jul 05, 2009
Charles likes ...
Eclipse IDE Postgres Database Ubuntu
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 Charles 'King

Post the URL and the <servlet><servlet-mapping> entries from DD.
9 years ago

sovan chatt wrote: how toretrieve the file name in the servlet ...please tell me how to do that..



There are many ways to do this. One option is to use: org.apache.commons.fileupload.FileItem

String fileName = fileItem.getName();

I recommend you review this: http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/FileItem.html
9 years ago
Please check your DD syntax.

replace this: <servlet-name>*</servlet-name>

with: <url-pattern>/*</url-pattern>
9 years ago
Did you mean "Multiple domain names"? That's different than domains, which implies distributed computing. You're only running one container, correct. That's not distributed computing. Regarding Ajax, take a look here: http://radio.javaranch.com/pascarello/2006/02/13/1139887007801.html
9 years ago

Jagdeep Sharma wrote:[ The value of a host variable in the EXECUTE or OPEN statement is too large for its corresponding use.
........



It appears your trying to store bit data into a string object. The string representation of your spade symbol is too large for your DB field data type. One option is to store your data as bytes in your DB, which means you'll have to change the DB data type for that specific field.
10 years ago
Please post the first few lines of the exception from the error log. Which DBMS are you using? State the java object type your storing in your db field. Is it a String, etc...?
10 years ago
The choice is yours. You can either continue debugging and/or wait for a few anecdotal responses. I'd uninstall tomcat, then reinstall it.
10 years ago

Prabhat Shankar wrote:Hi,

how dOGet or doPost method is called in servlet life cycle in service method.



Take a look here - http://java.sun.com/products/servlet/whitepaper.html
10 years ago

Chomik Rufus wrote:Is there any kind of way to generate HTTP request within a servlet, dispatch it to the server and get back the answer delivered to the servlet? Or are the servlets meant only to respond to passed requests, not generate them?



Servlets are web components that run on the server (in the container). I'm not sure what your asking, "dispatch it to the server."

A servlet's main objective is to "serve" requests. If your problem doesn't include the container receiving a request from the client, then it likely servlets aren't the solution to your problem. The container calls the servlet's service method for each request it receives. Here's an oldie, but goodie. It should be required reading for all Java developers: http://java.sun.com/products/servlet/whitepaper.html

If you look at the API, you'll notice there's only one setter method for ServletRequest interface and none for HttpServletRequest. The servlet expects the container to pass the request to the its service method.
10 years ago

Moguluri Ravi Kiran wrote:Hello to every one...

please tell me how to print the '*'s rather than printing the original value...



input type=password -> http://www.w3.org/MarkUp/html-spec/html-spec_8.html

By the way, this is a HTML question, not servlet

anvi kon wrote:No, I am talking about refershing the data in the database.

Do we have to do it before we close the datbase connection in the finally?

Can one tell me ,where we have to write the refershing data in java?


thanks



Your question is somewhat ambiguous. Can you give the scenario or overall problem you're attempting to solve? Do you mean updating the database? Or do you want to temporary store your data, then update the db with it? More information is needed.
Please provide a sample of the code that sets the application context var(s)? If you're implementing any listeners, list those also.
10 years ago