[Beginner's Corner] - How to load the form values automatically?
by Francisco Palma
Francisco Palma [https://community.jboss.org/people/fpalma] created the discussion
"How to load the form values automatically?"
To view the discussion, visit: https://community.jboss.org/message/731169#731169
--------------------------------------------------------------
Hi all!
I have done a servlet to manage one form, but when I want to get the values introduced by the user, I have to access to the parameter of the form and update manually the class corresponding to the parameter. This is my code:
When the jsp file is loaded, the user sees the default value from the class "priceIncrease":
<input name="increasepercent" path="percentage" value="${priceIncrease.getPercentage()}" />
When the method doPost is called by the form, the class "priceIncrease" is not updated with the value modified by the user, so I have to do this:
String increase1 = (String) request.getParameter("increasepercent"); // access to the parameter of the form
PriceIncrease increase2 = (PriceIncrease) contexto.getAttribute("priceIncrease"); // access to the corresponding class
increase2.setPercentage(Integer.parseInt(increase1)); // update the class
How can I update the corresponding class (priceIncrease) automatically?
Thank you very much
Fran
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/731169#731169]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
13 years, 11 months
JBoss 7 with Eclipse indigo problem on Linux
by Flavio
Hello,
I need help to solve a problem with jboss startup in Eclipse.
I've already seen these links:
1) https://community.jboss.org/message/557420
2) https://community.jboss.org/message/204014
3) https://community.jboss.org/thread/171123
and many more, but I couldn't find a solution yet.
The problem is that when I start JBoss in Eclipse it stucks
in [Starting, Synchronized] status for a long time and
finally a popup appears. It says that it waited for 450 seconds
and cannot start, but I think it did, instead.
Actually, if I go to http://127.0.0.1:8080 the JBoss AS
home page appears.
I followed these instructions to set JBoss on my PCs:
https://docs.jboss.org/author/display/AS7/Starting+JBoss+AS+from+Eclipse+...
The strange issue is that I have two machines that are both
configured in the same way and only on machine A (see below),
JBoss in Eclipse works correctly.
Let's make a brief overview of my configurations.
A) Desktop PC configured as it follows
- Gentoo Linux x86_64 kernel 3.3.2
- JBoss AS 7.0.2 Final*
- Eclipse Indigo Service Release 2 Build id: 20120216-1857
- JBoss Runtime AS Detector 1.3.0
- JBossAS Tools 2.3.0
- dev-java/sun-jdk-1.6.0.31
*jboss-as-7.1.1.Final doesn't work as well
B) Laptop PC configured as above but the JDK is different:
- dev-java/oracle-jdk-bin-1.7.0.3
Both JBoss AS 7.0.2 Final and 7.1.1 don't work with Eclipse.
This is the log when JBoss starts within Eclipse and keeps
on remain [Starting, Synchronized] up to the popup message:
http://pastebin.com/E0Qz9TbE
On both A and B, if the AS is started by command line seems to
work perfectly. I know this could be an Eclipse plugin issue,
but I really don't understand why JBoss 7.0.2 on machine A
works then. This could mean that the Eclipse plugin is working.
Could somebody help me please?
Cheers,
--
Flavio
13 years, 11 months