I would like to render the same JSP for multiple Struts Actions. I'm having trouble because when rendering the JSP, the bean name is different depending on which Action was called. So, I can't call something like:
<c:out value="${myBean.myProperty}" />
because the bean isn't necessarily called myBean.
Currently, I've been getting ar...
is there any way to send notification between current sessions of a web application?
...
I have checked the validator source code and the examples of user-defined rule in the book "Jakarta Struts Live." When people define validator rules in validator-rules.xml, the following declaration for "methodParams" seems to be the only choice:
methodParams="java.lang.Object,
org.apache.commons.validator.ValidatorAc...
What is the best way to precompile JSP files in Websphere (6.1)?
I have looked at other questions related to JSP precompilations, but as each AppServer has specific settings, I would like to know specifically a solution for Websphere.
I found some references in the net to edit the file ibm-web-ext.xmi:
Add the following line before th...
Does anyone have any information on the performance of JSP runtimes. I haven't found any statistics on them.
For example,are there any performance or memory issues with how I use jsp includes or EL expressions, which ones should I stay away from. Does tomcat have any issues?
...
I have a set of JSP tags that use dynamic-attributes to allow for arbitrary HTML attributes to be passed in to them, like this:
<%-- tag named a:div --%>
<%@ tag dynamic-attributes="attrs" %>
<div <c:forEach var="attr" items="${attrs}"> ${attr.key}="${attr.value}"</c:foreach>>
</div>
I then have another tag that I want to be able to p...
Thanks to everyone in advance -
So I setup a simple test to see how <%@ page errorPage="error.jsp" %> behaves. It seems to execute the said page "error.jsp" when I throw an exception, but if I test syntax errors like missing a ";", I am still getting the tomcat error page. Am I missing something or shouldnt this execute the error page o...
Hi,
I am new to the Java development. I need to populate XML fields in a JSP page.
I didn't do with JDBC actually i have written the Mysql wrapper in C
it executes the query and return the table value as XML.
Help me how to populate the XML fields in JSP?
how to read the XML file using JDBC ResultSet?
Will be much helpful
thanks
...
I'm asking this on behalf of one of my students - "Does anybody have an idea how to convert JSP Struts to Velocity Struts?"
...
I want to develop a website web chat application like yahoo. Only difference is that I want to make it web based not desktop.
I will be implementing it in jsp/php with ajax.
I want to know whether jsp or php will be better for this.
What will be advantages or disadvantages of both.
Which one of the two would you prefer and why?
Will js...
Is there an equivalent to:
<jsp:setProperty name="beanName" property="*"/>
for servlets?
Something that will auto-populate the bean from inside a servlet using the request parameters? I'm refactoring a JSP-only application and would like to move some of the code to servlets. For a bunch of tragic reasons, we are not able (right n...
Hi,
While including css, js and images in my jsps I am facing a problem resolving relative urls. The urls get changed on refreshing the page or clicking the back button. I suppose one solution to the problem would be to include external files by using absolute urls. But I can't find out how to use a reference to the relative url and use...
Hi,
I want to display the body value of JSP in custom tag name Simple from the tag handler by extending the class, BodyTagSupport, but getting a runtime exception ;o)
The JSP code is:
<html><body>
<%@ taglib prefix="mine" uri="simpleTags" %>
Advisor page
<mine:simple>
Balle Balle
</mine:simple>
</html></body>
and the Tag handler cl...
Hello,
I have a JSP custom tag "A" defined in my .tld. It has 3 required attributes. It has its ATagHAndler that inherits SimpleTagHandler.
I need a new tag "B" that does excatly the same thing as the above "A" but in a little different way. Also the attributes that are present in "A", i copied them to "B" in the .tld file (Code duplica...
Hi,
I'm really confused in the following line about the BodyContent class, which I've taken from the Javadoc:
Note that the content of BodyContent
is the result of evaluation, so it
will not contain actions and the like,
but the result of their invocation.
I really don't get it, what do they mean in above line.
...
Hi,
I am trying to access request parameters on a web page and trying to set a hidden fields value to the passed parameter. How can I achieve this using struts2 tags?
Something like...
<s:hidden name="myfield" value="#parameters['myparam']"/>
I have tries using the parameters object but it does not work!
Thanks in advance.
...
Hi all,
I am currently trying to return a model from onSubmit() in my controller. I then am trying to retrieve this in my jsp.
for example
Map model = new HashMap();
model.put("errors", "example error");
return new ModelAndView(new RedirectView("login.htm"), "model", model);
and then retrieving it with
<c:out value="${model.errors}...
Is there a way to use JSP tags in JRuby apps deployed as J2EE apps? For example, if I have a Sinatra app being called through Rack via a JSP tag, can I use JSP tag libraries inside the Sinatra templates (e.g., Haml)?
...
I have the following code for my website, and I want to expand this result to display 10 results per page. If some one can help me I will be grateful.
java.sql.PreparedStatement p = servlet1.DB.query("select * from user where userdate like ");
p.setString(1,userdate);
java.sql.ResultSet r = p.executeQuery();
...
If I have a list object I know that I can bind class property fields to form using the code below.
<c:forEach items="${items}" var="i" varStatus="itemsRow">
<input name="items[${itemsRow.index}].fieldName" type="text"/>
</c:forEach> <form:errors path="items" />
What do I do if the property is a Set object. I have read about initBin...