jsp

java for vb.net/c# programmer

Duplicate: http://stackoverflow.com/questions/324554 http://stackoverflow.com/questions/323015 I have been a VB.NET /C# programmer for about 5 years now and I think I want to learn the whole Java/J2EE stuff on my own. Do you guys know of any books/sites that help with this? I have taken several java courses in undergrad/graduate scho...

id attribute of subview tag

I am learning jsf. I get class cast exception in java.lang.String when I use the following code: <f:facet name="header"> <f:subview id="header"> <tiles:insert attribute="header" flush="false"/> </f:subview> </f:facet> If I replace the subview id with another name other than header the code runs successfully. Eg <f:facet name=...

Read only spinner

I am learning Jsf.Is there any method for making the spinners read only?I should change the value only using spinners and not directly typing the number.Can i implement that by setting attribute in the spinners.tld file? ...

How to create hyperlink in Spring + JSP

What's the proper way to create a hyperlink in Spring+JSP? There must be a better way than just coding in the <a href="..."> tag. Take for example a page that displays people. The URL is people.htm. The corresponding controller gets people from the database and performs optional column sorting. The JSP might look like: <table> <tr> <t...

\\\\$ converted to \$ in jsp template data

I just stumbled unto a weirdness in my JSP code. It seems that a double backslash followed by a dollar or percent symbol gets converted to a single backslash (plus symbol). That is, the following JSP: <%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %> \\# \\$ \\% \\^ gets rendered as: \\# \$ \% \\^ I'm using JD...

java.awt.Color error

I have this simple Jsp page: <%@ page language="java" import="java.awt.Color"%> <% Color background = Color.white; %> Which fails with following error: java.lang.NoClassDefFoundError at _text__jsp._jspService(/text.jsp:3) at com.caucho.jsp.JavaPage.service(JavaPage.java:75) at com.caucho.jsp.Page.subservice(Page.java:506)...

Showing the current date using JSTL formatDate tag

I am trying to show the current date in my JSP page using JSTL. below is the code I am using. <jsp:useBean id="now" class="java.util.Date" scope="request" /> <fmt:formatDate value="${now}" pattern="MM.dd.yyyy" /> But the above code is not producing any results? Am I missing anything here or is there any better approach for this? I am ...

Servlet/JSP URLs when forwarding requests

My web app has a servlet called admin which when navigated to checks if the user is logged in and if the are directs to the the admin section, but if they aren't it directs them to a JSP page with a sign-in form. The name of the JSP doesn't appear in the URL, it stays as /admin. But then when the JSP posts to another servlet to validat...

Does PHP Have an Equivalent of Java's RequestDispatcher.forward?

In Java I can write a really basic JSP index.jsp like so: <% request.getRequestDispatcher("/home.action").forward(request, response); %> The effect of this is that a user requesting index.jsp (or just the containing directory assuming index.jsp is a default document for the directory) will see home.action without a browser redirect, i....

Custom tld function validation in eclipse

Hi, I am working in eclipse (Ganymede 3.4.1) and have created a ctl TLD : <?xml version="1.0" encoding="UTF-8"?> <taglib version="2.0" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.x...

Using a jsp fmt tag in another tag

I'd like to be able to include the return value of a fmt tag in another tag: <local:roundedBox boxTitle="<fmt:message key="somekey"/>"> content </roundedBox> I've run into this problem multiple times and it just seems like a stupid limitation of jsp. Is there a simple way around this? ...

Convert from unicode in jsp for JSON's eval function.

Im getting a string (simplified) from the backend that should be : { "menu": "Reallocate:"} However it comes to jsp as: { &amp;#034;menu&amp;#034;: &amp;#034;Reallocate:&amp;#034;} and i cannot pass this to the: var data=eval("(" + src + ")"); as it just doesn't like it.. How can i convert this usable format? I know that: src ...

Escaping Special Characters Posted to Servlet

I have a jsp containing a form which posts to a servlet, when the servlet receives the parameters from the form the pound sign (£) is preceded with the following character Â. So £ becomes £. What is causing this and how can I get round it? ...

problem in storing into ms-access as unicode

I have one JSP page which has one text field. am entering some kannada characters and am able to encode it in utf-8 format and am passing this value to another JSP. In alert box am getting correct characters. But when i store into MS-acces by using JDBC-ODBC driver, the values are stored in question mark and while fectching also it displ...

Java/XSLT Problem: Cannot find a matching 1-argument

I get the following error: javax.servlet.ServletException: Cannot find a matching 1-argument function named {http://exslt.org/dynamic}evaluate() at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:841) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:774) The top...

How do I dynamically access request parameters with JSP EL?

I'm looping through a list of items, and I'd like to get a request parameter based on the item's index. I could easily do it with a scriptlet as done below, but I'd like to use expression language. <c:forEach var="item" items="${list}" varStatus="count"> <!-- This would work --> <%=request.getParameter("item_" + count.index)%> ...

JSP as Email template

Is there a way to send a MIME email in which the body of the email is derived from a JSP? I need to send an email with Javamail which contains a table and I figure it would be convenient if I could use a JSP to do all the formatting and layout. ...

How to hide the .jsp extension in my web server urls

I have a JSP web server, with pages that all end with the .jsp extension. How can I hide it in my web server urls without resorting to non-java tricks (e.g., apache rewrite)? For example: instead of typing http://www.sample.com/search.jsp?xxx the user would just type http://www.sample.com/search?xxx ...

JSF generic Exception Handling

If I have an exception in my business layer (e.g. a SQL exception in my JDBC connection bean) how can I propagate it with a custom message to a global error.jsp page? Please help. ...

Saxon Xalan JSP

I have a JSP which attaches a XSL to an XML document pulled from a database. The application is using the Saxon Parser but my XML needs to use the Xalan one. Can a JSP page override which parser to use? ...