I am trying to understand what's the correspondent of servlets and applets in .NET but I don't have much experience in JAVA.
I am thinking applets could be compared to the silverlight stuff, meaning you code independently from the browser, but then it's not like that since (between other things) you can re-use an applet outside the brow...
I don't know, but I feel that IllegalStateException is causing undo headache. If I have a request say a JSP or some other servlet and need to associate a filter with that request. I can't do any other modifications to the output to the client if the response has already been committed?
For example, I see in JSP code that sets the mime...
GWT is the main reason I'm moving into java for web development. Which java framework will work best with it, while also maximizing code reuse for mundane tasks like form validation, database access, pagination, etc?
Thanks.
...
I'm considering building a web app using Java and Google Web Toolkit and I have some questions.
I assume that when someone goes to a URL such as http://site.com/Signup, the Signup servlet will be loaded which will perform all the necessary work and forward the request to a JSP that would display the HTML and Javascript code.
If there i...
I'm trying to create a simple web project using Tomcat in Java.
In the web.xml file, I point to a servlet that I want to be run when someone goes to http://localhost:8080/MyProject , so I used / as the URL pattern. That worked, however it has the disadvantage that all links to html and javascript files are being passed on to the main se...
I've had some problems with reading and writing UTF-8 from servlets on Tomcat 6 / Linux. request and response were utf-8, browser was utf-8, URIEncoding was set in server.xml on both connectors and hosts. Ins short, every known thing for me in code itself, and server configuration was utf-8.
When reading request, I've had to take byte ...
Hi,
I've been doing PHP/MySQL web development for a while and I'm fairly competent in it. Lately however, I've learnt Java and fallen in love with it, and I'd really like to do more Java work now.
I've gotten my first opportunity with a client who needs a web 2.0ish web app built, and he has agreed to let me use anything I want to, inc...
I would like to hear some comments about how to manage long lived XMPP connections on a servlet container i.e. Tomcat.
Basically we have a client that submits login credentials to a servlet and we create a XMPPConnection for each session and store it in HttpSession.
To simplistic, the client can perform 4 operations: login, send/receiv...
The jetty servlet container is quick and light enough to run in unit tests (indeed I do to serve up files).
It is possible to install actual servlets into it, programmatically (say in a test) and have it run them?
...
Socket programming inside a servlet acting as server, is it a good solution to start a sort of server pushing environment?
...
Hi All: I'm trying to set up my build file to be run for deployment on JBossAS 5.0.1, and I need to find the servlet jar file that I should use for the build..
All of the web pages I've looked at seem to indicate that the file is javax.servlet.jar and it should be in the C:\< install dir >\server\default\lib directory. I'm looking in th...
I have several different submit buttons on my JSP in one form tag that all point to the same servlet. I need to know which submit button was clicked. Ho can I find out which button was clicked?
Regards
...
Hi there,
First a little background, I'm using jdk 1.6. I've got a 2 column table in an Oracle 8i DB that holds a very simple code to word map. There are no strange characters. Both columns are varchar.
From my desktop machine, when I execute the the following:
OracleDataSource ods = new OracleDataSource();
ods.setDri...
I need to make a request from a servlet but I also need to retain all the header information. That is in the request object.
For example, I if I do something like the following from the doGet method, is there a simple way to just pass that information to the URL Connection object?
URL url = new URL();
URLConnection uc = url.openConnec...
Hi All:
I'm trying to expose a web service method via JAX-WS annotations. Many examples I've seen reference the EndPoint.publish() method to quickly stand up the service in a standalone app (ex from Java Web Services: Up and Running, 1st Edition):
public class TimeServerPublisher {
public static void main(String[ ] args) {
// 1st arg...
Hi,
We have a servlet hosted on jboss which works on HttpServletRequest. But sometimes we receieve requests that do not get decoded by jboss, and when we do getQueryParam on HttpServletRequest, we get null. The jboss access log shows the url in encoded form. Normally, when everything works smooth, url is shown decoded in access log.
e.g...
I have a servlet based application that creates a session and stores some information the first time it is accessed. This information is used in subsequent pages. The process runs into trouble if the initial url is clicked from inside a msword document. The servlet creates a session and sends the response back. The response is displa...
I looked at the documentation and all it says is to create a servlet... With what?
Is there code I need to use for this servlet?
Does it just need to be blank and have the name of postResults?
Is there a provided ant script for this?
I can't find anything on google or selenium's site that lets me in on this.
Thanks
UPDATE: I found...
Referring to Goetz's article, I want to refer to this piece of code
HttpSession session = request.getSession(true);
ShoppingCart cart = (ShoppingCart)session.getAttribute("shoppingCart");
if (cart == null) {
cart = new ShoppingCart(...);
session.setAttribute("shoppingCart", cart);
}
doSomethingWith(cart);
From my avail...
In the method service(), we use
PrintWriter out = res.getWriter();
Please tell me how it returns the PrintWriter class object, and then makes a connection to the Browser and sends the data to the Browser.
...