Jsp:setProperty in WebLogic 6.0
Hi,
We are using the WebLogic Web container with the Apache server and we
have encountered a problem with the <jsp:setProperty> and
<jsp:getProperty> tags. We are using WebLogic 6.0sp1.
Reading the newsgroups, I noticed that this tag did not work in the
previous versions of WebLogic and I was wondering if it has been fixed
in 6.0sp1. Here's the snippet of JSP page that I use:
<jsp:useBean id="beanName" scope="session"
class="com.imoney.aplications.BeanClass">
<jsp:setProperty name="beanName" property="userId" value='<%=
request.getParameter("userId") %>' />
</jsp:useBean>
The problem is that the property userId of the bean with name beanName
is not set by this tag. The JSP page compiles properly. The bean
instance beanName is unique in the user session context.
Thank you for any help,
Brenda.
[att1.html]
Hi,
We are using the WebLogic Web container with the Apache server and we
have encountered a problem with the <jsp:setProperty> and
<jsp:getProperty> tags. We are using WebLogic 6.0sp1.
Reading the newsgroups, I noticed that this tag did not work in the
previous versions of WebLogic and I was wondering if it has been fixed
in 6.0sp1. Here's the snippet of JSP page that I use:
<jsp:useBean id="beanName" scope="session"
class="com.imoney.aplications.BeanClass">
<jsp:setProperty name="beanName" property="userId" value='<%=
request.getParameter("userId") %>' />
</jsp:useBean>
The problem is that the property userId of the bean with name beanName
is not set by this tag. The JSP page compiles properly. The bean
instance beanName is unique in the user session context.
Thank you for any help,
Brenda.
[att1.html]
Similar Messages
-
Hi.
My helper class (implementing HttpSessionBindingListener) is put into
the HttpServletSession.
What I want is valueBound()/valueUnbound() on creation/deletion of the
session.
The following code:
<jsp:useBean id="usession" scope="session"
class="net.icteam.frame.session.UserSession"/>
<jsp:setProperty name="usession" property="httpRequest"
value="<%=request%>"/>
<jsp:setProperty name="usession" property="httpResponse"
value="<%=response%>"/>
fires a valueBound()/valueUnbound() for every(!) <jsp:setProperty.../>
My Question:
Is this normal behaviour?
Btw, the following code behaves normal(?):
<jsp:useBean id="usession" scope="session"
class="net.icteam.frame.session.UserSession"/>
<%
usession.setHttpRequest(request);
usession.setHttpResponse(response);
%>
regards,
Roman
Sounds like the correct behavior to me. Is there some specific thing that
you are trying to do?
Peace,
Cameron Purdy
Tangosol Inc.
<< Tangosol Server: How Weblogic applications are customized >>
<< Download now from http://www.tangosol.com/download.jsp >>
"Roman Heinz" <[email protected]> wrote in message
news:[email protected]...
> Hi.
>
> My helper class (implementing HttpSessionBindingListener) is put into
> the HttpServletSession.
>
> What I want is valueBound()/valueUnbound() on creation/deletion of the
> session.
>
> The following code:
>
> <jsp:useBean id="usession" scope="session"
> class="net.icteam.frame.session.UserSession"/>
> <jsp:setProperty name="usession" property="httpRequest"
> value="<%=request%>"/>
> <jsp:setProperty name="usession" property="httpResponse"
> value="<%=response%>"/>
>
> fires a valueBound()/valueUnbound() for every(!) <jsp:setProperty.../>
>
> My Question:
>
> Is this normal behaviour?
>
>
> Btw, the following code behaves normal(?):
> <jsp:useBean id="usession" scope="session"
> class="net.icteam.frame.session.UserSession"/>
> <%
> usession.setHttpRequest(request);
> usession.setHttpResponse(response);
> %>
>
> regards,
> Roman
-
How To Deploy Jsp project in Weblogic 8.1
Plz help me
How To Deploy Jsp project in Weblogic 8.1
Give me steps.Plz help me
How To Deploy Jsp project in Weblogic 8.1
Give me steps.(1) Create a standard WAR file that contains your JSPs.
(2) Deploy to WebLogic by any number of means (e.g., Ant tasks, putting WAR file in application directory for your WL domain, etc.)
% -
How to run JSP pages in weblogic 8.1 sp2
hi frnzs,
plese give me some idea about how to run JSP pages in weblogic server.enen i dont know hw to fly palne otherwise i can definitely give u sm guides abt that......
-
jsp:setProperty .. method throws null pointer exception...
my simple jsp page :
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%--
The taglib directive below imports the JSTL library. If you uncomment it,
you must also add the JSTL library to the project. The Add Library... action
on Libraries node in Projects view can be used to add the JSTL 1.1 library.
--%>
<%--
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
--%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>JSP Page</h1>
<jsp:useBean id="user1" class="com.netman.beans.UserBean">
<jsp:setProperty name="title" property="title" />
<jsp:setProperty name="name" property="name" />
</jsp:useBean>
Name : <%= user1.getName() %><br>
Title : <%= user1.getTitle() %>
</body>
</html>
// -- my bean class -- //
package com.netman.beans;
public class UserBean
private String name;
private String title;
/** Creates a new instance of UserBean */
public UserBean()
public void setName(String name)
this.name = name;
public String getName()
return name;
public void setTitle(String title)
this.title = title;
public String getTitle()
return title;
}when I try to view the jsp page, i am getting the following exception :
org.apache.jasper.JasperException: Exception in JSP: /test.jsp:25
22: <h1>JSP Page</h1>
23:
24: <jsp:useBean id="user1" class="com.netman.beans.UserBean">
25: <jsp:setProperty name="title" property="title" />
26: <jsp:setProperty name="name" property="name" />
27: </jsp:useBean>
28: Name : <%= user1.getName() %><br>
Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
org.apache.jasper.JasperException
org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:359)
org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:306)
org.apache.jsp.test_jsp._jspService(test_jsp.java:68)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NullPointerException
org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:320)
org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:306)
org.apache.jsp.test_jsp._jspService(test_jsp.java:68)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
and my request URL is http://localhost:8080/TestApp/test.jsp?title=Super&name=Great
what could be the problem?how stupid i'm..
instead of using the bean name in setProperty I have used the property name...
!!! -
Hi,
I have several questions regarding this topic:
1) Does Weblogic 5.1 supports Custom Tags ? If so, are there any known
problems ?
2) Does Weblogic come with any tag libraries (for loops, if, etc) and where
can I get them ?
3) Are there any tag libraries out there (JRun, for example) that have been
successfully run on Weblogic ?
Any help would be much appreciated.
Thanks,
Jamie
As there seems to be general interest, a link would probably be a great
help.
Regards
Daniel Hoppe
-----Original Message-----
From: Michael Girdley [mailto:[email protected]]
Posted At: Friday, August 25, 2000 8:03 AM
Posted To: jsp
Conversation: Custom JSP Tags for Weblogic
Subject: Re: Custom JSP Tags for Weblogic
Please see the documentation:
http://www.weblogic.com/docs51/resources.html
Michael Girdley
BEA Systems Inc
"Jamie" <[email protected]> wrote in message
news:[email protected]...
> Update
> =======
>
> Weblogic Portal has some Tag libraries. I've downloaded the trial
version
> of
> the Weblogic Commerce Server. How do I get the tag libraries and use
them
> on WL 5.1 ?
>
> Answers to original post still wanted
>
> Thanks,
>
> Jamie
>
> Jamie <[email protected]> wrote in message
> news:[email protected]...
> > Hi,
> >
> > I have several questions regarding this topic:
> >
> > 1) Does Weblogic 5.1 supports Custom Tags ? If so, are there any
known
> > problems ?
> >
> > 2) Does Weblogic come with any tag libraries (for loops, if, etc)
and
> where
> > can I get them ?
> >
> > 3) Are there any tag libraries out there (JRun, for example) that
have
> been
> > successfully run on Weblogic ?
> >
> >
> > Any help would be much appreciated.
> >
> > Thanks,
> >
> > Jamie
> >
> >
>
>
-
JSP 1.2 and jsp:setProperty
Has anyone got an idea why they decided to change the way the tag jsp:setProperty is handled?
In the JSP 1.1 specification, the condition to be checked before calling a single property set method was that the request contained the corresponding parameter, no matter what its value was, and the generated code would look something like this
String s1 = request.getParameter("example");
if (s1 != null) setExample(s1);
In the JSP 1.2 specification, it says the property is set only if the corresponding parameter' s value is not an empty string, as in
String s1 = request.getParameter("example");
if (s1 != null && s1.length() > 0) setExample(s1);
Which is what it would do with the setProperty with property="*", according to the JSP 1.1 specification.
This will cause me some trouble, because I will have to change my JSPs code in order to have bean variables set to empty string when the user doesn't input any value in the form (with beans having scope "session", of course).I have not found any reasonable explaination for this.
The easiest fix that I could think of was on my JSP
pages before I submit I check to see if the value of
the field is "", if it is I set the value to
"emptyString". On the bean side I check the value of
the field property passed to see if it is
"emptyString" if it is I set it to "".
But this all seems an annoying nuisance when an empty
string is a perfectly valid value.I think I will fix it by having a reset method called in every JSP containing a form after the form itself has been "written" on the output stream with its fields' values. The thing is that I can't really find a good reason for this change they made: I can't believe there's a developer out there who would find this an improvement. The only thing I can think of is that they wanted to make the setProperty for a single property and the setProperty with property="*" have the same behaviour (the one I don't like). -
Dear fouramites,
I am using jsp SetProperty standadr action tag to set from values to beans. In update when I am changing any form field value it is working fine but when I am deleting the form field value the previous value is being set to bean.
What is the solution to this problem?
Thanks & Regards
Kavyaanjali JenaDear Ram,
I am using the following code for both save and update functionality.
<html>
<%@ page session="true"%>
<%@ page language="java" %>
<%@ page import="models.*"%>
<%@ page import="beans.*"%>
<%@ page import="java.util.*"%>
<%
<jsp:useBean id="DATA_MODEL" scope="session" type="models.BeanInterface" />
<jsp:setProperty name="DATA_MODEL" property="*"/>
<jsp:forward page="/servlet/FrontController" />
</html>
When I change the value This code could set value to bean but when I totally delete the value it could not set null to bean but old value is retained.
I am using FrontController architecture.
Thanks & Regards
Kavyaanjali Jena -
How to deal empty field with jsp:setProperty ...
Ive come across a bug in what I've done so far, not sure if its because of my approach...
I sucessfully store a value entered in a text field in a bean without any problems, and navigate back to the page where the value re-appears (via html, not relying on the browser). The problem is, if I edit that field to be blank, resubmit, then navigate back, the old value returns.
As far as I can tell, this is due to my jsp interpreting the input as null (ie. no input) and not changing the tag. IE sends the parameter as myPage.jsp?para1=¶2=some+value as it should (where para1 is the input in question).
I use the 'parameter="*"' usage of jsp:setProperty - is that a problem? Does this usage of setProperty not allow for setting values back to "" ? If so, how can i overcome this problem without losing the benefits of using <jsp:setProperty name="myBean" property="*">, that is, you can store all property values in javaBean in one go, instead of repeatly using <jsp:setProperty name="myBean" property="myProperty" value="myValue"> for each property.hi,
first clearly tell u' r problem and then only any one can help u.
we are not unable to understand u'r query. it's like a Composition.
Bala
Message was edited by:
art84 -
Can any one tell me how param is used in Jsp:setProperty ?
Hi Can anyone please explain me with example how param attribute is used in <jsp:setProperty>?
I have gone through the java doc but it still not clear to me....Try the [JSP syntax reference|http://java.sun.com/products/jsp/syntax/2.0/syntaxref2025.html#8856]
It is very rare that you would use the param attribute, as most times you have your incoming parameter and bean property having the same name.
Example:
Say you navigate to http://localhost:8080/myApp/myPage.jsp?username=Bob
That sends a request parameter "username" with the value "Bob"
If we have a bean which also has a property username (getUsername(), setUsername()) (ie the property and the parameter have the same name) you can use the following jsp code:
<jsp:useBean id="user" class="com.mypackage.User"/>
<jsp:setProperty name="user" property="username">Translates approximately into
User user = new User();
user.setUsername(request.getParameter("username"));If instead the bean had a property "username" but the parameter was "userId"
<jsp:useBean id="user" class="com.mypackage.User"/>
<jsp:setProperty name="user" property="username" param="userId">
User user = new User();
user.setUsername(request.getParameter("userId"));Cheers,
evnafets -
Configuring JSP's in Weblogic server 7.0
Hi,
I'm trying to port my web application from weblogic server 6.1 to weblogic
7.0. I'm having a little problem with jsp pages in weblogic 7.0. Some of the text
box controls which are populated dynamically in my jsp pages are getting populated
with
"null" value in WL 7.0 e.g. in the following case
<%
String claim_id=null;
%>
<input type=text value=<%= claim_id %> >
on weblogic 6.1 an empty string is printed but in wl 7.0 null is printed as the
value for the text field.
I used the domain configuration wizard in wl 7.0 to make a WLS Domain and then
deployed my application. If I deploy the same application in one of the examples
domain which is installed with Weblogic 7.0 then everything works fine. So its
definity a configuration issue.
Could someone please help me with this.
Thanks,
-Taqdees.As per the j2ee 1.2, jsp 1.2 specification mandates that the expressions
default must be "null".
We have introduced a new flag in weblogic.xml called printNulls which is
true by default meaning that "null" will be the default.
Setting this to false makes sure that expressions(<%=expr%> ) with "null"
results are printed as "" (earlier behavior)
Here is how to configure the printNulls from weblogic.xml :
<weblogic-web-app>
<jsp-param>
<param-name>printNulls</param-name>
<param-value>false</param-value>
</jsp-param>
</weblogic-web-app>
Regards,
Eric
"taqdees malik" <[email protected]> wrote in message
news:3daaff99$[email protected]..
>
Hi,
I'm trying to port my web application from weblogic server 6.1 toweblogic
7.0. I'm having a little problem with jsp pages in weblogic 7.0. Some ofthe text
box controls which are populated dynamically in my jsp pages are gettingpopulated
with
"null" value in WL 7.0 e.g. in the following case
<%
String claim_id=null;
%>
<input type=text value=<%= claim_id %> >
on weblogic 6.1 an empty string is printed but in wl 7.0 null is printedas the
value for the text field.
I used the domain configuration wizard in wl 7.0 to make a WLS Domain andthen
deployed my application. If I deploy the same application in one of theexamples
domain which is installed with Weblogic 7.0 then everything works fine. Soits
definity a configuration issue.
Could someone please help me with this.
Thanks,
-Taqdees. -
Question abt jsp:setProperty property="*" behavior
Hi,
I am trying to use the following tag
<jsp:setProperty name="formBean" property="*"/>
what this supposed to do is that if you have a bean which has same property names as your html form then instead of setting each property one by one this maps all the bean properties and assign the values.
However when I tried that it works as suggested but then I change a field name in my bean and recompile and run the jsp again, but it still works. I am not sure whether it is some kind of caching issue? I would think it shoould not set the form values as the bean field name doesn't match up with the form's property name. Please adviceI believe that the mechanism uses the bean's method names, not the field names, to determine what to call when you do property="*". so you can have the following
class MyBean{
String addr;
public void setAddress( String str ){
addr = str;
when you do this:
<jsp:setProperty name="bean" property="address"/>
it calls setAddress( String ). -
jsp:setProperty doesn't work with short properties
Hi,
Setting bean properties doesn't work with properties that are of type short.
Any ideas what's going on? I'm using WLS 6.1SP1 on W2K.
--John
<jsp:useBean id="test" scope="session" class="test.Test" />
<jsp:setProperty name="test" property="*" />
-- Test.java
package test;
* @author john
public class Test {
/** Creates new Test */
public Test() {
public short getShort() {
return 0;
public void setShort(short val) {
Produces the following error while attempting to compile the jsp:
Compilation of
'C:\bea\wlserver6.1\config\cleanoffer\applications\.wlnotdelete\WEB-INF\_tmp
warCleanOffer Server_CleanOffer Server_test\jsp_servlet\__test.java'
failed:
C:\bea\wlserver6.1\config\cleanoffer\applications\.wlnotdelete\WEB-INF\_tmp_
war_CleanOffer Server_CleanOffer Server_test\jsp_servlet\__test.java:104:
setShort(short) in test.Test cannot be applied to ()
probably occurred due to an error in /test.jsp line 7:
<jsp:setProperty name="test" property="*" />
C:\bea\wlserver6.1\config\cleanoffer\applications\.wlnotdelete\WEB-INF\_tmp_
war_CleanOffer Server_CleanOffer Server_test\jsp_servlet\__test.java uses or
overrides a deprecated API.
Full compiler error(s):
C:\bea\wlserver6.1\config\cleanoffer\applications\.wlnotdelete\WEB-INF\_tmp_
war_CleanOffer Server_CleanOffer Server_test\jsp_servlet\__test.java:104:
setShort(short) in test.Test cannot be applied to (<null>)
test.setShort(null); //[ /test.jsp; Line: 7]
^
Note:
C:\bea\wlserver6.1\config\cleanoffer\applications\.wlnotdelete\WEB-INF\_tmp_
war_CleanOffer Server_CleanOffer Server_test\jsp_servlet\__test.java uses or
overrides a deprecated API.
Note: Recompile with -deprecation for details.
1 error
Fri Nov 09 00:24:58 PST 2001
[test.war]
It looks like a bug in JSP generator. If you look and the .java
created by 6.1 it doesn't make any sence:
String _propertyValue = request.getParameter("short");
if (_propertyValue != null && !_propertyValue.equals(""))
test.setShort(null);
(needless to say that this works correctly in Resin).
John Hampton <[email protected]> wrote:
> Thanks for reply,
> Changing getShort and setShort to getId and setId makes no difference. I
> still get the error described below:
> C:\bea\wlserver6.1\config\cleanoffer\applications\.wlnotdelete\WEB-INF\_tmp_
> war_CleanOffer Server_CleanOffer Server_test\jsp_servlet\__test.java:104:
> setId(short) in test.Test cannot be applied to (<null>)
> test.setId(null); //[ /test.jsp; Line: 7]
> John
> "Jignesh" <[email protected]> wrote in message
> news:[email protected]...
>>
>> hi,
>> i think you have not given the property name properly.
>> give some other name than short becuase short is the keyword (data-type)in
> java.
>> bye,
>> Jignesh
>>
>>
>> "John Hampton" <[email protected]> wrote:
>> >Hi,
>> >
>> >Setting bean properties doesn't work with properties that are of type
>> >short.
>> >Any ideas what's going on? I'm using WLS 6.1SP1 on W2K.
>> >
>> >--John
>> >
>> ><jsp:useBean id="test" scope="session" class="test.Test" />
>> ><jsp:setProperty name="test" property="*" />
>> >
>> >-- Test.java
>> >package test;
>> >
>> >/**
>> > *
>> > * @author john
>> > */
>> >public class Test {
>> >
>> > /** Creates new Test */
>> > public Test() {
>> > }
>> >
>> > public short getShort() {
>> > return 0;
>> > }
>> >
>> > public void setShort(short val) {
>> > }
>> >}
>> >
>> >Produces the following error while attempting to compile the jsp:
>> >
>> >Compilation of
>>
>>'C:\bea\wlserver6.1\config\cleanoffer\applications\.wlnotdelete\WEB-INF\_tm
> p
>> >warCleanOffer Server_CleanOffer Server_test\jsp_servlet\__test.java'
>> >failed:
>>
>>---------------------------------------------------------------------------
> -
>> >----
>>
>>C:\bea\wlserver6.1\config\cleanoffer\applications\.wlnotdelete\WEB-INF\_tmp
> _
>> >war_CleanOffer Server_CleanOffer Server_test\jsp_servlet\__test.java:104:
>> >setShort(short) in test.Test cannot be applied to ()
>> >probably occurred due to an error in /test.jsp line 7:
>> ><jsp:setProperty name="test" property="*" />
>> >
>>
>>C:\bea\wlserver6.1\config\cleanoffer\applications\.wlnotdelete\WEB-INF\_tmp
> _
>> >war_CleanOffer Server_CleanOffer Server_test\jsp_servlet\__test.java
>> >uses or
>> >overrides a deprecated API.
>> >
>>
>>---------------------------------------------------------------------------
> -
>> >----
>> >Full compiler error(s):
>>
>>C:\bea\wlserver6.1\config\cleanoffer\applications\.wlnotdelete\WEB-INF\_tmp
> _
>> >war_CleanOffer Server_CleanOffer Server_test\jsp_servlet\__test.java:104:
>> >setShort(short) in test.Test cannot be applied to (<null>)
>> > test.setShort(null); //[ /test.jsp; Line: 7]
>> > ^
>> >Note:
>>
>>C:\bea\wlserver6.1\config\cleanoffer\applications\.wlnotdelete\WEB-INF\_tmp
> _
>> >war_CleanOffer Server_CleanOffer Server_test\jsp_servlet\__test.java
>> >uses or
>> >overrides a deprecated API.
>> >Note: Recompile with -deprecation for details.
>> >1 error
>> >
>> >
>>
>>---------------------------------------------------------------------------
> -
>> >----
>> >Fri Nov 09 00:24:58 PST 2001
>> >
>> >
>> >
>> >
>> >begin 666 test.war
>> >M4$L#!!0`" `(`,@`:2L````````````````4``0`345402U)3D8O34%.249%
>> >M4U0N34;^R@``X^4"`%!+!PBLA:(4! ````(```!02P,$% `(``@`R !I*P``
>> >M``````````````\```!714(M24Y&+W=E8BYX;6RE4DMOVS ,/L^ _P/GTP9,
>> >M4NH=M@YIBC3I@ )M&G3IAIX*1V9B!;)D6'0>WY2GDT6# /FD&1WX,4V]?+
>> >M4L,<:Z>LN4HN>"L!--+FRDRODN?1=_8UN>[$4?L]8W$$)]^/QL"P&6LEX5Y)
>> >M- YA8,G_Q5$<C0H$:0VA(0=V`E0H!Q.E$;(:P37C&4H"LKZ 9Y3BZ.<F%?A0
>> >M\"$T)=M2\I'#BVV@S%9@+$'C?0_JN)18$2@31]*6E5:9D0@+1<7:::O!H>O3
>> >M5:M-LCT,7B6;9TIGXQ"4XJ@@JKX)L5@LN&L,]Y)B-]UCK:;*9!IZ-E\S!T@W
>> >MF!G'(93OC"+EJWV<H[85UCNO'2^.=L0P_H.2M74K1UBZ3YXL.0QM37X#SAM4
>> >M*T\J""XN+[^PM-5J!4X<G2%UM8:GT.O@"1W6<\QY'#'6";'#2_8?>Z.7X2TL
>> >M<,RRJMH\Z_#YYOZN!PD3XGP8(?JC/OS",70KOU29A620\E2(VT&R$4FVRYKY
>> >M%>ZW-4L114ZY$UO#U_0UY1Y(UHG:6[2SD6@[=.'5F3^=B9IV#D>WKY JT3;4
>> >M.;['SZTWK>)\[P$_4O<1M$^*+-P/T\J%_G='Z(F9,CDN^<Q5;SU/^O]!H*!2
>> >M_[?"7P3^!'?3M<5A[;\!4$L'"/]33>'A`0``! 0``%!+`P04``@`" #(`&DK
>> >M````````````````" ```'1E<W0N:G-P-4X[#L(P#-US"A.I"P/>D1LAQ,14
>> >MB5X@M!84M4E4&XG>GJ:!R<_OIT?5*?D'0Q>#<M!V25Q;Y8_B4Z?15LY0!OFP
>> >M[QWIH".[ZZV!9HT1EI]P4PW=8[\X8^@EZ?@6/K,/,/2Y4=2"=#'7"XL,,5CH
>> >M1B]2Q$.[.="5K+ V\VJ>=8'@)_XW0/JQM=T7=W+F$@/O=H9PQ81E`F&9_050
>> >M2P<(E)0WZYL```#@````4$L#!!0`" `(`,@`:2L````````````````?````
>> >M5T5"+4E.1B]C;&%S<V5S+W1E<W0O5&5S="YC;&%S<TV/OT[#,!#&OTO2IDT+
>> >M_4.I6-D*`C(@)A +$E,$0ZKN3K!:5R&1$K=/Q<*$Q, #\%"(LQ-%]7!W_MU]
>> >MW]F_?]\_<'&-><#IQ,?,QRFA^Z!RI1\)[N)B1?">BC=)&$4JER^[]T262Y%D
>> >M3*91D8IL)4IE[@WT]$95A$&D9:7#)8=[0F\M=;PI2FT]8P95"[Q%;+:X>Y$1
>> >MB'M!7.S*5#XK8]<W#C=;L1=#>.@P:'T)8\/#3.3K\#79RE3C' [_Q!P79 0<
>> >MNWR[Y4R<.Y=?H$\N'/@<`\[ F <GZ'$UK(?0YPZX'EAB#*X:`\?]:-5=2V8'
>> >M2J=5'N&X4=Y9CL.UM?#,"N=ULQ&::L0/,LLF=G[Z#U!+!PA>>AD-#@$``*4!
>> >M``!02P$"% `4``@`" #(`&DKK(6B% 0````"````% `$````````````````
>> >M````345402U)3D8O34%.249%4U0N34;^R@``4$L!`A0`% `(``@`R !I*_]3
>> >M3>'A`0``! 0```\`````````````````2@```%=%0BU)3D8O=V5B+GAM;%!+
>> >M`0(4`!0`" `(`,@`:2N4E#?KFP```. ````(`````````````````&@"``!T
>> >M97-T+FIS<%!+`0(4`!0`" `(`,@`:2M>>AD-#@$``*4!```?````````````
>> >M`````#D#``!714(M24Y&+V-L87-S97,O=&5S="]497-T+F-L87-S4$L%!@``
>> >0```$``0`!@$``)0$````````
>> >`
>> >end
>> >
>>
Dimitri
-
Modify Collection with jsp:setproperty
Hello:
I have a problem with jsp and struts.
I have a collection of items (List) and view the elments in jsp page. This It works fine.
But the problem happens when i like modify the collection.
The code to view the collection in jsp is:
<jsp:useBean id="ItemListForm" class="com.myapp.struts.ItemListForm" scope="session" />
<html:form action="/ItemEditAction" >
<logic:iterate name="ItemListForm" property="listaItems" id="item" >
<P>
<BASEFONT SIZE="3">
<jsp:getProperty name="item" property="etiqueta" />
</BASEFONT>
<P>
<jsp:getProperty name="item" property="grafico"/>
<P>
</logic:iterate>
<P>
<html:submit>Save File</html:submit>
<html:hidden property="do" value="saveXML"/>
</html:form>
The question is:
How to modify the element "grafico" with jsp:setproperty.
Thanks for all.Thank you, I had forgotten the set part, but then the next problem occurs:
<jsp:setProperty name="date" property="locale" value="${locales.locale}"/>
generates:
org.apache.jasper.JasperException: Unable to convert string '${locales.locale}' to class java.util.Locale for attribute locale: java.lang.IllegalArgumentException: Property Editor not registered with the PropertyEditorManager
could I only use Strings as input? -
Need Help: Problem with JSP setProperty to Bean
Hi,
This is my first time posting to this forum so I am not completely aware how Duke dollars work but if anybody can help me I will be happy to give some... whats normal for solving a problem?? 10??
Anyway... the problem...
I have a simple JSP with a simple HTML <form> that has a text field and a Submit button. Submit takes the user to the next JSP page however the setter method for property 'user' is never called. I can verify this through an attached debugger.
I am using Tomcat 5.5, and I never had a problem like this in previous versions of Tomcat.
I have tried changing the scope of the bean to request however nothing changed. I excluded all my business logic and tested this one more time just to make sure I wasn't inadvertadely screwing with something however this still does not work.
I am sure I am missing something small but for the life of me I can't figure out what.
Here is my code:
index.jsp
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<jsp:useBean id="something" scope="session" class="com.db.servlet.UserBean">
<jsp:setProperty name="something" property="*"/>
</jsp:useBean>
<p>Select</p>
<form id="Form1" method="post" action="multi.jsp">
<p>User: </p>
<input type="text" name="user" size="20"><br>
<input type="submit" value="Submit">
</form>
<br><p>Or select Single mode.</P><br>
<a href="tris.html">tris</a>
</body>
</html>UserBean:
package com.db.servlet;
public class UserBean {
private String user = null;
public UserBean() {
public void setUser(String user) {
this.user = user;
public String getUser() {
return user;
}Oops!
I not only realized my mistake, I also accidentally posted this in the wrong forum. I meant to post in the JSP Forum.
For reference, what I did wrong was I placed my setProperty tag in index.jsp rather than placing it in multi.jsp (the file specified in the form action).
Everything works now.
Maybe you are looking for
-
Unable to export with Sony HDV
Newbie needs help! I am using the Sony HDV 1080 recorder Model HDR-HC5.I can import into Final cut pro 7.0.1. and I am connecting via firewire/i link. But I can not export. The camera turns on as if it is going to record but the screen stays blue and
-
Help needed in designing dynamic images
Hi, I just posted a thread before, but there is something wrong in that post. Any ways, I am new to Java and am trying to design a GUI which has images, which change dynamically. One of the examples is on this webpage http://images.google.com/imgres?
-
Unwanted dot pattern in Photoshop CS4
Recently, a dot pattern of about 35 dots evenly spaced on a straight line repeated on maybe 6 lines, all the same color, have begun to appear on some images I am developing. Overall, the pattern is about 1.5 by 2.5 inches. I am using a new MacPro wit
-
Payroll Log, correction code, correction indicators
Hi Gurus Please help me with the below question thanks for your valuable time?<br /> What is a Payroll Log ? What is a correction indicator which is assigned to infotype 0003? What is a payroll correction run code '" w "? Thanks for your valuable tim
-
Having problems loading certain sites
hi i am having problems with certain web pages. i can load up any web page but have problems when clicking on something with in the page that opens a new window. the window is displayed but loads up no images or text and says done in the bottom left