Re: [OT] I didn't know Struts was an antipattern

2003-12-15 Thread Gus Heck
Interesting, I'm not sure I agree, but the patch that he complains about 
not being added sounds useful...

Robert Taylor wrote:

A coworker sent me this link and said it was an interesting read.

http://today.java.net/pub/a/today/2003/12/11/mvc.html?page=1

Personally I don't think the author put much research into Struts or
Java Server Faces (which he doesn't mention at all) before writing
this article which has some interesting points and history about MVC, but
basically
is written to support his new ground breaking Shocks Servlet Framework.
robert



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Problems with character conversion [partial solution]

2003-12-12 Thread Gus Heck
Well after a little poking around, I discovered that it was the 
browser's fault. Setting the character encoding that the browser is 
using allows it to send the character without  escaping it, but then 
one has to also set the encoding when viewing it later. I am wondering 
if there is a way to support the full range of characters in unicode 
without having to set the encoding... The app I am building will not be 
internationalized, but we may want to store some international names and 
places in the DB and it would be nice if they could display correctly 
rather than resorting to anglecized spellings, which might be annoying 
to some people who's names or addresses will be mis-spelled.

Anyone know how to do this?

Gus Heck wrote:


programs fits because they contain a capital dotted I which looks 
like this: I. (set your encoding to Turkish if necessary to view it, 
it should look like a capital i with a dot above it)


heh it seems to give my mailer fits too, as it got converted to I with 
a period after it :)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Can large upload cause tomcat hanging?

2003-12-11 Thread Gus Heck
Lukas,

The reasons cross posts get annoying to me (and I presume others) are 
these: 1.) I can't know what responses are posted on the other list 
without joining it. 2.)if I am on both lists it messes with my message 
filtering rules on my mail reader and usually both copies wind up in the 
same folder and it gets hard to tell which list I am replying to unless 
I reply all and cross post as well. 3.) When searching Archives for 
answers to questions before posting, it is most unhelpful if half the 
conversation is archived under another list. 4.) cross posting to N 
lists creates N times the mail load for the servers, the archives, and 
any other systems involved, and for people subscribed to M out of N 
lists invovled in the cross post it creates M times the list mail to 
deal with.

The only time it seems reasonable to cross post, is when in discussing a 
feature/bug in one product it seems like it may be traced back to a 
problem in a dependant library, and you want the folks on the dev list 
of the library to look into it... (as happened to me recently in the 
case of a problem implementing a solution to a problem discussed on this 
list that exposed a bug in commons-betwixt) Even then, it might still be 
better to craft a separate mail with a link to the archive of the 
discussion, though cross posting in this case does have the advantage of 
supplying the preceeding discussion (assuming it hasn't been deleted 
from the replies) without the day delay for the archive to pick it up.

-Gus

Lukas Bradley wrote:

Understood, but this is a Jakarta rule, not a standard Internet rule.
 

You cross-posted to at least two Jakarta mailing lists. The rule applies.
   

I cross posted nothing.  Zsolt did.   I was just wondering why people are
extremely sensitive about what I consider to be valid cross posts.
Lukas



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Problems w?th character convers?on

2003-12-11 Thread Gus Heck
So I have been prototyping stuff for a project in struts and I decided 
on a whim to see how well it handled unusual international text. So I 
swapped over to a Turkish keyboard which produces several quite unusual 
characters and typed in a couple place names I know give most programs 
fits because they contain a capital dotted I which looks like this: I. 
(set your encoding to Turkish if necessary to view it, it should look 
like a capital i with a dot above it)

What I got back when the results of the form entry were displayed was 
amp;#304;

I am pleased to see that nothing in struts, or elsewhere in my program 
actually died but it would be just slightly cooler if it actually came 
back with #304; (which renders correct, at least in Mozilla). The 
problem is that #304; appears to be what is stored in the database, 
(MySQL 4.0) and it gets re-escaped on the way back out. (the MySQL shell 
does funny things with the double dotted u ()and c () with circumflex 
but those are at least recorded straight up, and not escaped in either 
direction. I did some searching and found this:

http://www.faqchest.com/prgm/tomcat-l/tmct-01/tmct-0111/tmct-011153/tmct01112715_2.html

but that didn't seem to solve the problem. I'm sure this has been solved 
already, I just can't find it. Support for turkish or for that matter 
any other language is not critical to my project but if there is a not 
too painful solution it would be nice to drop it in.

-Gus



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Problems w?th character convers?on

2003-12-11 Thread Gus Heck

programs fits because they contain a capital dotted I which looks like 
this: I. (set your encoding to Turkish if necessary to view it, it 
should look like a capital i with a dot above it)
heh it seems to give my mailer fits too, as it got converted to I with a 
period after it :)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: deployment environment

