String userID = request.getSession().getAttribute("userID");
or
HttpSession session = request.getSession();
String userID = session.getAttribute("userID");
However, really, as you have been told twice, what you want is:
String userID = request.getParameter("userID");
RIght?
Jack
On Sun, 09
For the first question; I would recommend using LabelValueBean
You should have a method "getDropDownValues" which returns a
"Collection" of LabelValueBeans.
On Sat, 8 Jan 2005 18:27:01 -0800 (PST), meena r <[EMAIL PROTECTED]> wrote:
> I am facing issues while the my jsp has to be
> pre-po
I think your going to have a "D'oh!" moment in just a second... I hope I
don't come across as talking down to you, that's not my intent, but I'm
not sure if your missing some fundamental knowledge, or just made a
typical "ARGH!" programming mistake like we all do, so I'm going to
answer as if i
Hi Mark,
Try changing the 'forward' to 'action' in your html:link tag:
Sign in
HTH,
Curtis
Mark McWiggins wrote:
... as I seem to get stuck on the simplest things.
For example:
Sign in
Thanks,
Mark McWiggins
425-369-8286
-
I apologize for the confusion, I was thinking 2 things when I posted.
1 - What was the best design(I'm new to java and struts).
2. How do I solve that specific problem, which may well be a syntax related
issue on the line I specified in the last post.
The web site sets attributes after a user log
I can connect and authenticate via a database no problem. My problem is I
can't compile because of this line,
String userID = session.getAttribute("userID"); - gives an error "cannot
find symbol variable session"
So I changed it to this,
String userID = HttpSession.getAttribute("userID");
...a
I am facing issues while the my jsp has to be
pre-popluated with form data in case of from
validation errors.
The issues are :
1. Usage of
I have a requirement where in the value in the
is a dynamically generated value where I
tried to do the following
">
I got an error messge
Thanks heaps Pavel!
It was the web.xml header that had sunk me.
Had taken mine from the struts-blank.war except I had rolled it forward to
web-app 2.3
BTW if I'm using JSP 2.0, shouldn't the JSTL tag library definitions for
them be able in the web container?
Ie shouldn't they be contained in one
Krisha,
To recap your issue:
JSP -->
SavePlanProfileAction.java
[request.getParameter("regularPlan");] --->
/acctmgmt/updatePlanProfileContent.jsp "Error"
Option A: (your current choice):
JSP:
or
SavePlanProfileAction:
PlanForm planForm = (PlanForm) form;
request.getParameter(
Sorry Jim, I have to agree with the other posters...this is a really
unclear question.
I think what you are asking is this: When a user logs in, i want to
put the user id and password somewhere that i can always find it
easily.
If so, put it in session scope. It will be there until the session
ex
... as I seem to get stuck on the simplest things.
For example:
I have set up Eclipse with MyEclipse (thanks, Jim Barrows, for this
recommendation)
and just trying to get simple page flow working. But I don't seem to
understand 'forwards',
as I have a 2-line index.jsp:
<%@ taglib uri="http://
To access DB in Struts (and elsewhere) there is a Wiki page:
http://wiki.apache.org/struts/DaoRelated
So... anyone that wants to help people w/DAO can add to it.
.V
Jim Douglas wrote:
I have an LogonForm, LogonAction and when a user successfully logs on,
I set Attributes for "userID" and "userName
Maybe it's simple, like I thought it might be, maybe it's not. I gave
him the simple answer, you gave him a not-so-simple answer. Maybe we
helped, maybe we didn't, he'll have to come back with more details if not.
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
h
Maybe we can break this down quick and avoid a long thread.
> I have an LogonForm, LogonAction and when a user successfully logs on, I set
> Attributes for "userID" and "userName".
We don't know (A) where "userID" and "userName" come from or (B) why
you set them as attributes in the session. W
I was ready to reply about three hours ago, but I had a feeling my
answer was way too simplistic... Reading the question again, I'm not so
sure...
As long as you only ever need these attributes in the context of a
request (and that's the case for a JSP or a servlet), just store them in
session
This looks like you are asking some JDBC questions about some specific
database, Jim. Sorry to say this if you are not. If so, let me just
get you going partly by saying that you probably want to use a
PreparedStatement rather than a Statement. Start there? Have you
read up on JDBC?
Jack
On S
One (rather pointed) question: Being that RequestProcessor is one of
the primary extension points for the Action servlet, how will this
new API affect HTTPS protocol handling? I assume that the SSLExt
library will have to be completely rewritten, or are you guys
planning on rolling that functio
I have an LogonForm, LogonAction and when a user successfully logs on, I set
Attributes for "userID" and "userName".
How would be the best way to make this information available to the Web App
regardless of whether I need the data from within a JSP, servlet or class
file(for example, building a
(This is my last comment on this thread)
Like Richard said, if the hidden field is not part of that particular form
you'll see an error/exception. The syntax I'd recommended was to insert a
hidden field IF the data you want to display (that "regularPlan" field) is
from another stored Form (such a
If the hidden field is not part of the form, then you don't want to use the
html:hidden tag in your JSP page, you want to use the plain and then use
request.getParameter("regularPlan" in your Action class to get it.
-Richard
At 10:57 PM 1/6/2005, you wrote:
HI David,
Moreover when I tried to cr
On Sat, 8 Jan 2005 22:16:49 +1000, William Ferguson
<[EMAIL PROTECTED]> wrote:
>
>
You can't nest any custom tags like this.
Following works well with JSP 1.2:
but you need the html-el taglib (it means NOT the original html taglib included
in the minimal struts-lib distribution).
You ha
Yes. Tomact 5.0.28
Is that significant?
William
- Original Message -
From: "Larry Meadors" <[EMAIL PROTECTED]>
To: "William Ferguson" <[EMAIL PROTECTED]>
Cc: "Struts Users Mailing List"
Sent: Saturday, January 08, 2005 11:39 PM
Subject: Re: Runtime expressions
> Is this tomcat 5?
>
>
Is this tomcat 5?
On Sat, 8 Jan 2005 23:11:43 +1000, William Ferguson
<[EMAIL PROTECTED]> wrote:
> Well,
>
> thats the thing, with Struts 1.2.4 (I quoted the wrong version before), I
> could only find the standard TLDs.
> Ie there weren't standard and el versions.
> However the versions that wer
Well,
thats the thing, with Struts 1.2.4 (I quoted the wrong version before), I
could only find the standard TLDs.
Ie there weren't standard and el versions.
However the versions that were supplied appear to suppport runtime
expressions.
Here is the definition for html:errors:
errors
org.apac
Hmm, you did not say in the original email - are you using the html-el tld?
If not, it will not work.
Larry
On Sat, 8 Jan 2005 22:16:49 +1000, William Ferguson
<[EMAIL PROTECTED]> wrote:
> If I have defined
>
>
>
> in a JSP, and I have saved an ActionMessage keyed on 'quantity.0' into the
> R
If I have defined
in a JSP, and I have saved an ActionMessage keyed on 'quantity.0' into the
Request, during execution of my Action,
should I expect either or both of
to generate some output?
does generate the expected output, so why not the others?
What do I need to do to the error messa
Hi,
How do I validate if a field is entered or not using the DynaActionForm?
My HTML form has and buttons. I want to check if
the user has entered some text in the text field and that he has selected
the radio button.
If he has not selected, then show him a error message in the jsp. How to do
t
HI David,
I will explain what I meant.
SavePlanProfileAction.java is a action class and not actionform.
In the JSP I am using a hidden text field
Now I am submitting this JSP to SavePlanProfileAction.java.
In the SavePlanProfileAction.java action class I want to get the value
of the text field c
28 matches
Mail list logo