I've got a simple JSP that has the use bean and set
property tags like this:
Later in the FORM tag, I use the MyCart bean to
populate the input fields like this:
I fill in the FORM stuff and the first time I POST
back to the same JSP all of the form data is set in
the bean. When I change t
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.
__
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 m
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 PROTEC
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 <[EM
What do you mean by "manage my session"?
If you are loading a static page from the web server
where you have already create a session, you don't
need to do anything. Your session cookie will flow
back and forth in the HTTP header and you will still
be able to access the session when you need it i
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:
>
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. Yo
-- Jose Luis Rodriguez <[EMAIL PROTECTED]> wrote:
> 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?
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
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,
>
>
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
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 loo
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 o
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 en
Use the single quote (') in the HTML that has double
quotes.
Like this:
--- 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 generating a FORM whi
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 field
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
--- "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...
> e
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 b
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"
d use HttpURLConnection
> (not sure,
> but I think the latter is derived from URLConnection).
>
> armas
>
> (*) Will not know the results til tomorrow... machine is at home!!
>
>
>
> Wyn Easton wrote:
> >
> > Try adding:
> >
> > uc.setReque
Reader to read whatever the servlet sent back.
>
> My assumption was that this is the 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:
> >
&
elivery method?
>
> The servlet works fine if I test it with a html file that has a form
> which
> uses POST 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 Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Auctions - Buy the
one configure a jsp app to also utilize
> '.class' sevlets?
>
> thanks,
>Steve
>
>
> ---------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
=
Wyn Easton
[EMAIL PROTECTED]
__
}
}while(numBytes<1);
}
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.
---
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>
=
Wyn Easton
[EMAIL PROTECTED]
_
> 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().
> >
uest.getParameter("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/
How 'bout Java's SringTokenizer?
--- Winnie Cheung <[EMAIL PROTECTED]> wrote:
> Hi, how can I split a string in JSP using Tomcat? Is there a split
> function?
> Thanks!
>
=
Wyn Easton
[EMAIL PROTECTED]
__
Do
Winnie,
Check-out the getParameterValues()in ServletRequest.
--- Winnie Cheung <[EMAIL PROTECTED]> wrote:
> Hello,
>
> When I use get.Parameter with a LIST (SELECT) in my form, it only
> collects the first item selected! Is there a reason to this why?
>
> Thanks
>
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]
a doPost, 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" <[EMA
tml tags etc, IE doesn't
> care
> :)
>
> - Original Message -
> From: "Wyn Easton" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, November 14, 2000 2:55 PM
> Subject: Re: Integrating servlet output into JSP
>
>
>
uot;bookholidayshow");
if (rd != null)
rd.include(request, resource);
> %>
>
>
>
> bookholidayshow.java(class/servlet)
> doGet(...)
> {
> out.println... etc..
> }
>
> But how do I use RequestDispatcher in the JSP? Can't make much sense
>
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 PR
Servlet which generate the html/body/end body/end html
> HTML
> tags.?
>
> Thanks,
>
> Craig.
>
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/
ng 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(
ances are you getting this message? There are
> valid
> cases of
> getting this that are required by the servlet 2.2 specification --
> but
> without
> knowing what your scenario is, nobody can tell if this is a feature
> or a bug
> :-).
>
> Craig McClanahan
>
icitly.
>
> Help, anyone?
>
> Richard
>
> >
> > --- Richard Evans <[EMAIL PROTECTED]> wrote:
> > > But I need the context path for a different ServletContext.
> > > request.getContextPath returns the path for _this_ context, not
> a
>
HttpURLConnection, but shouldn't it work either way?
Thanks.
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Calendar - Get organized for the holidays!
http://calendar.yahoo.com/
different 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 PROTECT
--- Richard Evans <[EMAIL PROTECTED]> wrote:
> "/file/x/y". (The URL without the context root). How to I find the
> context
Use request.getContextPath()
If your web app. is called app1 getContextPath() would return /app1
=
Wyn E
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
meters 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 Eas
t, nor a way to determine if it's
> missing ...
>
>
> --
> 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]
; Can someone please advice on the above and how to go about resolving
> the
> problems?
> Thx n look forward to a favorable reply if any?
> Choo Yew Beng
>
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Thousands of Stores. Millions of Products. All in one Place.
http://shopping.yahoo.com/
Good one.
I like it.
Thanks.
BTW-What is L-A-I-N...?
--- Kurt Bernhard Pruenner <[EMAIL PROTECTED]> wrote:
> Wyn Easton wrote:
> > How can I somehow set a debug flag in my JSPs to use US ASCII
> > if the flag is set and UTF-8 if not?
> > I've tried surroundin
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,
>
&g
ava file. I've tried replacing the String
"text/html;charset=utf-8" with a String variable, no luck.
Hmmm...
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Thousands of Stores. Millions of Products. All in one Place.
http://shopping.yahoo.com/
x27;m using named virtual hosts on :
> Apache 1.3.14 : port 80
> Tomcat 3.2b6 : normal http connector commented
>
> on Linux Mandrake 7.2 and NT 4.0
>
>
>
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
>From homewor
remove the web application folder (e.g. myappl)in the webapps
> folder
> 4) start tomcat
>
> Good luck!
> -
> Jacopo
> [EMAIL PROTECTED]
> http://digilander.iol.it/jacop
> ------
>
>
>
> - O
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/
ng WebAppA is replaced by
> WebAppB in
> each entry.
>
> Are there any other locations apart from tomcat/conf, where I have to
> do
> some configuration respectively WebAppB.
>
> Greetings from Berlin
>
> Wolfgang
>
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/
ebAppA is running as expected. All JSPs are compiled and started,
> same with
> sevlets.
> WebAppB is causing an Error 404 with the first servlet and only the
> *.html
> were found.
>
> Does anyone have any idea, what is going wrong there?
>
> Thanx
reload 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/
the amount info to be stored in a
> session.
>
> Any information or suggestions on this subject would be most helpful.
>
> --
> G.C. Miller
> Senior Software Engineer
> Commission Junction
>
=
Wyn Easton
[EMAIL PROTECTED]
__
Do You Yahoo!?
Yahoo! Messenger - Talk while you surf! It's FREE.
http://im.yahoo.com/
nd everything 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/
pServlet.java:853)
> at
>
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
> at
>
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onne
61 matches
Mail list logo