Heonkoo Lee

Ranch Hand
+ Follow
since Feb 10, 2005
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Heonkoo Lee

Yeah, it is unlikely unless the inactivitity time between navigation is more than time out value.
19 years ago
JSP
I suggest you try http://ajaxtags.sourceforge.net/. I found it easy to integrate with existing apps. They also have some demo pages.
19 years ago
JSP

Originally posted by Santhana Lakshmi.S:
Its working fine in for 3 pages after that it s displaying null value.



It could be because of session timed out. Did you check the session-timeout value in web.xml?
19 years ago
JSP
Jakarta Taglibs hosts the Standard Taglib 1.1, an implementation of the JSP Standard Tag Library (JSTL), version 1.1, which was developed under the Java Community Process.

http://jakarta.apache.org/taglibs/doc/standard-doc/intro.html
19 years ago
JSP

Originally posted by Bear Bibeault:
You could possibly be confusing people, especially beginners, if you keep insisting that the fragment included via a directive is a JSP file. It is not. A JSP file must be a syntactically complete unit. For example, it you were to include a page via the include action (as opposed to the directive), the referenced page must be a complete and syntactically correct JSP page. When using the include directive, the included file does not need to be a syntactically correct JSP page.


It is like you saying that somebody is looking at Java code printout that spans 2 pages, and thinking it is wrong because undeclared variable is being used on the 2nd page, which is declared on the 1st page.


So calling the included file a JSP is incorrect and misleading. It's just a file with a fragment of text in it that becomes part of a JSP.


Did I ever say opposite to this? But, I as well as some books and references can still call the included file a JSP whether it is dependent on any JSP or independently compilable unit. 'So calling the included file a JSP is incorrect' is merely just your opinion.

To help make it more clearer, the following is from JSP v1.1 Syntax Refrerence: (old version but still valid)



Description:

The <%@ include %> directive inserts a file of text or code in a JSP file at
translation time, when the JSP file is compiled. When you use the <%@include %> directive, the include process is static. A static include means that the text of the included file is added to the JSP file. The included file can be a JSP file, HTML file, or text file. If the included file is a JSP file, its JSP elements are translated and included (along with any other text) in the JSP file. Once the included file is translated and included, the translation process resumes with the next line of the including JSP file.
The included file can be an HTML file, a JSP file, a text file, or a code file written in the Java programming language. Be careful that the included file does not contain <html>, </html>, <body>, or </body> tags. Because the entire content of the included file is added to the including JSP file, these tags would conflict with the same tags in the including JSP file, causing an error.
19 years ago
JSP

Originally posted by Bear Bibeault:


My point is that you did not give an example of using a variable in more than one JSP. When you perform a static include there is only one JSP. So there's nothing else to share with,

Just because you erroneously called the included fragment a JSP doesn't make it one.

[ February 24, 2006: Message edited by: Bear Bibeault ]



I did not erroneously call the fragment a JSP. You can statically include a JSP file or HTML file into another JSP file. File name extension of the statically included file does not matter. The including and included JSPs are two separate .jsp files physically existing in the file system. They are compiled into a single class.

When the including jsp (main.jsp) is invoked the first time, the raw content of the including and included jsp files are combined/converted into one main_jsp.java and then compiled as main_jsp.class. And it displays the message string updated by fragment.jsp.

But, the fragment.jsp itself cannot be compiled directly if it is using undeclared variable. If you try to invoke the fragment.jsp on a browser, you will see something like below:

--------------------------------
org.apache.jasper.JasperException: Unable to compile class for JSP

message cannot be resolved
--------------------------------

I do not mean that it is possible to share a local variable between two different classes independently compilable. But talking about the static inclusion case. You can even name the included fragment file as foo.txt.

This is all I am saying. Hope I am not making anybody confused.
19 years ago
JSP

Originally posted by Bear Bibeault:
What you describe can in no way be considered sharing the variable across JSPs. The included file, whose conventional suffix should be .jspf rather than .jsp, is not a separate JSP, but a fragment that becomes part of the main JSP.

That's like saying you can share a variable across C modules by using the #include directive.



I mentioned the include directive inserts the included page into the main page at translation-time for compilation as a single unit, meaning that it is a fragment of the resulting unit. Didn't say about sharing a variable across different classes.

Maybe it is my English... Probably need to spend more time on English study than on technical stuff.

I was talking about something like the following:

In main.jsp


and in fragment.jsp


I was just giving an example that you can declare a variable in one jsp and use it in another jsp even though they are actually compiled as one single class.

Have a good weekend!!!
[ February 24, 2006: Message edited by: Heonkoo Lee ]
19 years ago
JSP
I noticed a lot of performance improvements when I upgraded JDK from 1.4 to 1.5 and JBoss from 3.2.1 to 4.0.2. With the old setting JBoss memory usage used to reach 1.5 Gig about two weeks after deployment so I had to restart the server everytime it ran out of memory. But after the upgrade, I have not seen any memory problem. Garbage collection improved a lot. Not sure if it is JDK or JBoss.
19 years ago
Try updating the application.xml in your .ear/META-INF directory. It should redeploy your ear.

Regards,
19 years ago

Originally posted by Bear Bibeault:
No. Not any more than you could use a variable delared in a method of one Java class in another Java class.



Not impossible at all if you used the static include directive. I don't like it, though. A web application with a lot of this kind of code could be a nightmare for maintenance.



You can access the reference msg from the included jsp. The include directive is position-dependent. If you move the directive up before the scriptlet, it will not compile. Because the raw content of the included page is inserted at page translation time.
19 years ago
JSP
It seems like the more you know, the more complicated sometimes...

If you just change the form method to GET instead of POST, you will see what parameters get attached to the url when form is submitted.

I guess the problem will be solved if you use the HTML 'input' element with type submit. In this case only the information of the button clicked will be attached to the form data when submitting even if the form has multiple submit buttons with the same name. While the 'Button' element you are struggling with has some advantages like decorating the button label more nicely, it was previously supported by Internet Explorer only (not sure other browsers now support it).

I didn't try but it looks like with the 'Button' element you can send multiple values associated with the same parameter name. In this case you can get all the values using request.getParameterValues("your_param_name") as you may already know.

Hope this helps.
[ February 24, 2006: Message edited by: Heonkoo Lee ]
19 years ago
JSP
I think you probably have a login-config element declared in web.xml and login page set to login.jsp if it is the first page showing up for the user who is not yet logged in.

Are you sure your web.xml does not have security-constraint and login-config section?
19 years ago
JSP
The welcome file list configuration has nothing to do with getting the status code 403 forbidden. Both users in role1 and role2 are authenticated to the web app if they login with correct username and password. The login error page is only displayed when a login fails.

The reason the user in role2 is getting 403 error (different than login error) is that only users in role1 is authorized to access that resource.

Hope this helps.

Regards,
19 years ago
In your action class, you can get a reference to the session by calling request.getSession().
19 years ago
You can deploy a web archive (war) as a file or directory in JBoss. The only naming requirement is that it must end with .war whether it is a file or directory.
19 years ago