Is it possible to get data from database with PreparedStatement instead of inserting?
My probleem is when i store an aricle into the database with some "layout"( like free space between two paragraphs), by retrieving it, the "layout" is gone. The two paragraph is attached to each other withoud...
Hi,
I want to upload a file to my server, it works very well.
But i use HardCoded Path like ("c:\\temp\\file\\").
I want to know how to set the path for saving like any other programm. Like Office Word, where you can save a file by chosing a Destination.
What will be changes that i have to...
Hi,
I am developing a website where i need a javascript script, but i never worked with javascript. I hope someone can help me.
After clicking a button, a prompt window should be visible.
In this prompt window , one should put the URL of an image, juist like it works in some Forums. AFter...
Hi,
How can store korean characters into mine Mysql databse and retrieve it back, without any losse of characters.
I mean when i am storing an aricle in non European language, and later retrive it on my website, it shows very strage characters or somtime this ?????? ???? ????.
Can anyone...
Hi,
I am trying to send mail with attachment, but i cant do this.
Below is my code, Can someone tell me what is wrong with it??
simple.jsp:
<%
Properties props = new Properties();
props.put("mail.smtp.host", "smtp.quicknet.nl");
Session s = Session.getInstance(props,null)...
Hi,
I want to send email, but i am not able to do so.
Below is my code.
What is wrong with this????
SMTP = smtp.quicknet.nl
Code::::::
<%@ page language="java" import="java.util.*, javax.mail.*, javax.mail.internet.*"%>
<%
// create the HTML email message to send
String htmlText =...
Hi everyone,
I have a table where i can store all mine links. When i am asking to show all of these links on my page, i get all of them to see.
But when i am clicking on the links , i cant go to that website. How should i handle this problem?
Here is the code , i use:
<%
db.DBConnectie data...
hi,
I want to get the last three ids that are inserted into the database, where ids are auto-increment.
When i try to do this:
SELECT MAX(nieuwsid) AS nieuwsid FROM nieuws;
i get the highst id.
To get the last three ids, i want to store this highst id in a variable. Later i want to do this...
I am using Insert statment in JSP code.
statement.executeUpdate("INSERT INTO ADMIN VALUES ('"+lastParam+"','"+databaseinvoer+"','"+phoneParam+"')");
Where datbaseinvoer contains the article that i want to store.
When i use "" or '' within mine article, it does not works. If i put \ before...
Hi,
When i insert an article into my database table it works perfectly, but when i have a quote in mine article it can not be inserted.
What should i do to prevent this?
Here is an example of it.
insert into `afghan`.`nieuws`
(NIEUWSID, TITEL, CONTENT, AUTEUR, DATUM, NIEUWSTYPE)
values...
I have a JSP application which uses Session to store session values. I am having problem
invalidating the session. After logout i am able to access the application by clicking the browsers
back button and refreshing the page.
I use this code in Logout.jsp
<%if(session!=null)
{...
Hi,
I have a Content Management Systeem, where you can put an article into the website. If the Admin wants to save an article with a picture, How can he do that?
I have hear somthing like this:
Make a file for the pictures on the server. Give the path as a HTML code, Like <a href>. And put...
Hi,
How can i get the date and time in this format:
Tuesday, December 16, 2003 9:27 PM ,
I know how to display the date,but not the Tuesday and December.
This section is what i want: Tuesday, December
Is there anybody who can help?
Hi,
What is wrong with this code? I want to update database with this code.
The bean code:
public void UpdateNieuws() {
try{
db.connect();
String sql = "Update Nieuws set Nieuwsid '"+nieuwsid+"' " +
"Titel ='"+titel+"', Content ='"+content+"', auteur='"+auteur+"'"+
"datum='"+datum+"'...
Hi,
I am using jsp and Java Beans for login action.
Here are the code's:
login.jsp
<%@ page language="java" contentType="text/html" import="java.sql.*" %>
<%
String adminid = request.getParameter("adminid");
String username = request.getParameter("username");
String password =...
Hi everyone,
I am developing a CMS(Content Management System). I need to know how i can make sessions in jsp. After creating the Session in a login page the data like username should added in the session.In another page , addArtikel.jsp, i want to contoll if someone is logged on or not, other...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.