2003-12-10 Thread Gus Heck
This gave me a crazy idea, and I don't know if it works, but I wonder if 
one could use JNLP/webstart to handle this since it has facilities for 
handling JDK requirements and such. I am not sure how you get the war 
file deployed that way, but it could possibly pull a pre-configured 
tomcat I don't know. The more I think about it, the more 
configuration issues seem to get in the way. Though perhaps you could 
have a small web app that collected the config information, created the 
config files and created a package for the site and then served a 
dynamically generated jnlp file to pull the user's package?

This would have the advantage/drawback of making the tomcat instance 
nearly unconfigurable after the fact I think. Actually, it might not 
work at all. I don't know if webstart can create a directory tree for 
tomcat to work in...

Starting to sound like too much work though... I suppose it depends on 
the savy of the admins at the sites and how many sites you have.

Just a random thought, and I suspect it won't work now that I have 
actually finnished writing this, but I might as well hit send :)

-Gus

struts wrote:

Hi,
I have an intranet application created locally struts framework, tomcat/with a sybase database. I want to distribute to the intranet sites of other users. So basically I need to install tomcat, JDK, .war and the database engine. So my question... What is the best way to install this all at other places ? Install everything seperately ? Or using a Wise, or installshield program ?  And what if there is allready a JDK installed ? or somebody has another idea... ? 
Thanks

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: When HashMap will replace ActionForm ?

2003-12-10 Thread Gus Heck
In my experience (with Ant mostly) the best way to get anything started 
in an apache project is with a patch submitted in the bugzilla :)

Gus

Antony Paul wrote:

Hi,
   Is there any move to support HashMap in place of ActionForm ?. I dont
want to start any argument. I have read a lot on ActionForm in this archive.
rgds
Antony Paul.
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: The API of a package

2003-12-02 Thread Gus Heck
In package com.google.www?

How does this happen to relate to struts?

Have you read: http://www.catb.org/~esr/faqs/smart-questions.html?

Zakaria khabot wrote:

Hi,
In wich Pakage exist the import org.jdom.* 
Thanks for all...

 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


html:link appears not to respect scriptlets inside atribute values

2003-12-01 Thread Gus Heck
The following doesn't seem to be working as I would expect... I sort of 
suspect that this may not be a struts issue, but I really thought you 
were supposed to be able to drop in jsp expressions anywhere.

html:link page=/prototypes/PopulateLocation.do?row=%= 
this.should.fail %Edit/html:link

is giving me this html output:

a href=/friendDB/prototypes/PopulateLocation.do?row=%= 
this.should.fail %Edit/a

should fail as this.should.fail cannot exist, but it is getting 
reproduced textually instead. I have this really bad feeling I am 
forgetting something, or have missed something basic, but cant figure 
out what searches would bring up the answer.

-Gus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Lazy questions on this list

2003-11-20 Thread Gus Heck
Jarnot Voytek Contr AU HQ/SC wrote:

I disagree, there is a clear distinction - asking a question without having
read the docs shouldn't seem valid to a newbie.  I agree that a lot of these
concepts are not obvious, and a lot of the documentation is lacking - that's
why this list is essential.  However, the order of learing should be docs -
list archive - post question; not the inverse.
 

I agree, completely with this order, but when I went to the archives 
recently via the link on the website, I found them intollerably slow, 
and it crashed my browser twice. So I posted here without full 
searching. Also, keep in mind that web/archive searching is hit or miss. 
A person may search and still not find what is there. Even with the 
exact same search, the milage may vary since one does not typically read 
every post available on a google search, but usually  one attempts to 
ignore ones that appear to be in the wrong language, or from a source 
that looks likely to be off topic. What looks off topic or is the wrong 
language, will vary for different people. And the tolerance for reading 
irrelevant hits will vary so that an answer that is the 15th hit, some 
people may never get to...

