My background is asp.net development and I took part in several projects where developer team was free to choose server-side programming technology (PHP, ASP.NET[Web Forms/MVC], JSP) & free to buy any CMS.
Looking backward I realize technology & approach we chose often wasn't the best one. I'll enumerate some projects:
One web portal ...
I'm trying to make something simple with Stripes. I've read and heard a lot about easiness of using this framework and about steep learning curve (i.e. learning is quite fast and productive).
But till this moment I can't even create the simplest HelloWorld with Stripes.
All examples I've found demonstrate functionality like: "click on...
In JSP page I want to get IP address of user who view the page. How can ?
...
All the jstl tags which do not involve passing back a value(using tei) are working, but whenever I use a tag like <c:forEach var="abc">...<%=abc%></c:forEach> i am getting an error abc cannot be resolved.
<c:forEach var="i" begin="0" end="<%=len%>">
<%str+=" Parameter type= " + (String)(tArray[i]) + " Parameter Value= "+ pArray[i];
lo...
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...
In a JSP file I'm getting a:
Type expected (found 'try' instead)
Error while attempting to set up a connection. This leaves me with two questions. What is going wrong here? and more generally, what causes 'Type Expected' Errors in JSP? Since I can't find an explanation of the error in a Google search. Here's the code.
<%!
class T...
I'm working as a front-end developer on an old jsp-based cms that is no longer supported by our vendor. At the beginning of a certain page template, the html document starts with:
<!%@ include file = "setCookie.jsp" %>
This will always be the first line of the file. The display is not an issue in Firefox, but IE tweaks out. I've tr...
I am following the spring MVC tutorial
and also reading this article on mvc design patterns
http://www.javaranch.com/journal/200603/frontman.html
Hence I am trying to make an app with like this, that make use of spring mvc structures and frontController design pattern.
1. frontController with the DispatcherServlet from spring, that redi...
In my program, there are two buttons and in the center of the two buttons there is a space for month to display dynamically using JSP, e.g. << current month >>. The << and >> are two buttons.
I need a logical or a programmatic explanation for the following to occur:
When I click on the left button the previous month of the current mon...
how to call a applet in spring control class?
...
I am using Jboss and Netbeans to create Spring MVC web application on windows.
it runs on http://localhost/myapplication/
My project path is D:\Myapplication\
My JSP Views are in D:\Myapplication\web\jsp\
My Javascripts are in D:\Myapplication\web\js\
Controllers are in D:\Myapplication\web\src\java\controller\
I have created 1 cont...
When using displaytag the URL it's generating for paging and sorting is too long for IE.
Is there a way around this without resorting to external paging and sorting?
Cheers.
...
I have a JSP page that renders a block of HTML. In normal usage, I load the contents of the JSP using AJAX (specifically, using jQuery.load()) and insert it into the page. Now, I need to be able to load this block of HTML into a different domain, which means the same-source restrictions won't allow me to use "normal" AJAX.
This block ge...
I have two input fields say val1 and val2 in jsp.Let say val1 is dynamic, I need to restrict user entering the value of val2 not exceeding val1. It can be equal but not more. I tried with onKeypress but i was not able to success. Val1 value can be get from document.getElementById(..).value. Can anyone tell me the efficient way to do this...
I just switched over to Tomcat 6.0.26 from a different Servlet/JSP engine. Previously, null values would print out as an empty String. However, Tomcat is printing out nulls as "null".
<% String str = null; %>
The value of str is <%= str %>.
This outputs
The value of str is null.
How can I get Tomcat to replace nulls with empty/bl...
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...
In my JSP page, i am using
response.sendRedirect(..) to redirect to an HTML page.
Is it possible to use javascript to detect whether a redirect occurred versus a page reload?
Thanks.
...
trying to use this jstl to formulate a json string, how can i make the segment not to put a comma in the end of the last record? note the comma in the end
<c:forEach items="${fileList}" var="current">
{ id:1001,data:["<c:out value="${current.fileName}" />" , "<c:out value="${current.path}" />" , "<c:out value="${current.size...
Hi,
I am having problems in implementing menu navigation in JSF where I am using one header.jsp which is included in all other jsps, from main page forward navigation is working fine but if I want to go to any other page using dropdown menu I am getting javascript error as f: has no value.
here is my header.jsp menu part
<li><a href="...
I want to list options in drop down menu in HTML form but i need to make some options to be multiline .and the options i need to read them from text file.any ideas how to do that?
...