I have a jython servlet as part of a large application running in tomcat5. I tested a few Spring Framework classes and create the objects in the Jython servlet. When I try to create objects of classes in the application I catch an Exception message "No visible constructors for class". These java classes do have a public constructor class...
I have faced this question in my Interview as well. I do have many confusion with Session Scope & it management in java.
In web.xml we do have the entry :
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
What does it indicate actually ? Is it scope of whole project ?
Another poin...
Hi guys
I am using following paypal return value
http://localhost:8080/projectName/sucess?id=1
but when transaction completes it does not return me value of id
it return only http://localhost:8080/projectName/sucess
we have call sucess servlet after paypal transaction completes
Please help me
...
Are there any JSR-315-capable servlet containers available besides the one in GlassFish 3? Neither Tomcat nor Jetty have stable versions that support the Servlet 3.0 API.
...
Hello everyone,
I have a question.
Is it possible to implement a background process in a servlet!?
Let me explain.
I have a servlet that shows some data and generate some reports.
The generation of the report implies that the data is already present, and it is this: someone else upload these data.
In addition to report generation, I sh...
Hi,
I have a servlet class which handles login. At the end of my login procedure, I do this:
// jsp page
...
Helper.loginUser(request);
// Helper.java
public static void loginUser(HttpServletRequest request) {
request.getSession().setAttribute("username", "john");
}
in order to remember who a user is between page loads. In anot...
My webapp contains many entityManagerFactories (DBs) , each has its unique name , such as entityManagerFactoryApp , entityManagerFactoryBusiness , entityManagerFactoryForum ...etc.
In a webapp , I have to add OpenEntityManagerInViewFilter to achieve "Open Session in View" pattern.
<filter>
<filter-name>Spring OpenEntityManagerInVie...
What is the best practice to get servlet context in service layer ?
...
I want to get Java HttpSession by JSESSIONID. Is it possible? If yes, how?
...
What is a good alternative open source library to orielly's MultipartRequest for handling uploaded files?
...
What exactly the main purpose of using RequestDispatcher, for example when it's executed in Filter like the following example:
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws ServletException, IOException {
HttpServletRequest aHttpServletRequest = (HttpServletRequest) request;
...
Hi,
I have a servlet forwarding a request to another url in the same domain. I want to pass a string between the two, like:
// ServletVerifyUser.java:
public void doGet(HttpServletRequest req, HttpServletResponse resp) {
// do some work..
req.setAttribute("message", "Thanks for signing up!");
req.getRequestDispatcher("/lo...
Hi All,
how can i change the layout in jsp without restarting the application server?.
and should not be with javascript.
layout is nothing but form fields in two column table or arranged in different sections.
Scenario is like i have one web page with initial layout as two column layout. if i switch the layout to another layout by s...
I have the following code...
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
super.doGet(req, resp);
final int idValue = Integer.parseInt(req.getParameter("id"));
final ProjectRunEntity projectRunEntity = projectDataService.findProjectR...
I'm trying out Endeavour Software Project Management.It's running as a servlet in Tomcat (Catalina). The package came with tomcat and jre configure, got it running quite easily. Everything was fine, except that the Datetime format wasn't as per my machine's configuration. I couldn't find a place to configure the Datetime format. Not in t...
I am creating a custom component that is an image viewer for a given product number. I access these files using a modified version of BalusC's ImageServlet:
@WebServlet(name="ImageLoader", urlPatterns={"/ImageLoader"})
public class ImageLoader extends HttpServlet {
private static final int DEFAULT_BUFFER_SIZE = 10240; // 10KB.
...
Hi,
Out of curiosity and naivety:
Suppose, I have a webserver which holds numerous servlets. For information passing among those servlets I am getting the servlet context and setting session variables. Now, if 2 or more users send request to this server then what happens to the session variables? Will they all be common for all the use...
Hi,
I'm trying to achieve the following behavior using the Servlet 3.0 API:
send an inital html page
send subsequent responses that update the page
This all works except the only way I could send the initial page without getting the response committed is by manually writing using the HttpResponse Writer...
I was wondering if there...
Hello,
I have some embedded Java code in which I'm trying to load a properties file that is located in the same folder as the JSP file:
Properties titles = new Properties();
titles.load(new FileReader("titles.txt"));
The code above throws a FileNotFoundException.
How exactly does one refer to the 'current folder' in this situation?
...
Does anyone know if there is a good (where good is stable enough to use, and open-source) webSocket servlet implementation? The one that possibly complies with draft spec 76 (the latest one).
...