That said, I do agree that some posts recently do seem to have not read 
ANY of the relevant parts of the website. I have noted that many such 
posts appear to be from people for whom English appears not to be their 
original language, and I suspect that this is because they find it 
particularly hard to find things on a web site written in a language 
they only partly understand. I sometimes have trouble finding stuff, and 
english is the only language I am capable of communicating in without 
lots of pantomimes and infinite patience.

So, web pointers are probably in order for those people... The rest 
should RTFM  or STFW... I wouldn't wish archive searching on anyone at 
the moment though.

-Gus



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: problem with html:link params?!

2003-11-20 Thread Gus Heck
Brice Ruth wrote:

So, html:link puts the params in the page separated by amp; - not by 
 as it should (?) be?!?

IIRC the ampersand should always be escaped in any html/xhtml. When the 
page is processed by the browser it should then be converted to a simple 
 on the user's display. This is particularly true of xhtml since any 
use of  that is not followed by foo; where foo; is an internal or 
external entity defined for that document is a violation of the XML 
spec. I think the same thing is true of HTML, but one of the legacies of 
the browser wars is a mountain of recovery code that allows browsers 
to process pages that are incorrect.

- Gus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Lazy questions on this list

2003-11-20 Thread Gus Heck

  1.Try to find an answer by searching the Web.
  2.Try to find an answer by reading the manual.
  3.Try to find an answer by reading a FAQ.
  4.Try to find an answer by inspection or experimentation.
  5.Try to find an answer by asking a skilled friend.
  6.You *are* a programmer, try to find an answer by reading the source
code.
 

I think if one tries at least 50% of this list it is a reasonable 
effort. People need to get work done quicly too. Trying all of these 
things is time consuming. One should pursue the other 50% while wating 
for the post answer however. :).

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: problem with html:text bean throwing exception

2003-11-19 Thread Gus Heck
Anyone else got ideas about why I am getting this exception?

org.apache.jasper.JasperException: Cannot find bean 
org.apache.struts.taglib.html.BEAN in any scope

It appears that I answered Carl's concern. I'm now on day number 2 of 
being completely stuck :(. I would like to officially complain that this 
is a really unclear error message. I don't get why it can't report what 
bean it was looking for rather than sticking BEAN on the end...

-Gus

Gus Heck wrote:

I believe so... Here is my config and some of the relevant directory 
tree... The action for NewLocation appears to successfully take me to 
the AddLocation page. (it only forwards right now).

 form-beansform-bean name=addLocationForm 
type=org.cs101.fdb.struts.form.AddLocationForm /
 form-bean name=blankForm   
type=org.cs101.fdb.struts.form.BlankForm /
 /form-beans

 !-- == Action Mapping Definitions 
== --
 action-mappings
   action path=/prototypes/AddLocation
   type=org.cs101.fdb.struts.action.AddLocationAction 
   name=addLocationForm
   scope=request
   validate=true
   input=/prototypes/enter-location.jsp
   forward name=error path=/prototypes/enter-location.jsp /
   /action
   action path=/prototypes/NewLocation
   type=org.cs101.fdb.struts.action.NewLocationAction 
   name=blankForm
   scope=request
   validate=true
   input=/prototypes/index.jsp
   forward name=addLocation 
path=/prototypes/enter-location.jsp /
   /action
 /action-mappings

[EMAIL PROTECTED] build]$ find . -name *ocation*
./WEB-INF/classes/org/cs101/fdb/model/Location.class
./WEB-INF/classes/org/cs101/fdb/struts/form/AddLocationForm.class
./WEB-INF/classes/org/cs101/fdb/struts/action/AddLocationAction.class
./WEB-INF/classes/org/cs101/fdb/struts/action/NewLocationAction.class
./prototypes/enter-location.jsp
[EMAIL PROTECTED] build]$ find . -name *lank*
./WEB-INF/classes/org/cs101/fdb/struts/form/BlankForm.class
[EMAIL PROTECTED] build]$
Carl wrote:

Have you a vaild formBean define for this html:form in your struts 
config file ?
form-bean name=myForm type=org.myForm/

Is this bean called in your action mapping ?
action path=/htmlForm type=org.myAction name=myForm 
scope=request validate=true input=/page.jsp

