jsp

jsp tag library changes checkbox name?

I'm trying to use a select all checkbox to select a column of checkboxes. So I gave all the ones I want checked off at once the same name ABoxesElement so that I can easily check them all on in javascript. However when I use firebug in firefox I can see that the checkboxes did not keep the name I gave them but pre-pended the component...

Table Row's onclick event should not affect only one Table data

I have a table in which all the rows are formed using a loop and all data are formed using a inner loop. I have a onclick event for all the rows and the destination will differ, according to the row that is clicked. I want this onclick event for the entire row except the first TableData. How to use a javascript function that will disable...

In JSP, how to output "<br/>"

I have a string var in my Struts2 action, like this: String tmp = "<br/>"; I want to print it out to the html page as HTML tag by JSP, like this: <s:property value="tmp"/> But, in the html page, the < and > was translated to &lt; and &gt; which i don't want to. So how should I do this? ...

How to control cache in JSP page?

I created a Servlet filter with the following code in doFilter: HttpServletResponse httpResponse = (HttpServletResponse)response; httpResponse.setHeader("Cache-Control","no-cache"); httpResponse.setHeader("Pragma","no-cache"); httpResponse.setDateHeader("Expires", 0); chain.doFilter(request, response); I want to make sure that noth...

pre-compile jsp files happend exceptions

I pre-compile some jsp files through ant task of jspc,but it built failed. errers: info.jsp(35,2) The attribute prefix fn does not correspond to any imported tag library info.jsp line 35 : <c:if test="${fn:length(requestScope.checkDetailInfoList) gt 1}"> ant task xml: <jasper validateXml="false" uriroot="${basedir}/WebRoot" ...

Printing a java scriptlet variable as if it is a JavaScript variable

hello i need to output a java variable inside a javascript call inside a tag inside a jsp ! for example: <% String param = "hello";%> <dmf:checkbox name="checkbox" onclick = "selectAll(<%=param%>)" /> the javascript generated is: selectAll(<%=param%>),this); but I actually want something like selectAllCheckBoxes(Hello),this);...

Java web development, what skills do I need?

I want to learn, at least at a basic level, how to build java web applications (coming from a .net background). Meaning, I would like to be able to build, deploy a simple cms type application from the ground up. What exactly do I need to learn? Tomcat seems to be a good web server for Java. What options are there for the web? I kn...

Why http://localhost:8080 availabe while 127.0.0.1 not? (JSP on MyEclipse+Tomcat)

The System's hosts file is fine, 127.0.0.1 localhost is there... Ping 127.0.0.1,or my IP, the result is also fine.. Myeclipse's version is 8.0 and I'm just using the Tomcat within it. A simple JSP+Javabean web project so is deployed. Now the situation is when I open MyEclipse and start the Tomcat, I can access my site throuth http://...

Capture generated dynamic content at server side

Is there any way with which I can capture generated dynamic content on the server side and get that file or string object of the same to the servlet. We can generate dynamic content with JSPs, but we dont have access to the generated dynamic content at the server side. As soon as we do the forward container generates the dynamic content...

SWF (Flex created) In JSP

I created a Flex project, now I want to import it into the JSP, so I have just taken the 'noscript' section and have added to my jsp. But the porblem is that the swf file does not play, any help? Here is the piece of code <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="TeamStructure" w...

Resultset To List

I want to convert my Resultset to List in my JSP page. and want to display all the values. This is my query: SELECT userId, userName FROM user; I have executed that using preparedstatement and got the Resultset. But how to convert it as a List and want to display the result like this: userID userName ------------------ 1001 ...

JSP session variables set in a secure page 'https' are not accessible in a normal 'http' page

I am trying to login a user using a jsp over https and i am storing his userid and some more personal info in a session variable session.setAttribute("userid",98767) when i move on to another non secure jsp ex: http://www/xyz.com/test.jsp and try to acces the session variable session.getAttribute("userid") i always get a null value, whe...

a good JSP framework for a beginning JSP developer

I started looking at JSP yesterday and a question I asked my friend was: "is there not something like an online manual for JSP? Something like php.net" He replied : "There isn't such, because it is expected that you use a framework if you code with JSP" and later recommended that I start with Struts(citing that it has better documentat...

Move File from /tmp to hosting account folder

I have write access to /tmp folder of my shared hosting account at godaddy. I want to move uploaded pictures from /tmp folder to my hosting account folder /home/content/x/y/z/xyz/html/pic/ I am trying to move file through jsp with no success. Folder permissions are set to (read write execute 0777). Godaddy support insists that transfer o...

How can i use JSTL variable in scriptlet?

I have to access the JSTL variable which is calculated inside the iterator. Excerpt of code: <c:forEach var="resultBean" items="${resultList}" varStatus="status"> card: ${resultBean.cardNum} </c:forEach> i would like to access ${resultBean.cardNum} in the scriptlet code. what i am doing right now is: <c:forEach var="resultBe...

Newbie to JSF - Add Grid to Datatable.

Hi, I have this datatable with dynamic columns in my application. I'm trying to figure out why it shows up with no grid. (And how to enable grid for the datatable). The JSP: (You can see a few attempts I made, which failed) <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Celsius to Fahrenh...

How to throw an exception out of my java bean

I use a javaBean in my jsp-application to store form values. This is how I get my values into my bean. This code is part of my form.jsp try { <jsp:setProperty name="formparam" property="*" /> } catch (Exception e){ error = true; } I left the "<%" out to not break the code display on stackoverflow. Now I get my exception ...

Iframe error handling in JSP

Hi All, I have a JSP page which includes an iframe , Iframe contains the image display part & some other part, The problme is whenevr the iframe encounters an error, it gets redirected to error page (Error page is defined for the JSP) but not the whole page, only the iframe conained part of the page displays an error, I want the whole p...

Richfaces scripts / styles not loading

I have a simple scrollableDataTable in a jsf <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <!-- RichFaces tag library declaration --> <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%> <%@ taglib uri="http://richfaces.org/rich" prefix="rich"%> <f:view> <h:...

XML + Write to Relative Path

I have the following folder structure TempProj !-js !-jsp !-WEB-INF !-classes !-lib Inside my lib folder, I have a java file that creates an XML file, I actually need the file to be generated inside the jsp folder. I'm creating using StreamResult result = new StreamResult("test.xml"); I've tried giving the following paths "../....