I've got a simple JSP that has the use bean and set
property tags like this:
jsp:useBean id=MyCart scope=session
class=CartBean
jsp:setProperty name=MyCart property=* /
/jsp:useBean
Later in the FORM tag, I use the MyCart bean to
populate the input fields like this:
INPUT TYPE=TEXT NAME=phone
Put this at the begining of your doPost() or doGet():
HttpSession session = req.getSession(false);
// check if session expired or new.
if (session == null || session.isNew())
{
//redirect here
return;
}
--- Gerry Duhig [EMAIL PROTECTED] wrote:
This is an
Craig R. McClanahan [EMAIL PROTECTED] wrote:
Tomcat 3.x does not include this feature,
although you could write it
yourself.
Hi Craig, Would you please give me a few more details
about how to start to write this type of module.
Thanks.
__
Do
Here is a URL that that ponits to an article that
describes how to setup soap with Tomcat.
http://www-ibm.com/developerworks/webservices/library/ws-peer2/?dwzone=ws
The short version is to edit tomcat.bat and add
soap.jar and xerces.jar to the beginning of the
classpath.
BTW - In your note you
What if you don't create the session until you switch
to https?
A session is pinned to a domain. The domain includes
the scheme (http or https) so when you switch from
http to https you will loose your session. Also the
port number will change, which changes the domain.
--- Brigger Patrick
I don't think you are missing anything.
The jar files in your web apps. web-inf/lib directory
can not be seen from classes loaded from outside of
your web app. Someplace you are probably loading a
class that does not have access to the jar files in
your web app.
--- Tait, Allen [EMAIL
Look at ResourceBundle in the java docs.
You can use the getBundle()method to load property
files. The classpath is searched for the property
file. So you can put the property file in you web
apps. classes directory or in a jar file under
lib.
--- Batsheva Raviv [EMAIL PROTECTED] wrote:
has
First, you need to increase your environment space.
I'm on NT and don't remember the parameter to
command.com that enlarges the environment for W98.
Try help command at the command prompt to find the
right parameter.
Next, you need to pay attention to the error message
about 8.3 file names. You
I've seen this many times when the browser has the
image file cached. I don't think Tomcat likes it when
the browser closes the socket first. If you are
displaying your web page correctly, I wouldn't worry
to much about this one.
--- Tamilmanam Sambasivam [EMAIL PROTECTED]
wrote:
Hai,
In
Jose,
If cookies are enabled for IE, why does your output
say:
sessions.fromcookie = false
for IE?
H...
--- Jose Luis Rodriguez [EMAIL PROTECTED] wrote:
Yes, the cookies are enabled in my IE.
Saludos,
José Luis
Ralph Einfeldt wrote:
To me it looks like you don't have cookies
:
Well, I have seen in IE configuration Tools/Internet
options/Security/Internet-Intranet (Cookies enable).
I think that cookies are enabled.
Thanks,
José Luis
Wyn Easton wrote:
Jose,
If cookies are enabled for IE, why does your
output
say:
sessions.fromcookie = false
for IE
Mark,
What version of Tomcat are you running?
One of my co-developers said he had this problem on
3.2.1.
--- Mark French [EMAIL PROTECTED] wrote:
Hi,
I'm using tomcat on solaris x86 and have the
following
problem that when I place parameters such as vectors
any removal of elements seems
Yes, you do return from the rd.forward() method call.
I always put a return; after such a call in my
servlets. Since your forward is done in the bean
try something like this:
% userChk.setPageInfo(request, response);
if(!userChk.IsValid())
return;
%
If you are interested, you can look
Just a guess, but since getAttributeNames() is a valid
servlet method, maybe you are picking up an old
servlet.jar file. Check out your classpath and make
sure you are pointing to servlet.jar in the 3.2.1
tomcat you just installed.
--- Ekrem Aksoy [EMAIL PROTECTED] wrote:
I am using 3.2.1 on
After a bunch of trial and error and some help from
Jason Hunter's NEW Servlet Programming (2nd Edition)
Book we finally got our JSPs and Servlets to support
foreign languages.
I'm going to put what we did in this note for anybody
else that may need to do this and ask a related
question at the
Use the single quote (') in the HTML that has double
quotes.
Like this:
input type=text value='Hello'
--- Christoph Kukulies
[EMAIL PROTECTED] wrote:
Sorry that this is not directly tomcat related but
in the course of
writing a jsp/servlet application I came across the
problem
that I'm
The session is usually used to persist objects between
tranactions with the client (browser).
If you are gathering several input fields to write to
the database towards the end of the session then
using the session is the way to go.
Or, you could use Java Script to gather all of the
input fields
Welcome to the world of web programming ;-
I had the same problem a while back.
What we did was create a "key" for each new logon.
By logon I mean that requests always came to one
servlet before going to other servlets or JSPs.
This "main" servlet would generate a unique key and
pass it to other
Hello,
Could someone help me understand the following
situation?
I have two servlets (s1 and s2) and one jsp (j1).
If I do this in s1:
request.setAttribute("str1", "Hello");
then forward to s2:
...forward(request,response);
In s2 I do this:
request.setAttribute("str1", "So Long");
then forward
--- "Kresimir (Binsco)" [EMAIL PROTECTED] wrote:
Hi,
Question:
I installed and configured tomcat successfully - but
when accessing the jsp(s) I wrote with
Internet Explorer, one out of five (on average)
requests results in browser
message: This page cannot be displayed...
etc...etc...
Hello,
I have been reading everything I could find about
ServletContext and have not been able to find an
example of how to share a servlet in one web
application with servlets in other web applications.
I can get a RequestDispather for a servlet in another
web application, but when I "forward"
OST to send the data. So half the implementation is working.
Any help will be appreciated.
armas
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
=
Wyn Eas
he mechanism to send POST data from
the
applet. Maybe here is my mistake.
I haven't tried calling doPost from the doGet method.
Wyn Easton wrote:
Carlos - I'm curious, how are you sending the data from the applet
to the servlet? Why do you think the applet is setup to use
ribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http:
umBytes1);
}
catch(IOException ioe)
{
...connection gone
.
.
return;
}
...read the input
The in.available() never throws an exception if the web server
times out and breaks the connection.
Is there some way to tell if the servlet/web server has disconnected?
Thanks.
===
: [EMAIL PROTECTED]
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
-
To unsubscribe, e-mail: [EMAIL
quot;JspInclude");
if (jspIncld != null)
if ( jspIncld.equals("true"))
{
doGet(request,response);
return;
}
... do normal servlet processing ...
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/
Wyn Easton wrote:
-- for carnell - I lost the message link
I had a moment to look at the Tomcat source and in
RequestDispatcherImpl saw that the service() method is called
for RequestDispatcher's forward() and include().
JSP's _jspService() is like a regular servlet's service
Check out the jspc.bat file shipped with Tomcat.
--- Stéphane_Laurière [EMAIL PROTECTED] wrote:
Using Tomcat, is there a way like in RESIN, to precompile all jsps ?
Regards,
Stephane
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo
, and add in
some
System.err.println,
and neither doGet or doPost is being called. :(
Craig.
- Original Message -
From: "Wyn Easton" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; "C S Carnell" [EMAIL PROTECTED]
Sent: Tuesday, November 14, 2000 5:15 PM
Subject: Re:
t
knowing what your scenario is, nobody can tell if this is a feature
or a bug
:-).
Craig McClanahan
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/
it.
--- Wyn Easton [EMAIL PROTECTED] wrote:
I'm having this problem on 3.2 beta 7
The exact text of the exception is:
java.lang.IllegalArgumentException: Short Read
This Exception is being generated in HttpUtils.java in the
parsePostData() method.
Here is what is happening:
I'm
html
HTML
tags.?
Thanks,
Craig.
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/
by the spec. to do multiple include() method calls?
Thanks.
--- Kitching Simon [EMAIL PROTECTED] wrote:
-Original Message-
From: Wyn Easton [SMTP:[EMAIL PROTECTED]]
Sent: Tuesday, November 14, 2000 12:24 PM
To: [EMAIL PROTECTED]
Subject:Please Look - 3.2 beta 7
-
From: "Wyn Easton" [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 14, 2000 2:55 PM
Subject: Re: Integrating servlet output into JSP
See code added below.
--- carnell [EMAIL PROTECTED] wrote:
If in my JSP page, say bookholiday.jsp, I would like to include
request.getContextPath returns the path for _this_ context, not
a
foreign
one.
-----Original Message-
From: Wyn Easton [mailto:[EMAIL PROTECTED]]
Sent: 11 November 2000 21:57
To: [EMAIL PROTECTED]
Subject: Re: Contexts and dispatchers
-
eters from the request. I do not close my input stream that I got
before calling include(). Could this have something to do with the
exception? Should I close my input stream before the include()?
I don't know what Argument the exception is referring to.
Thanks.
=
Wyn Easton
[EMAIL
Forgot to mention I'm using 3.2 beta 6
--- Wyn Easton [EMAIL PROTECTED] wrote:
Hello,
I'm having trouble using the include() method of RequestDispatcher.
I have a servlet that is accessed via a URL (servlet_A).
servlet_A gets an input stream from the request and reads some data
(all
ServletContext.
request.getContextPath returns the path for _this_ context, not a
foreign
one.
-Original Message-
From: Wyn Easton [mailto:[EMAIL PROTECTED]]
Sent: 11 November 2000 21:57
To: [EMAIL PROTECTED]
Subject: Re: Contexts and dispatchers
--- Richard Evans [EMAIL
nse error occur.
Writer or outputstream has been committed blah blah blah.
I tried response.getWriter().close() and
response.getOutputStream().close().
I even tried out.close but none work.
Can someone please advice on the above and how to go about resolving
the
problems?
Thx n look forward
...
--
Kumera - a new Open Source Content Management System
for small to medium web sites written in Perl and using XML
http://www.cyber4.org/kumera/index.html
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Thousands of Stores. Millions
Got it!
I left in the page directive
%@ page contentType="text/html;charset=utf-8"%
and I surrounded response.setContentType("text/html;charset=8859_1");
with the test for a debug flag.
Works great.
--- Wyn Easton [EMAIL PROTECTED] wrote:
Hi All,
I just changed sev
required to replace a web application?
Thanks.
PS-I'm on 3.2 beta 6
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
From homework help to love advice, Yahoo! Experts has your answer.
http://experts.yahoo.com/
. myappl)in the webapps
folder
4) start tomcat
Good luck!
-
Jacopo
[EMAIL PROTECTED]
http://digilander.iol.it/jacop
--
- Original Message -
From: Wyn Easton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent
in
Wolfgang
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/
will preload them all ?
Tomcat will pre-load all the servlets you request.
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/
nection(HttpC
onnectionHandler.java:160)
at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
at java.lang.Thread.run(Thread.java:484)
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/
ing worked. This seems like a bug to me.
Is this problem already know. I'm using 3.2 beta 6.
Thanks.
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/
48 matches
Mail list logo