forward name=success path=/succes.do redirect=true/
/action
I've faced a similar issue for these reasons.

Carl

Gus Heck wrote:

So I have been stuck for a day or so on this exception:

org.apache.jasper.JasperException: Cannot find bean 
org.apache.struts.taglib.html.BEAN in any scope
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) 

at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) 

at 
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
etc...

caused by:

javax.servlet.ServletException: Cannot find bean 
org.apache.struts.taglib.html.BEAN in any scope
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533) 

at 
org.apache.jsp.enter_0002dlocation_jsp._jspService(enter_0002dlocation_jsp.java:132) 

at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

etc...

I think have determined that it happens when attempting to process 
this tag:

% System.out.println (got here);%
   tdhtml:text property=city maxlength=50 size= 
20//td
% System.out.println (got here2);%

(only the first print statement appears in catalina.out)

I am definately able to find the struts-html taglib (as I am already 
inside an html:form tag by this point).

I think I really have a situation where html:form can be found but 
not html:text for the following reasons:

Here is the jasper generated code:
   67out.write(hr\n\n);
   68if (_jspx_meth_html_form_0(pageContext))
   69  return;
   70out.write(\n);
   71out.write(table border=\0\\n);
   72out.write(tr\n);
   73out.write(tdCity:);
   74out.write(/td\n);
   75   System.out.println (got here);
   76out.write(\n);
   77out.write(td);
   78if (_jspx_meth_html_text_0(pageContext))
   79  return;
   80out.write(/td\n);
   81   System.out.println (got here2);
 snip .
  127out.write(/html\n);
  128  } catch (Throwable t) {
  129out = _jspx_out;
  130if (out != null  out.getBufferSize() != 0)
  131  out.clearBuffer();
  132if (pageContext != null) 
pageContext.handlePageException(t);
  133  } finally {
  134if (_jspxFactory != null) 
_jspxFactory.releasePageContext(pageContext);
  135  }
 snip .
  154private boolean 
_jspx_meth_html_text_0(javax.servlet.jsp.PageContext pageContext)
  155throws Throwable {
  156  JspWriter out = pageContext.getOut();
  157  /*   html:text  */
  158

Re: problem with html:text bean throwing exception

2003-11-19 Thread Gus Heck
Thanks, I found it... I had inadvertently typed:

html:form action=prototypes/AddLocation.do scope=session/

However all the archive and google hits talked about issues in the 
struts-config.

I really really wish that struts had a better way of indicating this 
error. Is there any valid use-case for a form with no content at all? 
perhaps this could be checked for in the form bean? maybe if there is a 
use case make the user set an atribute noContent=true to make it work? 
This was a horrible typo gotcha for me, where every peice of information 
(until your mail) lead me in the wrong direction.

Thanks for the help,
Gus
Yee, Richard K,,DMDCWEST wrote:

Gus,
Why don't you include your jsp code and struts config? Usually it is caused
by having a struts form subelement tag outside of the struts form tag.
You've said that it's not the case. Are you specifying an 'input' attribute
in your action mapping? How are you accessing the page from the browser?
Without your code and struts-config, everyone just has to guess.
Regards,

Richard

-Original Message-
From: Gus Heck [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 19, 2003 8:32 AM
To: Struts Users Mailing List
Subject: Re: problem with html:text bean throwing exception

Anyone else got ideas about why I am getting this exception?

org.apache.jasper.JasperException: Cannot find bean 
org.apache.struts.taglib.html.BEAN in any scope

It appears that I answered Carl's concern. I'm now on day number 2 of 
being completely stuck :(. I would like to officially complain that this 
is a really unclear error message. I don't get why it can't report what 
bean it was looking for rather than sticking BEAN on the end...

-Gus

Gus Heck wrote:

 

I believe so... Here is my config and some of the relevant directory
tree... The action for NewLocation appears to successfully take me to 
the AddLocation page. (it only forwards right now).

form-beansform-bean name=addLocationForm 
type=org.cs101.fdb.struts.form.AddLocationForm /
form-bean name=blankForm   
type=org.cs101.fdb.struts.form.BlankForm /
/form-beans

!-- == Action Mapping Definitions
== --
action-mappings
  action path=/prototypes/AddLocation
  type=org.cs101.fdb.struts.action.AddLocationAction 
  name=addLocationForm
  scope=request
  validate=true
  input=/prototypes/enter-location.jsp
  forward name=error path=/prototypes/enter-location.jsp /
  /action
  action path=/prototypes/NewLocation
  type=org.cs101.fdb.struts.action.NewLocationAction 
  name=blankForm
  scope=request
  validate=true
  input=/prototypes/index.jsp
  forward name=addLocation 
path=/prototypes/enter-location.jsp /
  /action
/action-mappings

[EMAIL PROTECTED] build]$ find . -name *ocation* 
./WEB-INF/classes/org/cs101/fdb/model/Location.class
./WEB-INF/classes/org/cs101/fdb/struts/form/AddLocationForm.class
./WEB-INF/classes/org/cs101/fdb/struts/action/AddLocationAction.class
./WEB-INF/classes/org/cs101/fdb/struts/action/NewLocationAction.class
./prototypes/enter-location.jsp
[EMAIL PROTECTED] build]$ find . -name *lank* 
./WEB-INF/classes/org/cs101/fdb/struts/form/BlankForm.class
[EMAIL PROTECTED] build]$

