Hi all
I'm developing a web-app and I want to retrieve data from the database and send them to the homepage.I thought to set the servlet as my welcome page,retrieve my data from the database,redirect to the homepage and pass my data as parameters.Any better ideas?
...
Hello!
My gwt app that uses mysql database runs normaly in eclipse when debugging. When i run it on tomcat, it displays correctly but when i click on a button that makes a RPC (executes servlet and contacts the database) i get an error. I checked my tomcat log and i see 404 error when clicking on a button:
0:0:0:0:0:0:0:1 - - [22/Jul/2...
i am working with Eclipse to develop a application in J2ME.In This application i am using a servlet called HitServlet and a J2me Class HitMIDlet.
I want to run this project using Eclipse.But i do not what is the directory structure
and how i make directory structure.
I am alredy configure J2ME plugin and Tomcat in my eclipse.
But i do n...
I have two classes one is J2me class HitMIDlet and a servlet HitServlet
i want to send request to servlet using J2me class.How i will mange these these two classes using Eclipse .?
...
I have two questions. The first is do Filters add a lot of overhead to request. We have a filter and it is set to run on the URL pattern /*. This means it also runs on all the image request. I think that this is not good for performance, but my co-workers think that it doesn't matter if the filter runs 5 or 6 times per request becaus...
Im using ubuntu and tomcat6 for my server. When im calling a servlet or a jsp page, the "logger" (System.out.println()) logs into the syslog of the server /var/log/syslog. How can i change this, that the server will write in a own log file like the catalina.out?
The problem is that there are no line breaks in my syslog (i used \n in th...
When I provide a dynamic name of checkbox inside a for loop like
<input type="checkbox" name="<%=i%>" />
How can I retrieve the value in servlet?
...
I am making a small website as my first project. I have finalized to use Java Servlets and JSP for my Server-side scripting. I am learning it from O'Reilly's HeadFirst Servlets and JSP. I decided to use Apache-Tomcat as my web server and container. I downloaded it. I even have jdk 1.6 update 21.
I unzipped apache in C:
It is running suc...
Hello all,
I am developing a servlet application, I was using JWebUnit, to check all the basic responses, but now I have to start using other HTTP methods different to GET(POST,PUT and DELETE).
So, I found HttpUnit, it looks that have support for what I need, POST and PUT methods are available there and I guess I can walk around the DE...
I'm trying to set up a request-scoped bean in Spring.
I've successfully set it up so the bean is created once per request. Now, it needs to access the HttpServletRequest object.
Since the bean is created once per request, I figure the container can easily inject the request object in my bean. How can I do that ?
...
is anyone using Mobicents with Glassfish in place of JBoss? how do i deploy mobicents to glassfish v3?
...
Hi,
I need to set a date field in my html form. After submitting the form the request goes to the servlet and tha data will be stored in database. In servlets how can i retrieve the date field?
Please help me.
-renu
...
I have to display dialog box from servlet but without opening new window.
Below is code
PrintWriter printWriter =response.getWriter();
String s ="<HTML><HEAD><TITLE>JavaScript Example</TITLE>"+
"<SCRIPT LANGUAGE=JavaScript>"+
"alert('File Uploaded');"+
"</SCRIPT>"+
"</HEAD>"+
"</HTML>";
printWriter.print(s);
This code open d...
I have tried to open a dialog box in Servlet & it opens fine.
But then I tried to achieve same thing in my thread's run method.
It gaved me following error:
java.awt.HeadlessException
at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159)
at java.awt.Window.<init>(Window.java:431)
at java.awt.Frame.<init>(Frame.java...
HI,
Is there any way I can find whether the cookies are disabled or not on the client browser. I have seen some posts saying to find using redirect URL, but there is no code how to do that . Can anyone please help me with a sample code to check this.
Please note that I want this to be done using Java only (no javascript please)
Than...
Is there any convenient way to read and parse data from incoming request.
E.g client initiate post request
URLConnection connection = new URL(url).openConnection();
connection.setDoOutput(true);
connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + boundary);
PrintWriter writer = null;
try {
OutputStream ...
I have a command line and i want to convert this into a servlet request in a bash script.How can i do this?
For example: >>Command arguments
the http servlet request shud be :
http://localhost:8080/webshell?op="command"&args="arguments"
...
The basic servlet jsp setup I'm familiar with ....
RequestDispatcher dispatcher = request.getRequestDispatcher(resourceA.jsp);
dispatcher.forward(request, response);
The problem is, in addition to sending the reply back to the browser (resourceA.jsp), I need to create
a second HTML output from resourceB.jsp, witch in turn will be ema...
hi, i am new to java, i'm having problem passing value from a class/bean (which are stored in arraylist) to servlet. any idea how can i achieve that? below is my code.
package myarraylist;
public class fypjdbClass {
String timezone;
String location;
public String getTimezone() {
return timezone;
}
public void setTimezone(String t...
Hi all, I have a jsp search page (Search.jsp) and a result page (Result.jsp), both of them can choose search criteria. and then passed the parameters to a java controller file (Controller.java) to build a query string and performs query searching. The query string and searched results will be passed to Result.jsp for displaying.
Curren...