You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Sorenson, Alexander" <al...@tallan.com> on 2001/07/25 21:56:46 UTC

Struts + Tomcat/Apache

I am still having trouble configuring struts with tomcat and apache.  Going
through the archives, I have put the following lines in my httpd.conf, which
solved the problem I was having before of Apache returning a 404:

JkMount /*.jsp ajp13
JkMount /*.do ajp13
JkMount /servlet/* ajp13

Unfortunately now it returns a 500 internal server error.  looking at
apache's logs, I find the following:
mod_jserv.log:
[25/07/2001 19:57:13:989] (EMERGENCY) ajp12[1]: cannot scan servlet headers
(500)
[25/07/2001 19:57:13:989] (ERROR) an error returned handling request via
protocol "ajpv12"

error.log:
[Wed Jul 25 15:57:13 2001] [error] [client 64.111.2.62] Premature end of
script headers: g:/jakarta-tomcat-3.2.2/webapps/bmp/custlogin.do

in the tomcat mod_jk.log:
[jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61
[jk_ajp13_worker.c (174)]: In jk_endpoint_t::connect_to_tomcat, failed errno
= 61
[jk_ajp13_worker.c (587)]: Error connecting to the Tomcat process.

Can anyone tell me what's going on here / how to fix it?
Thanks

AW: AW: Struts and Frames

Posted by Andreas Leitner <al...@macron.at>.

> -----Ursprüngliche Nachricht-----
> Von: Matthias Bauer [mailto:Matthias.Bauer@livinglogic.de] 
> Gesendet: Freitag, 27. Juli 2001 07:47
> An: struts-user@jakarta.apache.org
> Betreff: Re: AW: Struts and Frames
> 
> 
> Andreas,
> 
> in the application we are currently developing we have a 
> similar problem:
> 
> We have three frames from which either only the frame the 
> user is currently 
> clicking a button in has to be reloaded or some other frames 
> need to be 
> refreshed as well.
> 
> What we are doing is pretty simple:
> The request action updates the user's session state and 
> forwards to the frameset 
> or the single frame. In case a frame is sent back, we just 
> return this frame, 
> otherwise we return the whole frameset. The browser then 
> requests the single 
> frames from the webserver which are delivered based on the 
> user's session state.
> 
> We do not need any JavaScript for this. The only drawback is: 
> You need to 
> specify in the target of the link/form if the whole frameset 
> or only the single 
> frame needs to be updated, because the browser does the 
> refresh on the client 
> side. As a consequence you can not decided whether to update 
> only the single 
> frame or the whole frameset based on the request parameter 
> that are sent along.
> 

Hmm, I see. Thanks for your answere. Have you tackeled the "back-button"
resp. "history" problem yet? If we store the request data not in the
request, but in the session the back-button becomes close to useless.
Same for bookmarking. Although the web-app could with some work provide
it's own means of history.


Andreas


Re: AW: Struts and Frames

Posted by Matthias Bauer <Ma...@livinglogic.de>.
Andreas,

in the application we are currently developing we have a similar problem:

We have three frames from which either only the frame the user is currently 
clicking a button in has to be reloaded or some other frames need to be 
refreshed as well.

What we are doing is pretty simple:
The request action updates the user's session state and forwards to the frameset 
or the single frame. In case a frame is sent back, we just return this frame, 
otherwise we return the whole frameset. The browser then requests the single 
frames from the webserver which are delivered based on the user's session state.

We do not need any JavaScript for this. The only drawback is: You need to 
specify in the target of the link/form if the whole frameset or only the single 
frame needs to be updated, because the browser does the refresh on the client 
side. As a consequence you can not decided whether to update only the single 
frame or the whole frameset based on the request parameter that are sent along.

--- Matthias


Andreas Leitner wrote:

> 
>>-----Ursprüngliche Nachricht-----
>>Von: Peter Alfors [mailto:peter.alfors@hksystems.com]
>>Gesendet: Donnerstag, 26. Juli 2001 15:54
>>An: struts-user@jakarta.apache.org
>>Betreff: Re: Struts and Frames
>>
>>
>>The struts tags have a target attribute that you may set to
>>point to the desired frame. Since the target is actually 
>>handled by the browser (as where to display the results), 
>>there isn't really much "handling" to be done by struts. Our 
>>site has 3 frames within a frameset.  We have not experienced 
>>any problems. However, we are also not moving in and out of 
>>the frames. I guess it may prove a little more difficult if 
>>you want to go from a frameset to a single frame, then back 
>>to a frameset with dynamically specified pages.  Even so, 
>>this is not really a struts issue, but more of an app design issue.
>>
> 
> Thanks for your answere Peter. Meanwhile I have been thinking and
> prototyping the Frames idea a bit more through. One thing I would like
> to have is that only those frames get updated, that really need to. But
> a get/post always only updates one window. So I have been thinking about
> the following design:
> 
> The top level frameset consists of a frame for the actual page
> ("NonHidden") and a hidden frame ("Hidden"). In "NonHidden" there might
> be other arbitrarily deep nested frames and framesets. Whenever
> something happens (a get or post) the action mapping triggers the right
> functions to change the buisness objects and the always forwards to the
> same servlet. The target of each and every post/get will be Hidden. The
> servlet that is activated by each action, does not produce any code to
> display, but instead it has a JavaScript "onLoad" feature, that will
> reload every frame that needs to be changed. The list of frames that
> need to be reloaded are determinded at runtime (not sure how this will
> be implemented). Anyway the key is to put the Document (from the
> Document/View pattern) always into the session. If there is a view to
> display a menu, the session will have a "Menu" attribute. It is this
> attribute that the actions change if they need to and is this attribute
> the views read to produce HTML.
> 
> Does that design strike anyone with a little more experience in web app
> design? (; One obvious drawback is that the browsers back button would
> not work, because it will not change the Document attributes in the
> session scope.
> 
> 
> Tia,
> Andreas
> 




AW: Struts and Frames

Posted by Andreas Leitner <al...@macron.at>.

> -----Ursprüngliche Nachricht-----
> Von: Peter Alfors [mailto:peter.alfors@hksystems.com]
> Gesendet: Donnerstag, 26. Juli 2001 15:54
> An: struts-user@jakarta.apache.org
> Betreff: Re: Struts and Frames
> 
> 
> The struts tags have a target attribute that you may set to
> point to the desired frame. Since the target is actually 
> handled by the browser (as where to display the results), 
> there isn't really much "handling" to be done by struts. Our 
> site has 3 frames within a frameset.  We have not experienced 
> any problems. However, we are also not moving in and out of 
> the frames. I guess it may prove a little more difficult if 
> you want to go from a frameset to a single frame, then back 
> to a frameset with dynamically specified pages.  Even so, 
> this is not really a struts issue, but more of an app design issue.

Thanks for your answere Peter. Meanwhile I have been thinking and
prototyping the Frames idea a bit more through. One thing I would like
to have is that only those frames get updated, that really need to. But
a get/post always only updates one window. So I have been thinking about
the following design:

The top level frameset consists of a frame for the actual page
("NonHidden") and a hidden frame ("Hidden"). In "NonHidden" there might
be other arbitrarily deep nested frames and framesets. Whenever
something happens (a get or post) the action mapping triggers the right
functions to change the buisness objects and the always forwards to the
same servlet. The target of each and every post/get will be Hidden. The
servlet that is activated by each action, does not produce any code to
display, but instead it has a JavaScript "onLoad" feature, that will
reload every frame that needs to be changed. The list of frames that
need to be reloaded are determinded at runtime (not sure how this will
be implemented). Anyway the key is to put the Document (from the
Document/View pattern) always into the session. If there is a view to
display a menu, the session will have a "Menu" attribute. It is this
attribute that the actions change if they need to and is this attribute
the views read to produce HTML.

Does that design strike anyone with a little more experience in web app
design? (; One obvious drawback is that the browsers back button would
not work, because it will not change the Document attributes in the
session scope.


Tia,
Andreas


Re: Struts and Frames

Posted by Peter Alfors <pe...@hksystems.com>.
The struts tags have a target attribute that you may set to point to the
desired frame.
Since the target is actually handled by the browser (as where to display
the results), there isn't really much "handling" to be done by struts.
Our site has 3 frames within a frameset.  We have not experienced any
problems.
However, we are also not moving in and out of the frames.
I guess it may prove a little more difficult if you want to go from a
frameset to a single frame, then back to a frameset with dynamically
specified pages.  Even so, this is not really a struts issue, but more of
an app design issue.

Pete

Andreas Leitner wrote:

> I would like to use Stuts together with HTML frames. Are there any tag
> libraries available?
>
> Has anybody done that before? Has anybody had good/bad experience with
> it?
>
> Tia,
> Andreas

Struts and Frames

Posted by Andreas Leitner <al...@macron.at>.
I would like to use Stuts together with HTML frames. Are there any tag
libraries available?

Has anybody done that before? Has anybody had good/bad experience with
it?


Tia,
Andreas


Re: Struts + Tomcat/Apache

Posted by Rakesh <ay...@india.com>.
are u using mod_jserv or mod_jk ?



 Rakesh Ayilliath
(Software Engineer)

Synergy IT Innovations Pvt Ltd,
#196, 1st Floor, 9th Cross,
HMT Layout, RT Nagar
Bangalore 560032

ayilliath@india.com
www.ayilliath.8m.com
----- Original Message -----
From: "Sorenson, Alexander" <al...@tallan.com>
To: <st...@jakarta.apache.org>
Sent: Thursday, July 26, 2001 1:26 AM
Subject: Struts + Tomcat/Apache


> I am still having trouble configuring struts with tomcat and apache.
Going
> through the archives, I have put the following lines in my httpd.conf,
which
> solved the problem I was having before of Apache returning a 404:
>
> JkMount /*.jsp ajp13
> JkMount /*.do ajp13
> JkMount /servlet/* ajp13
>
> Unfortunately now it returns a 500 internal server error.  looking at
> apache's logs, I find the following:
> mod_jserv.log:
> [25/07/2001 19:57:13:989] (EMERGENCY) ajp12[1]: cannot scan servlet
headers
> (500)
> [25/07/2001 19:57:13:989] (ERROR) an error returned handling request via
> protocol "ajpv12"
>
> error.log:
> [Wed Jul 25 15:57:13 2001] [error] [client 64.111.2.62] Premature end of
> script headers: g:/jakarta-tomcat-3.2.2/webapps/bmp/custlogin.do
>
> in the tomcat mod_jk.log:
> [jk_connect.c (143)]: jk_open_socket, connect() failed errno = 61
> [jk_ajp13_worker.c (174)]: In jk_endpoint_t::connect_to_tomcat, failed
errno
> = 61
> [jk_ajp13_worker.c (587)]: Error connecting to the Tomcat process.
>
> Can anyone tell me what's going on here / how to fix it?
> Thanks
>

Re: Form declaration inside logic:equal tags

Posted by Rama Krishna <kr...@hotmail.com>.
you didnot close your <html:form ...> tag



----- Original Message ----- 
From: "Yuriy Zubarev" <yu...@yahoo.ca>
To: <st...@jakarta.apache.org>
Sent: Wednesday, July 25, 2001 1:28 PM
Subject: Form declaration inside logic:equal tags


> Hello everyone,
> 
> I was just wondering why I cannot use a code like this:
> 
> <logic:equal name="userForm" property="action" value="Profile">
>   <html:form action="/saveUserProfile">
> </logic:equal>
> 
> <logic:notEqual name="userForm" property="action" value="Profile">
>   <html:form action="/saveUser">
> </logic:notEqual>
> 
> I always get exception:
> 
> Non-matching extension tags probably occurred due to
> an error in /user.jsp line 60: </logic:equal>
> 
> I have a lot of logic:equal tags on my page and they worked
> fine untill I tried to wrap html:form inside them.
> 
> Thank you for your time.
> 
> Best of luck,
> Yuriy Zubarev
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
> 

Form declaration inside logic:equal tags

Posted by Yuriy Zubarev <yu...@yahoo.ca>.
Hello everyone,

I was just wondering why I cannot use a code like this:

<logic:equal name="userForm" property="action" value="Profile">
  <html:form action="/saveUserProfile">
</logic:equal>

<logic:notEqual name="userForm" property="action" value="Profile">
  <html:form action="/saveUser">
</logic:notEqual>

I always get exception:

Non-matching extension tags probably occurred due to 
an error in /user.jsp line 60: </logic:equal> 

I have a lot of logic:equal tags on my page and they worked
fine untill I tried to wrap html:form inside them.

Thank you for your time.

Best of luck,
Yuriy Zubarev


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/