Carl wrote:

   

Have you a vaild formBean define for this html:form in your struts
config file ?
form-bean name=myForm type=org.myForm/
Is this bean called in your action mapping ?
action path=/htmlForm type=org.myAction name=myForm
scope=request validate=true input=/page.jsp
forward name=success path=/succes.do redirect=true/ /action

I've faced a similar issue for these reasons.

Carl

Gus Heck wrote:

 

So I have been stuck for a day or so on this exception:

org.apache.jasper.JasperException: Cannot find bean
org.apache.struts.taglib.html.BEAN in any scope
   at 

   

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:2
54) 
 

   at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
   

 

   at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
etc...
caused by:

javax.servlet.ServletException: Cannot find bean
org.apache.struts.taglib.html.BEAN in any scope
   at 

   

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:533) 
 

   at

   

org.apache.jsp.enter_0002dlocation_jsp._jspService(enter_0002dlocation_jsp.j
ava:132) 
 

   at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
etc...

I think have determined that it happens when attempting to process
this tag:
% System.out.println (got here);%
  tdhtml:text property=city maxlength=50 size=
20//td
% System.out.println (got here2);%
(only the first print statement appears in catalina.out)

I am definately able to find the struts-html taglib (as I am already
inside an html:form tag by this point).
I think I really have a situation where html:form can be found but
not html:text

Re: problem with html:text bean throwing exception

2003-11-19 Thread Gus Heck
Yee, Richard K,,DMDCWEST wrote:

Gus,
I'm not sure what you changed on your JSP to get it fixed.
 

I changed

html:form action=prototypes/AddLocation.do scope=session/

to

html:form action=prototypes/AddLocation.do scope=session

This put my html:text tags inside the form. Apparently neither Netbeans 
nor Tomcat seemed to have any objection to the dangling /html:form tag 
that my inadvertent / had created. Really it seems to me at least one if 
not both of these programs should be parsing the file and complaining 
when things don't match. I suppose tomcat may not be able to do this and 
remain eficient, but I am reall disappointed that the netbeans IDE which 
compiles jsp's (checking for syntax in the scriptlets etc) didn't 
catch this.

I found the solution on Google using
'org.apache.jasper.JasperException: Cannot find bean
org.apache.struts.taglib.html.BEAN in any scope'
 

I tried that search but all I could find were references to people not 
defining name=MyForm in action in their struts-config.xml, but 
perhaps you clicked one link further along than I, or I missed something

-Gus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


problem with html:text bean throwing exception

2003-11-18 Thread Gus Heck
So I have been stuck for a day or so on this exception:

org.apache.jasper.JasperException: Cannot find bean org.apache.struts.taglib.html.BEAN 
in any scope
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
etc...
caused by:

javax.servlet.ServletException: Cannot find bean org.apache.struts.taglib.html.BEAN in 
any scope
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
at 
org.apache.jsp.enter_0002dlocation_jsp._jspService(enter_0002dlocation_jsp.java:132)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
etc...

I think have determined that it happens when attempting to process this tag:

% System.out.println (got here);%
   tdhtml:text property=city maxlength=50 size= 20//td
