jsp

Struts2, problem with 2 variables in one address.

Hi. I'm using struts2, now in my jsp file i've got 2 variables: ${server_address} ${pageContext.request.contextPath} Now i want to connect it in my tag: <s:form action="%{server_address}%{pageContext.request.contextPath}/actionName.action"> But generated output looks like that: <form method="post" action="http://10.0.0.5:8088...

How to set cursor focus onload?

Hi, I use h:selectOneRadio tag. I need to set the cursor focus to first radio field. <f:view> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body> <h:form id="focusForm" > <h:selectOneRadio id="testRadioId" value=""> ...

Can't access a property with <html:checkbox property="..."> when iterating a list

Hi. In my Struts form I've got a list. In a JSP I iterate over it like this: <c:forEach items="${MyForm.auspraegungen}" var="auspraegung"> <tr> <td>${auspraegung.name}</td> <td>${auspraegung.forced}</td> <td>${auspraegung.cbx_uebernehmen}</td> <html:checkbox property="auspraegung.cbx_uebernehmen" /> ...

creating a thread in jsp and using join has problem

guys the following code does not wiat for the thread t to complete and join with the main thread, also the "created object" trace is called one more time after join is called please let me know the solution <% AProc empList = new AProc(); System.out.println("******** Created Object **********"); System.out.println("Con...

foreach loop is not working on opened pop up

For each loop is not working in opened popup while the same collection i can see when I write it on page <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>my cart</title> </head> <body> <% ArrayList cart=(ArrayList)session.getAttribute("Cart"); out.println(cart); //this line is working %> <table> ...

Is it possible to access say the 3rd element in a collection with Struts?

Hi. Is there a way to do the following thing in Struts / JSP? <html:checkbox property="list.get(0).checked" /> Thank you in advance. ...

How can i make a Java Daemon

I need to do a periodic operation (call a java method) in my web app (jsp on tomcat). How can i do this ? Java daemon or others solutions ? ...

Update object in Struts action with form values from JSP

I have a struts2 action that builds a form and pre-populates the fields with data from an instance of my object. When I click submit on this form, I get taken to a second action, my formSubmit action. Here I'd like the object to be updated with any new values from the form. Is there an easy way to access this same object in my second ...

How "duplicated" Java code is optimized by the JVM JIT compiler?

I'm in charge of maintaining a JSP based application, running on IBM WebSphere 6.1 (IBM J9 JVM). All JSP pages have a static include reference and in this include file there is some static Java methods declared. They are included in all JSP pages to offer an "easy access" to those utility static methods. I know that this is a very bad wa...

why cookie.getMaxAge() = -1?

i have a test like this : cookie.jsp: <html> <head> </head> <body> <% String cookieName="SNS"; Cookie cookie=new Cookie(cookieName, "maxAgeTest"); cookie.setMaxAge(60*60); response.addCookie(cookie); %> </body> </html> and read.jsp is : <html> <head> </head> <body> <table border=1> <tr><td>Name</td><td>va...

What is session management in Java ?

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...

Add a custom row with displaytag

Is there a way of adding a custom row(s) to the top of a displaytag table? There is a way of adding a footer via display:footer. but why no header? ...

JSP session for each IP address or for each browser

I want to know whether one session is been created for each IP address or for each browser instance? I opened my JSP application in three browser windows. It creates three different sessions? Suppose I want to use a single session for multiple instance of browser, is it possible or not? ...

Struts 1 Date Format Tag

Is there any tag in the Struts 1 tag library which can format a java.util.Date object? In Struts 2, I can use the s:date tag, but I can't find the Struts 1 equivalent. ...

tomcat memory issue

I am having more than 150 web applications in my tomcat web-apps directory can these be the one of the reason for increase in memory usage. i have installed tomcat as a service . ...

JSP problem deploying a java web application in tomcat

I'm learning ANT and I'm trying to deploy a web application in tomcat 6.0.20 server. I build the test application and I deploy it with the manager ant tasks and everything goes right. I load a HTML page and it works... When I try to view a JSP tomcat give me a JasperException, coused by a NullPointerException in the auto-generated Servle...

how to pass information from one jsp page to other jsp page

i have retrieved some data in a jsp page1.i've given link of page2 in page1.i want that when i click the link the data is displayed on page2.how to do that??? ...

Recommended JSP tag libraries

I'm looking for a collection of rich, well-written, stable, customizable and cool jsp 'controls'. JSF has richfaces, primefaces, icefaces GWT has ext-gwt, gwt-ext, advanced-gwt, on-gwt Does something like this exist in JSP? Some tag library that has calendars, sortable and pageable tables, ajax autocompletes, pick-lists, partial req...

jsp (java server page ) on apache2

Is it existing some module for jsp(java server page) like (mod_python, mod_asp, mod_perl,...) for apache2 on windows. Without installing another web server. ...

How do I call a Java function by clicking a Hyperlink?

I have an HTML table with rows fetched from a database displayed in that table. I want the user to be able to delete a row by clicking on a delete hyperlink besides each row. How do I invoke a JSP function on the page, when the user clicks on each of those delete hyperlinks, so that I can delete that row's entry from the database? What ...