Friday, March 10, 2006

Servletting. Wait Lang.

Matagal nang ok ang user authentication pero this time by POST na siya to a servlet [UserLogin]. In clear nga lang ang pagsend ng data so I need the encryption thing already.

Huling priority na para sa 'kin ang user sign up kasi hindi pa naman siya open to the public.

Gumagana na rin kanina ang update account. And the retrieve thumbnails, of course. Haha.

Problem is, right now hindi na gumagana bigla yung servlet. Nagsstop siya sa isang blank page at hindi nag-r-response.sendRedirect(""). Hindi ko maintindihan kung bakit.

Eniwei, kung sakaling kelangan ng servlet for the mobile to request for data, I suggest na by POST na lang ulet, at mejo fill in the blanks na lang sa class na 'to:

package rijndael;

import java.io.*;
import java.sql.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class GetVideoDataServlet extends HttpServlet {

public GetVideoDataServlet() {
}

public void doPost(HttpServletRequest request, HttpServletResponse response) {
try {

RijndaelConnect connection = new RijndaelConnect();
HttpSession session = request.getSession(true);
connection.executeQuery( SQL query for retrieving data );

while(connection.getResultSet().next()) {
Encrypt video data;

Manipulate SQL query;

}

} catch(Exception e) {
e.printStackTrace();
} finally {
}
}

1 Comments:

Blogger orasid said...

1. Nag-code ako ng MobileClient-PCServer connection at nag-POST siya to send data. It works naman and i believe it handles redirect. I suggest to use JavaServlet in serving mobile clients (port 8088) and Apache Tomcat (port 8080) in serving desktop clients. Why? Because we're running a web application printing server pages, thus JSP, in serving desktop clients. And we're familiar with JSP and Apache Tomcat because of The CORRRS. Meanwhile, we should also deal with mobile phones this time we're not printing pages anywore rather we're displaying J2ME GUI.

2. I believe user log-in is a must because this is where we demonstrate our cryptosystem.

March 10, 2006 10:20 AM  

Post a Comment

<< Home