% System.out.println (got here2);%
(only the first print statement appears in catalina.out)

I am definately able to find the struts-html taglib (as I am already 
inside an html:form tag by this point).

I think I really have a situation where html:form can be found but not 
html:text for the following reasons:

Here is the jasper generated code:
   67out.write(hr\n\n);
   68if (_jspx_meth_html_form_0(pageContext))
   69  return;
   70out.write(\n);
   71out.write(table border=\0\\n);
   72out.write(tr\n);
   73out.write(tdCity:);
   74out.write(/td\n);
   75   System.out.println (got here);
   76out.write(\n);
   77out.write(td);
   78if (_jspx_meth_html_text_0(pageContext))
   79  return;
   80out.write(/td\n);
   81   System.out.println (got here2);
 snip .
  127out.write(/html\n);
  128  } catch (Throwable t) {
  129out = _jspx_out;
  130if (out != null  out.getBufferSize() != 0)
  131  out.clearBuffer();
  132if (pageContext != null) pageContext.handlePageException(t);
  133  } finally {
  134if (_jspxFactory != null) 
_jspxFactory.releasePageContext(pageContext);
  135  }
 snip .
  154private boolean 
_jspx_meth_html_text_0(javax.servlet.jsp.PageContext pageContext)
  155throws Throwable {
  156  JspWriter out = pageContext.getOut();
  157  /*   html:text  */
  158  org.apache.struts.taglib.html.TextTag _jspx_th_html_text_0 = 
(org.apache.struts.taglib.html.TextTag) 
_jspx_tagPool_html_text_size_property_maxlength.get(org.apache.struts.taglib.html.TextTag.class);
  159  _jspx_th_html_text_0.setPageContext(pageContext);
  160  _jspx_th_html_text_0.setParent(null);
  161  _jspx_th_html_text_0.setProperty(city);
  162  _jspx_th_html_text_0.setMaxlength(50);
  163  _jspx_th_html_text_0.setSize(20);
  164  int _jspx_eval_html_text_0 = _jspx_th_html_text_0.doStartTag();
  165  if (_jspx_th_html_text_0.doEndTag() == 
javax.servlet.jsp.tagext.Tag.SKIP_PAGE)
  166return true;
  167  
_jspx_tagPool_html_text_size_property_maxlength.reuse(_jspx_th_html_text_0);
  168  return false;
  169}

So I am willing to suppose that out.write() isn't throwing the 
exception, which leaves only _jspx_meth_html_text_0(pageContext). 
Looking into that method, I see 3 candidtates:
_jspx_tagPool_html_text_size_property_maxlength.get(org.apache.struts.taglib.html.TextTag.class);
_jspx_th_html_text_0.doStartTag();
_jspx_th_html_text_0.doEndTag()
_jspx_tagPool_html_text_size_property_maxlength.reuse(_jspx_th_html_text_0);

The question is why does one of these throw a Servlet exception when 
form doesnt? Though the form tag hasn't closed yet so it could still be 
the form tag, when I misname the taglibrary in the JSP I get a different 
error.

I am using Struts 1.1 (downloaded a couple days ago) in Tomcat 4.1.27 
with Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28) 
on a (redhat 9) linux platform. After spending hours tweaking my 
settings nothing I do seems to effect it and I am begining to suspect a 
bug, but I find it extremely hard to beleive that there would be a bug 
relating to html:text since it is one of the most used tags. Can any1 
help me out here?

-Gus



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: problem with html:text bean throwing exception

2003-11-18 Thread Gus Heck
I believe so... Here is my config and some of the relevant directory 
tree... The action for NewLocation appears to successfully take me to 
the AddLocation page. (it only forwards right now).

 form-beans   
 form-bean name=addLocationForm 
type=org.cs101.fdb.struts.form.AddLocationForm /
 form-bean name=blankForm   
type=org.cs101.fdb.struts.form.BlankForm /
 /form-beans

 !-- == Action Mapping Definitions 
