I have some turkish characters at my website but I am not able to sme characters very well.There is a problem with nonenglish characters. I encoded it with UTF-8 and added some meta tags to fix this issue but the problem still seems same. Could you please look at the website (you can look at the code by using firebug) and tell me where ...
I have two numbers that I need to round to 4 decimal places in JSTL. One is positive:
40.7615811
40.7616
and the other is negative:
-73.9940841
-73.9941
Both need to be rounded to 4 decimal places, as on the second line of each example.
Is there a clean way to do this in JSTL or do I need to do this in a controller class or JSP s...
Hi,
I'm using Java+struts2+JSP as the web application framework.
I have to pass some huge objects through struts actions to my jsp pages. this makes the pages so heavy to load and on the other hand they suck the server's bandwidth out.
Is there any way to send compressed objects via struts2 to a jsp page and decompress them there?
...
I have an html textarea that is used to display a string from a database. The textarea can be edited and any changes are saved to the database.
The problem is that when it recieves entities ® in a string it converts them into their characters, and then when the text is saved the characters overwrite the entities. For example: The da...
I want to store user information after logging in and to display my login and username on every page (using jsp). How can I get access in my jsp views to the session bean that would store information of the user that is logged in?
...
Hi All,
I have a custom action that is implemented with a tag file.
It has one attribute and if this attribute is used, the custom action body must be empty, and vice-versa.
How would I enforce this rule? If this were implemented with a java class, I would simply throw a JSPException, but not sure what to do with a tag file.
Thanks.
...
I would like to concatenate a string within a ternary operator in EL(Expression Language).
Suppose there is a variable named value. If it's empty, I want to use some default text. Otherwise, I need to append it with some static text.
${(empty value)? "none" : value + " enabled"}
This will not compile however. What would be a correct ...
I have a JSP page that handles file downloads.
I set the response header like so:
response.setContentType("application/octet-stream");
response.addHeader("Content-Disposition","attachment; filename="+fileName);
When the fileName contains spaces (i.e. "Business Report.doc"), the browser's dialog window saves the file as "Business".
I...
I'm doing one litle project with JSP for topic Library. I want to create a rating system for books in library when end-user view detail of book and rating for this book. Can anyone give hints or tutorials how to go about this?
...
When I make filter for all jsp pages, the browser goes into an infinite loop,
but when I make filter for only one page, it runs correctly!!
Here is doFilter method, if some one find the error plx tell me...
public void doFilter(ServletRequest request, ServletResponse response,
FilterChain chain) throws IOException, ServletExce...
I have simple JSP:
<jsp:directive.attribute name="severity" type="java.lang.String" required="true"/>
<jsp:directive.attribute name="currentSeverity" type="java.lang.String" required="true"/>
<c:if test="${severity ne currentSeverity}">
<c:url value="/session" var="url">
<c:param name="severity" value="${severity}"/>
...
I'm new to JSP, using Eclipse, and am trying to just get started with templates. I've imported template.tld into WebContent/WEB-INF/tlds.
Guide: http://www.javaworld.com/jw-09-2000/jw-0915-jspweb.html
When I run the test.jsp file, I get this error:
org.apache.jasper.JasperException: /test.jsp(3,0) Unable to load tag handler class "tag...
ok... its a long question. but i think the answer is simple. though i can't find the solution myself. t have the four columns in a row in a jsp page. i would like to add 10 more rows using a loop in the page where the fields will have name like
row1_amount, row1_loantype,row1_date, row1_status
row2_amount, row2_loantype,row2_date, row2_...
I have a navigation menu which I need to include on all my pages....through jsp I just include the that menu
<div id="header"><jsp:include page="../menu_v1.jsp"/></div>
but problem is that my menu contains <html><head></head><body></body></html> Now when I want to use my jqGrid which is define on my new page inside <script></script>i...
We are updating our project from java 1.4 to java6 and trying to move to jboss6 with javaee6.
We completely remade our ejb's and logic. So the the trouble we have now is that no jsp is comipilng on jboss6. So al jsp's run compiled and run correctly on jboss 3.2.1 and jboss5.1 but not on jboss6M4.
So this is out jsp : http://pastie.org/1...
Both of the following JSTL checks return positive - resulting in the inner message being displayed ("image not null"/"image not empty") - even when the current record does not have an image associated with it.
<c:if test="${rec.imgdata != null}">image not null</c:if>
<c:if test="${not empty rec.imgdata}">image not empty</c:if>
The im...
The following is the JSP code.
How the code can be modified such that the location of the file that is selected using "Browse" option must be passed to a java program named new.java
Please advise.
<form action="abc.jsp" method="post" enctype="multipart/form-data" name="form1" id="form1">
Upload File:
<input name="file...
I've been staring at the tag nesting below for about an hour now and I still can't figure out why I keep getting a JspTagException:
"Illegal use of <when>-style tag without <choose> as its direct parent"
Are you not allowed to nest condition tags this deeply in JSTL?
<c:choose>
<c:when test="${rec.image1Available}">
<img alt=...
I have created two JSP programs as follows.
First One: Addmulti.jsp
<html>
<head><title>Upload Excel File</title></head></p> <p><body>
<form action="Test2.jsp" method="post" enctype="multipart/form-data" name="form1" id="form1">
<br><br>
Upload File:
<input name="file" type="file" id="file"><br><br>
<input type="submit" name="Submit" v...
I have a navigation bar and, for some pages, a sub-navigation bar as well. I'd like to make this a module so I can easily import the navigation bars on each page. Easy enough to simply put the code in a JSP file and call:
<%@include file="/WEB-INF/jsp/includes/sub_nav_bar.jsp"%>
the only issue is the links and their labels change de...