== --
 action-mappings
   action path=/prototypes/AddLocation
   type=org.cs101.fdb.struts.action.AddLocationAction 
   name=addLocationForm
   scope=request
   validate=true
   input=/prototypes/enter-location.jsp
   forward name=error path=/prototypes/enter-location.jsp /
   /action
   action path=/prototypes/NewLocation
   type=org.cs101.fdb.struts.action.NewLocationAction 
   name=blankForm
   scope=request
   validate=true
   input=/prototypes/index.jsp
   forward name=addLocation path=/prototypes/enter-location.jsp /
   /action
 /action-mappings

[EMAIL PROTECTED] build]$ find . -name *ocation*
./WEB-INF/classes/org/cs101/fdb/model/Location.class
./WEB-INF/classes/org/cs101/fdb/struts/form/AddLocationForm.class
./WEB-INF/classes/org/cs101/fdb/struts/action/AddLocationAction.class
./WEB-INF/classes/org/cs101/fdb/struts/action/NewLocationAction.class
./prototypes/enter-location.jsp
[EMAIL PROTECTED] build]$ find . -name *lank*
./WEB-INF/classes/org/cs101/fdb/struts/form/BlankForm.class
[EMAIL PROTECTED] build]$
Carl wrote:

Have you a vaild formBean define for this html:form in your struts 
config file ?
form-bean name=myForm type=org.myForm/

Is this bean called in your action mapping ?
action path=/htmlForm type=org.myAction name=myForm 
scope=request validate=true input=/page.jsp

forward name=success path=/succes.do redirect=true/
/action
I've faced a similar issue for these reasons.

Carl

Gus Heck wrote:

So I have been stuck for a day or so on this exception:

org.apache.jasper.JasperException: Cannot find bean 
org.apache.struts.taglib.html.BEAN in any scope
at 
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:254) 

at 
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
etc...

caused by:

javax.servlet.ServletException: Cannot find bean 
org.apache.struts.taglib.html.BEAN in any scope
at 
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533) 

at 
org.apache.jsp.enter_0002dlocation_jsp._jspService(enter_0002dlocation_jsp.java:132) 

at 
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)

etc...

I think have determined that it happens when attempting to process 
this tag:

% System.out.println (got here);%
   tdhtml:text property=city maxlength=50 size= 
20//td
% System.out.println (got here2);%

(only the first print statement appears in catalina.out)

I am definately able to find the struts-html taglib (as I am already 
inside an html:form tag by this point).

I think I really have a situation where html:form can be found but 
not html:text for the following reasons:

Here is the jasper generated code:
   67out.write(hr\n\n);
   68if (_jspx_meth_html_form_0(pageContext))
   69  return;
   70out.write(\n);
   71out.write(table border=\0\\n);
   72out.write(tr\n);
   73out.write(tdCity:);
   74out.write(/td\n);
   75   System.out.println (got here);
   76out.write(\n);
   77out.write(td);
   78if (_jspx_meth_html_text_0(pageContext))
   79  return;
   80out.write(/td\n);
   81   System.out.println (got here2);
 snip .
  127out.write(/html\n);
  128  } catch (Throwable t) {
  129out = _jspx_out;
  130if (out != null  out.getBufferSize() != 0)
  131  out.clearBuffer();
  132if (pageContext != null) 
pageContext.handlePageException(t);
  133  } finally {
  134if (_jspxFactory != null) 
_jspxFactory.releasePageContext(pageContext);
  135  }
 snip .
  154private boolean 
_jspx_meth_html_text_0(javax.servlet.jsp.PageContext pageContext)
  155throws Throwable {
  156  JspWriter out = pageContext.getOut();
  157  /*   html:text  */
  158  org.apache.struts.taglib.html.TextTag _jspx_th_html_text_0 
= (org.apache.struts.taglib.html.TextTag) 
_jspx_tagPool_html_text_size_property_maxlength.get(org.apache.struts.taglib.html.TextTag.class); 

  159  _jspx_th_html_text_0.setPageContext(pageContext);
  160  _jspx_th_html_text_0.setParent(null);
  161  _jspx_th_html_text_0.setProperty(city);
  162  _jspx_th_html_text_0.setMaxlength(50);
  163  _jspx_th_html_text_0.setSize(20);
  164  int

Re: anyone using jstl side by side with the strut taglibs?

2003-11-18 Thread Gus Heck
Brice Ruth wrote:

Once you use EL, you don't have much of a choice than to use them 
side-by-side.

For the benefit of us noobs... what is EL?

-Gus

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]