Weird behaviour with jsp:forward and jsp:param
I'm running Orion 1.5.3
Wanted to ask if anyone has insight into the following.
I'm trying to do a forward with a parameter. The parameter is something like a message string.
The following does not work.
<%
String result = "unsucessful"; // retrieved from external source... hardcoded for example's sake
%>
<jsp:forward page="<%=nextPage%>">
<jsp:param name="message" value="The result was <%=result%>"/>
</jsp:forward>
I've managed to deduce that the error is in the param value. Apparently, we cannot mix variables with static values inside the value parameter.
I've managed to get it working by doing this...
<%
String result = "unsucessful"; // retrieved from external source... hardcoded for example's sake
String message = "The result was " + result;
%>
<jsp:forward page="<%=nextPage%>">
<jsp:param name="message" value="<%=message%>"/>
</jsp:forward>
My question is, is this a bug or is it supposed to be this way ? Can we mix the value parameters ?
Hi Bernard,
Take a note of the following syntax -
<jsp:forward page={"relativeURL" | "<%= expression %>"} >
<jsp:param name="parameterName"
value="{parameterValue | <%= expression %>}" />+
</jsp:forward>
It is evident that either the value attribute can have an expression or simple text.
I have tried your example and I am also encountering the same kind of problem, but I have found a way out.
You can try the following in your code -
<%
String result = "unsucessful"; // retrieved from external source... hardcoded for example's sake
%>
<jsp:forward page="<%=nextPage%>">
<jsp:param name="message" value=' <%= "The result was" + result%>'/>
</jsp:forward>
Instead of using
value= "The result was <%=result%>" you can use
value= '<%= "The result was" + result%>'.
Hope this helps
Similar Messages
-
Qns about jsp:include and jsp:forward
It is said that <jsp:include>'s flush is only fixed to "true". Which means the page cannot pass its full control to another page using <jsp:forward> tag.
Is there any ways to overcome this problem? Using both in the same jsp and allow it to passes full control.Hmm.. I'm using the form action to call back the jsp itself to validate something, and the include to add in another jsp file together with the original jsp to produce some addon visual effects.
So saying if validate is true, forward to another jsp.
So the form action.. cannot be use I think. -
Best practice for dealing with Recordsets, JDBC and JSP?
I've spent the last three years developing web apps using JSP, Struts and Kodo JDO for persistence. All of the content for the apps was created as Java objects using model classes and saved to an Oracle db. Thus, data retrieved from the db was as instances of the model classes and then put into Struts form beans, etc.
I changed jobs last month and am now having to use Servlets with JDBC to retrieve records from db tables and returning it into Recordsets. Oh, and I can't use Struts in my JSPs either. I'm beginning to think that I had it easy at my previous job but maybe that's just because I was used to it.
So here are my problems/questions:
I have two tables with a one to many relationship that I need to retrieve data from, show in a jsp and be able to update eventually.
So here's what I am doing:
a) In a servlet, I use a SQL statement to join the tables and retrieve the results into a Recordset.
b) I created a class with a bunch of String attributes to copy the Recordset data into, one Recordset row per each instance of the bean and then close the Recordset
c) I then add the beans to an ArrayList and save the ArrayList into the session.
d) Then, in the JSP, I retrieve the ArrayList from the session and iterate over each bean instance, printing the data out to the jsp. There are some logic statements to determine when not to print redundant data caused by the one to many join.
e) I have not written the code to update the data yet but was planning on having separate jsps for updating the (one) table and the (many) table.
Would most of you do something similar? Would you use one SQL statement to retrieve all of the data for display and use logic to avoid printing the redundant part of the data? Or would you have used separate SQL queries, one for each table? Would you have saved the results into something other than an instance of a bean class that represents one record in the RecordSet? Would you have had a bean class with attributes other than Strings - like had a collection attribute to hold the results from the "many" table? The way that I am doing everything just seems so cumbersome and difficult compared to using Struts and JDO before.
Your help/opinion will be greatly appreciated!Would you use one SQL statement to retrieve all of the data for display Yes.
and use logic to avoid printing the redundant part of the dataNo.
I believe in minimising the number of queries. If it is a simple one-many join on a db table, then one query is better than one + n queries.
However I prefer to store the objects in a bean class with attributes other than strings - ie one object, with a collection attribute to hold the related "many" records.
Does the fact you are not using Struts mean that you have to use scriptlet code? (shudder)
Or are you using JSTL, or other custom tags?
How about tools like Ant? Junit testing?
The way that I am doing everything just seems so cumbersome and difficult
compared to using Struts and JDO before.Anything different takes adjusting to. Sounds like you know what you're doing for the most part. I agree, in terms of best practices what you have described so far sounds like a step backwards from what you were previously doing.
However I wouldn't go complaining about it too loudly, too quickly. If you're new on the block theres nothing like making a pain of yourself, and complaining how backwards the work they have done is to put your new workmates' backs up
Look on it as a challenge. Maybe discuss it quietly with a team leader, to see if they understand how much easier/better/less error prone such approaches can be?
Struts, cumbersome as it can be, definitely has the advantage of pushing you to follow good MVC practice.
Good luck,
evnafets -
Hi All,
I have the following:
<jsp:include page="anotherPage.jsp">
<jsp:param name="testing" value="sdfasdfsd"/>
</jsp:include> And in anotherPage.jsp I have:
<%@ taglib uri="/WEB-INF/tld/commons-log.tld" prefix="log" %>
<log:dump scope="request"/>
<log:dump scope="session"/>
<log:dump scope="page"/>
<log:dump scope="application"/>
<h3>
Test: <%= request.getParameter("testing") %>
</h3>Not only does this output:
Test: null
but I don't see 'testing' anywhere in the dumps! What is going wrong?
Have I badly misunderstood parameter sending? :-/
Actually, my assumption was that the include code puts the "testing" variable
into the request.. 1) where does jsp:param put the data items it
passes through and 2) if the data item didn't previously exist as a
request parameter, does it ignore it?
Any assistance would be most appreciated!
Rob
:)Depends on the server version you are using. If you are using a JSP 2.0 server like Tomcat 5, then you should be able to do that, as long as you set up the container correctly (to use servlet 2.4 and JSP 2.0 specs rather than 2.3 and 1.2...)
Is you are using a JSP 1.2 container (less then TC5) then you will not be able to use EL anyware except in JSTL tags. The fix is to use the JSTL tags to do the include:
<c:import url="thepage.jsp">
<c:param name="param1" value="${attr}"/>
</c:import> -
Weird behaviour with Mail and iPhone
I have recently noticed that not all my mail is coming through to my MBP mail account. Some emails that I have sent have been replied to and they show up on my iPhone but some are missing in my mail inbox. I have also recently noticed that if I read an email on my iPhone it is marked as read when I look whilst in my Mail application (it has only recently started doing this too)
Any ideas what could be going on, is this a syncing problem with mobileme because the problems have been with a .mac email address.
ThanksHowever, it successfully goes
into the method and there is nothing wrong until the
page got forward and everything is lost from thatThe actionListener method is invoked just fine, however returning the outcome String from it does not make any difference. Only outcomes returned from actions are taken into account. If your navigation works, then it's due to something else.
forum that actually the bean would not persist after
I transfer to a new page. Only through hidden fields
(?) that I can achieve that, is that correct? If you have the bean in request scope then it will be re-instantiated for every request. Consider:
- Put the bean to session scope
- Pass the stuff around using f:param or f:attribute
- Use tomahawk's t:savestate
- Start using framework that offers converstation/process scope, e.g. Spring WebFlows, Jboss Seam, Trinidad/ADF faces etc.
Quite confuse with the request and session scope.
Anybody can help me with that?Request scope lasts for the duration of single http request, session scope generally for the whole duration of users visit. Principle problem with request scope is that it's often too short (as you'v noticed when stuff gets losts) and with session scope that it's too long (using multiple browser windows interfare with each other and things linger in session too long unless manually cleared).
-Henri -
Difference between jsp:forward and logic:forward
Hi,
Can anyone let me know??
what is the difference between <jsp:forward> in and <logic:forward> in struts
Thanks in advance,
Regards
Dhinesh kumar RSee: http://java.oreilly.com/news/jsptips_1100.html (number 4)
-
[Solved] Firefox 3 betas give me some weird behaviour with images
I understand that there will be problems with beta software, however I seem to have memory issues with the firefox 2 series, so I thought I'd give the beta packages a try. I'm using the firefox-nightly package from AUR (firefox3b4), and I'm getting some weird behaviour. The same behaviour can be seen in all firefox 3 beta builds, however. It's hard to explain the problem, so here's a screenshot:
Notice that the image appears twice, once in the tab, and once in the tab toolbar next to the title of the tab. It looks like an attempted preview gone terribly wrong. Upon closing the tab, the tab toolbar shrinks down to the normal size and all is well. This happens with most images up to a certain size. Any one else experiencing this problem? Any suggestions? This is very annoying and I would like anyone's input on the problem.
Last edited by valnour (2008-02-24 07:41:05)Wow! This issue was solved in #archlinux by Nuked. Apparently I had some funky bits in my .mozilla directory. Removing it solved the problem. Remember kids, IRC is your friend. Anyone else experiencing weird stuff with their Firefox install should give this solution a try.
-
Weird behaviour with inlined SubVI's
Every now and then I've ran into some serious weird behaviour where I've eventually traced it down to some inlined subVI. It has seemed as if the values used inside the inlined subVI don't match what the calling VI is feeding into its inputs. I haven't been able to consistently reproduce this issue so I apologize for the vague description, but since I felt I should finally address this and I couldn't really find anything similar by searching, I'll do my best to describe it and we'll see what turns up.
As I mentioned, the issue certainly doesn't occur consistently. I use inlined subVI here and there and most of the time there are no problems whatsoever. I ran into the issues randomly I think four times now, first three of them were on LV2013 and this last time on LV2014. In all cases I have been using AF and I think the first times were actually with an actor class. At the time I thought it might have been related to the AF, and it still might, but now the last time it wasn't the actor class itself but a data member of one. So far all of the problems have occured with class methods, and I think the "corrupt values" have been the object private data, but I can't confirm this.
This time the inlined subVI was a static dispatch method with contents shown below on the left and the calling on the right.
I'm showing the calling just to point out that when I was investigating the problem and I probed the object wires before and after the inlined subVI the values (Calibration.X Step and Calibration.Y Step) were OK, but the result of the VI (Point out) was some insane value as if the actual division inside was performed by corrupt data. I think that the output value wasn't Inf, though, so the divider might not have been a default value such as 0.
Other notes:
I checked that the wires are connected to the inputs and outputs
As I mentioned, the projects have always been relatively large AF setups, the problematic method has been an actor method or a method called by an actor somewhere down the chain. I have no reason to assume AF is the culprit, I'm just pointing this out, just in case
The problem seems to occur quite randomly but once it "starts" it doesn't go away until I find which inlined subVI it was and change it to a normal VI call
The problem might not even be specifically inlined subVI related but for example pre-allocated VI related instead
I don't know whether the problem would occur in a built executable as well, so far I've only ran into them while testing while developing and fixed them there
Looking at the "Known Issues" related to inlined subVI's I don't know if this related to them. The other one deals with execution systems, which I haven't touched to my knowledge, and the other one says "An Inline public methodVI calling a private-scope method VI, inlined into a non-class caller may give a runtime error when trying to call the private method from the inlined code in the non-class caller."
LabVIEW version is 14.0.1 (2014 SP1 32bit) on Windows 8.1
Yep, reading through this post I gotta say I'm not expecting much, what a mess, but it would be great to find out if anyone else has ever ran into similar problems or has a clue what's going here.Just for the sake of your sanity, I've seen "funky" behaviour with inlined VIs also, but on Real-Time targets.
I've never been able to narrow down the exact problem but it seems to be related to changed made to inlined VIs not being reflected in the compiled code od VIs which call them.
I've reported it but without code which can actually reproduce it, it cannot be fixed.
Say hello to my little friend.
RFC 2323 FHE-Compliant -
Problem with call forwarding and "call divert"
I have been receiving calls lately and a dialogue box pops up and says "fowarded call" with a button that says "dismiss" - I'm not sure why or how to disable this. in my settings I have call forwarding turned off. Also when I make calls I sometimes see messages saying something about call forwarding active or active diverts. Again I have call forwarding turned off and I see no settings for divert. How can I fix this?
Thanks.i am having a similar problem. I have a Pearl 8100 with T-Mobile. I've had it for almost two years (since Jan. '07). About four weeks ago, this problem started. I have a landline office phone through AT&T, and when I leave the office, I forward this land line to my Pearl. When someone calls my office after hours, on nights and weekends, the problem is that instead of the person's name and phone number showing up on my caller ID, my Pearl shows that I am calling myself from my own cell phone! I don't get "Private Number" like you get, the caller ID shows that I am calling myself!
I've spent six or seven hours with T-Mobile tech support, with five different tech people over a period of several days and several phone calls, and they can't figure it out; their final and "best" answer is that it's a blackberry problem, that the issue has been addressed and identified as a "known issue" and a "trouble ticket" has been created. I contacted RIM and they directed me to their archived troubleshooting and to this forum, so I still don't have an answer. And T-M had no answer when I told them that this feature worked just fine from Jan. '07 through Aug. '08. T-Mobile offered to put me into a different device, the T-Mobile wing, which by fair assessment, looks like a piece of junk, and it's window's mobile, which is even worse. I rejected this option.
I'm hoping someone can solve this. One friend of mine thought that it's a network issue, any issue with caller ID would be with the network, not the phone or its software...this makes some sense to me...and one of the techs at TM thought that this could be the issue as well. As T-M upgrades its networks to 3G, these bugs are popping out. who knows, I'm sticking with this Pearl and 8100 for a little while longer, b/c I am waiting to see if an answer shows up somewhere on one of the forums, but I hate not knowing who's calling before I answer the phone! -
Weird behaviour at log creation and cleaning.
Hi All,
One of our ReplicatedEnvironment is creating very small log files with very small % of utilization.
The tree first columns represents the DbSpace output; where as the next columns represents part of the "ls -lh <envHome>/*.jdb" result. All has been extracted from Master Environment.
000000e4 12 70 12K Apr 14 12:28 /bdb/AuditingBO/000000e4.jdb
000000e3 44 77 45K Apr 13 17:48 /bdb/AuditingBO/000000e3.jdb
000000e2 27 64 27K Apr 12 22:55 /bdb/AuditingBO/000000e2.jdb
000000e1 63 66 63K Apr 11 22:53 /bdb/AuditingBO/000000e1.jdb
000000e0 28 13 29K Apr 10 00:30 /bdb/AuditingBO/000000e0.jdb
000000df 0 0 69 Apr 9 00:30 /bdb/AuditingBO/000000df.jdb
000000de 23 74 24K Apr 8 15:22 /bdb/AuditingBO/000000de.jdb
000000dd 49 34 50K Apr 7 16:45 /bdb/AuditingBO/000000dd.jdb
000000dc 25 72 26K Apr 6 19:05 /bdb/AuditingBO/000000dc.jdb
000000db 10 74 10K Apr 5 20:03 /bdb/AuditingBO/000000db.jdb
000000da 186 39 187K Apr 5 12:55 /bdb/AuditingBO/000000da.jdb
000000d9 0 0 69 Apr 3 00:30 /bdb/AuditingBO/000000d9.jdb
000000d8 0 0 69 Apr 2 00:30 /bdb/AuditingBO/000000d8.jdb
000000d7 64 37 64K Apr 1 22:46 /bdb/AuditingBO/000000d7.jdb
000000d6 14 63 14K Mar 31 17:44 /bdb/AuditingBO/000000d6.jdb
000000d5 80 44 81K Mar 30 19:32 /bdb/AuditingBO/000000d5.jdb
000000d4 9 74 9.6K Mar 29 20:31 /bdb/AuditingBO/000000d4.jdb
000000d3 15 73 16K Mar 28 19:07 /bdb/AuditingBO/000000d3.jdb
000000d2 27 7 28K Mar 27 00:30 /bdb/AuditingBO/000000d2.jdb
000000d1 1 63 1.2K Mar 26 11:40 /bdb/AuditingBO/000000d1.jdb
000000d0 19 61 19K Mar 25 20:41 /bdb/AuditingBO/000000d0.jdb
000000cf 76 40 76K Mar 24 19:19 /bdb/AuditingBO/000000cf.jdb
000000ce 92 34 93K Mar 22 23:13 /bdb/AuditingBO/000000ce.jdb
000000cd 30 25 30K Mar 21 20:56 /bdb/AuditingBO/000000cd.jdb
000000cc 0 0 69 Mar 20 00:30 /bdb/AuditingBO/000000cc.jdb
000000cb 0 0 69 Mar 19 00:30 /bdb/AuditingBO/000000cb.jdb
000000ca 34 23 35K Mar 18 22:07 /bdb/AuditingBO/000000ca.jdb
000000c9 8 73 8.3K Mar 17 22:46 /bdb/AuditingBO/000000c9.jdb
000000c8 12 62 13K Mar 16 20:01 /bdb/AuditingBO/000000c8.jdb
000000c7 54 13 55K Mar 15 21:11 /bdb/AuditingBO/000000c7.jdb
000000c6 492 36 492K Mar 15 00:30 /bdb/AuditingBO/000000c6.jdb
000000c5 136 29 136K Feb 18 22:37 /bdb/AuditingBO/000000c5.jdb
000000c4 19 60 19K Feb 17 18:52 /bdb/AuditingBO/000000c4.jdb
000000c3 34 19 35K Feb 16 19:26 /bdb/AuditingBO/000000c3.jdb
000000c2 15 75 16K Feb 15 20:14 /bdb/AuditingBO/000000c2.jdb
000000c1 19 62 19K Feb 14 18:41 /bdb/AuditingBO/000000c1.jdb
000000c0 21 7 22K Feb 13 00:30 /bdb/AuditingBO/000000c0.jdb
000000bf 0 0 69 Feb 12 00:30 /bdb/AuditingBO/000000bf.jdb
000000be 12 62 12K Feb 11 18:47 /bdb/AuditingBO/000000be.jdb
000000bd 52 35 52K Feb 10 22:50 /bdb/AuditingBO/000000bd.jdb
000000bc 18 62 18K Feb 9 20:37 /bdb/AuditingBO/000000bc.jdb
000000bb 55 48 55K Feb 8 19:03 /bdb/AuditingBO/000000bb.jdb
000000ba 103 18 103K Feb 7 22:08 /bdb/AuditingBO/000000ba.jdb
000000b9 29 5 29K Feb 6 00:30 /bdb/AuditingBO/000000b9.jdb
000000b8 1 70 1.5K Feb 5 19:00 /bdb/AuditingBO/000000b8.jdb
000000b7 20 71 21K Feb 4 21:25 /bdb/AuditingBO/000000b7.jdb
000000b6 58 36 59K Feb 3 19:22 /bdb/AuditingBO/000000b6.jdb
000000b5 21 71 21K Feb 2 18:35 /bdb/AuditingBO/000000b5.jdb
000000b4 25 69 25K Feb 1 20:31 /bdb/AuditingBO/000000b4.jdb
000000b3 53 19 54K Jan 31 18:41 /bdb/AuditingBO/000000b3.jdb
000000b2 0 0 69 Jan 30 00:30 /bdb/AuditingBO/000000b2.jdb
000000b1 26 5 27K Jan 29 00:30 /bdb/AuditingBO/000000b1.jdb
000000b0 11 75 11K Jan 28 23:36 /bdb/AuditingBO/000000b0.jdb
000000af 14 74 15K Jan 27 21:10 /bdb/AuditingBO/000000af.jdb
000000ae 48 31 48K Jan 26 23:29 /bdb/AuditingBO/000000ae.jdb
000000ad 18 73 19K Jan 25 22:55 /bdb/AuditingBO/000000ad.jdb
000000ac 20 68 20K Jan 24 22:17 /bdb/AuditingBO/000000ac.jdb
000000ab 21 4 22K Jan 23 00:30 /bdb/AuditingBO/000000ab.jdb
000000aa 0 0 69 Jan 22 00:30 /bdb/AuditingBO/000000aa.jdb
000000a9 18 66 18K Jan 21 18:43 /bdb/AuditingBO/000000a9.jdb
000000a8 95 15 96K Jan 20 19:53 /bdb/AuditingBO/000000a8.jdb
000000a7 48 33 49K Jan 19 19:51 /bdb/AuditingBO/000000a7.jdb
000000a6 16 65 16K Jan 18 21:50 /bdb/AuditingBO/000000a6.jdb
000000a5 37 45 38K Jan 17 19:18 /bdb/AuditingBO/000000a5.jdb
000000a4 2 68 2.2K Jan 16 13:58 /bdb/AuditingBO/000000a4.jdb
000000a3 1 67 1.8K Jan 15 17:06 /bdb/AuditingBO/000000a3.jdb
000000a2 117 15 117K Jan 15 00:00 /bdb/AuditingBO/000000a2.jdb
000000a1 39 31 40K Jan 13 20:53 /bdb/AuditingBO/000000a1.jdb
000000a0 16 65 16K Jan 12 19:25 /bdb/AuditingBO/000000a0.jdb
0000009f 31 61 32K Jan 11 23:49 /bdb/AuditingBO/0000009f.jdb
0000009e 56 41 56K Jan 10 17:52 /bdb/AuditingBO/0000009e.jdb
0000009d 0 0 69 Jan 9 00:30 /bdb/AuditingBO/0000009d.jdb
0000009c 0 0 69 Jan 8 00:30 /bdb/AuditingBO/0000009c.jdb
0000009b 32 28 33K Jan 7 18:00 /bdb/AuditingBO/0000009b.jdb
0000009a 0 58 883 Jan 6 12:31 /bdb/AuditingBO/0000009a.jdb
00000099 29 70 30K Jan 5 19:59 /bdb/AuditingBO/00000099.jdb
00000098 201 19 202K Jan 4 23:23 /bdb/AuditingBO/00000098.jdb
00000097 0 0 69 Jan 2 00:30 /bdb/AuditingBO/00000097.jdb
00000096 17 8 18K Jan 1 00:30 /bdb/AuditingBO/00000096.jdb
00000095 3 71 3.4K Dec 31 20:23 /bdb/AuditingBO/00000095.jdb
00000094 5 71 5.4K Dec 30 21:23 /bdb/AuditingBO/00000094.jdb
00000093 65 26 66K Dec 29 22:45 /bdb/AuditingBO/00000093.jdb
00000092 34 29 35K Dec 28 23:05 /bdb/AuditingBO/00000092.jdb
00000091 18 66 19K Dec 27 22:34 /bdb/AuditingBO/00000091.jdb
00000090 14 4 15K Dec 26 00:30 /bdb/AuditingBO/00000090.jdb
0000008f 0 0 69 Dec 25 00:30 /bdb/AuditingBO/0000008f.jdb
0000008e 6 74 6.7K Dec 24 15:15 /bdb/AuditingBO/0000008e.jdb
0000008d 254 20 255K Dec 23 22:21 /bdb/AuditingBO/0000008d.jdb
0000008c 27 43 28K Dec 22 20:03 /bdb/AuditingBO/0000008c.jdb
0000008b 497 19 497K Dec 22 00:00 /bdb/AuditingBO/0000008b.jdb
0000008a 0 0 69 Dec 9 00:30 /bdb/AuditingBO/0000008a.jdb
00000089 114 6 115K Dec 8 15:58 /bdb/AuditingBO/00000089.jdb
00000088 4 38 5.0K Dec 7 23:45 /bdb/AuditingBO/00000088.jdb
00000087 0 0 69 Dec 6 00:32 /bdb/AuditingBO/00000087.jdb
00000086 37 5 38K Dec 5 00:30 /bdb/AuditingBO/00000086.jdb
00000085 0 0 69 Dec 4 00:30 /bdb/AuditingBO/00000085.jdb
00000084 14 41 15K Dec 3 23:50 /bdb/AuditingBO/00000084.jdb
00000083 79 20 79K Dec 2 23:52 /bdb/AuditingBO/00000083.jdb
00000082 14 41 14K Dec 1 23:48 /bdb/AuditingBO/00000082.jdb
00000081 31 35 32K Dec 1 00:30 /bdb/AuditingBO/00000081.jdb
00000080 46 17 46K Nov 29 23:58 /bdb/AuditingBO/00000080.jdb
0000007f 0 0 69 Nov 28 00:30 /bdb/AuditingBO/0000007f.jdb
0000007e 0 0 69 Nov 27 00:30 /bdb/AuditingBO/0000007e.jdb
0000007d 71 18 71K Nov 26 23:51 /bdb/AuditingBO/0000007d.jdb
0000007c 28 37 28K Nov 25 23:49 /bdb/AuditingBO/0000007c.jdb
0000007b 92 35 92K Nov 24 23:50 /bdb/AuditingBO/0000007b.jdb
0000007a 95 25 95K Nov 23 23:52 /bdb/AuditingBO/0000007a.jdb
00000079 34 38 34K Nov 22 23:51 /bdb/AuditingBO/00000079.jdb
00000078 29 7 30K Nov 21 00:30 /bdb/AuditingBO/00000078.jdb
00000077 0 0 69 Nov 20 00:30 /bdb/AuditingBO/00000077.jdb
00000076 16 36 16K Nov 19 23:50 /bdb/AuditingBO/00000076.jdb
00000075 189 20 189K Nov 18 23:49 /bdb/AuditingBO/00000075.jdb
00000074 14 35 15K Nov 16 23:52 /bdb/AuditingBO/00000074.jdb
00000073 24 38 25K Nov 15 23:49 /bdb/AuditingBO/00000073.jdb
00000072 71 16 72K Nov 15 00:30 /bdb/AuditingBO/00000072.jdb
00000071 11 28 12K Nov 12 23:52 /bdb/AuditingBO/00000071.jdb
00000070 571 32 571K Nov 12 00:30 /bdb/AuditingBO/00000070.jdb
0000006f 43 16 44K Nov 10 23:52 /bdb/AuditingBO/0000006f.jdb
0000006e 2 41 3.0K Nov 9 19:54 /bdb/AuditingBO/0000006e.jdb
0000006d 15 41 16K Nov 8 23:57 /bdb/AuditingBO/0000006d.jdb
0000006c 47 17 47K Nov 7 19:45 /bdb/AuditingBO/0000006c.jdb
0000006b 2 40 2.4K Nov 6 15:55 /bdb/AuditingBO/0000006b.jdb
0000006a 20 33 21K Nov 6 00:05 /bdb/AuditingBO/0000006a.jdb
00000069 98 24 99K Nov 4 23:41 /bdb/AuditingBO/00000069.jdb
00000068 21 37 21K Nov 3 23:48 /bdb/AuditingBO/00000068.jdb
00000067 61 33 62K Nov 2 23:53 /bdb/AuditingBO/00000067.jdb
00000066 0 0 69 Nov 1 00:30 /bdb/AuditingBO/00000066.jdb
00000065 0 0 69 Oct 31 00:30 /bdb/AuditingBO/00000065.jdb
00000064 34 9 35K Oct 30 00:30 /bdb/AuditingBO/00000064.jdb
00000063 13 41 14K Oct 29 23:43 /bdb/AuditingBO/00000063.jdb
00000062 98 35 99K Oct 28 23:51 /bdb/AuditingBO/00000062.jdb
00000061 49 23 49K Oct 28 00:00 /bdb/AuditingBO/00000061.jdb
00000060 13 33 13K Oct 26 23:54 /bdb/AuditingBO/00000060.jdb
0000005f 4 41 4.1K Oct 26 11:06 /bdb/AuditingBO/0000005f.jdb
0000005e 183 1 183K Oct 25 23:47 /bdb/AuditingBO/0000005e.jdb
0000005d 65 19 65K Oct 20 23:48 /bdb/AuditingBO/0000005d.jdb
0000005c 72 36 72K Oct 19 23:48 /bdb/AuditingBO/0000005c.jdb
0000005b 67 23 67K Oct 18 23:48 /bdb/AuditingBO/0000005b.jdb
0000005a 0 0 69 Oct 17 00:30 /bdb/AuditingBO/0000005a.jdb
00000059 0 39 664 Oct 16 2010 /bdb/AuditingBO/00000059.jdb
00000058 83 17 83K Oct 15 2010 /bdb/AuditingBO/00000058.jdb
00000057 89 27 89K Oct 14 2010 /bdb/AuditingBO/00000057.jdb
00000056 27 42 27K Oct 13 2010 /bdb/AuditingBO/00000056.jdb
00000055 20 4 21K Oct 12 2010 /bdb/AuditingBO/00000055.jdb
00000054 13 42 14K Oct 11 2010 /bdb/AuditingBO/00000054.jdb
00000053 0 0 51K Oct 10 2010 /bdb/AuditingBO/00000052.jdb
00000052 50 4 69 Oct 10 2010 /bdb/AuditingBO/00000053.jdb
00000051 41 15 42K Oct 8 2010 /bdb/AuditingBO/00000051.jdb
00000050 42 31 43K Oct 7 2010 /bdb/AuditingBO/00000050.jdb
0000004f 74 37 75K Oct 6 2010 /bdb/AuditingBO/0000004f.jdb
0000004e 82 26 83K Oct 5 2010 /bdb/AuditingBO/0000004e.jdb
0000004d 73 39 74K Oct 4 2010 /bdb/AuditingBO/0000004d.jdb
0000004c 29 9 30K Oct 4 2010 /bdb/AuditingBO/0000004c.jdb
0000004b 0 39 665 Oct 2 2010 /bdb/AuditingBO/0000004b.jdb
0000004a 40 40 41K Oct 1 2010 /bdb/AuditingBO/0000004a.jdb
00000049 466 27 467K Sep 30 2010 /bdb/AuditingBO/00000049.jdb
00000048 49 16 50K Sep 22 2010 /bdb/AuditingBO/00000048.jdb
00000047 38 39 39K Sep 21 2010 /bdb/AuditingBO/00000047.jdb
00000046 40 27 40K Sep 20 2010 /bdb/AuditingBO/00000046.jdb
00000045 0 39 664 Sep 19 2010 /bdb/AuditingBO/00000045.jdb
00000044 0 0 69 Sep 18 2010 /bdb/AuditingBO/00000044.jdb
00000043 72 14 72K Sep 17 2010 /bdb/AuditingBO/00000043.jdb
00000042 26 34 26K Sep 16 2010 /bdb/AuditingBO/00000042.jdb
00000041 14 40 15K Sep 15 2010 /bdb/AuditingBO/00000041.jdb
00000040 116 5 117K Sep 14 2010 /bdb/AuditingBO/00000040.jdb
0000003f 55 5 56K Sep 13 2010 /bdb/AuditingBO/0000003f.jdb
0000003e 67 0 68K Sep 11 2010 /bdb/AuditingBO/0000003e.jdb
0000003d 105 5 106K Sep 9 2010 /bdb/AuditingBO/0000003d.jdb
0000003c 69 5 70K Sep 8 2010 /bdb/AuditingBO/0000003c.jdb
0000003b 206 8 206K Sep 7 2010 /bdb/AuditingBO/0000003b.jdb
0000003a 0 0 69 Sep 7 2010 /bdb/AuditingBO/0000003a.jdb
00000039 63 25 64K Sep 7 2010 /bdb/AuditingBO/00000039.jdb
00000038 0 0 69 Sep 4 2010 /bdb/AuditingBO/00000038.jdb
00000037 84 3 85K Sep 4 2010 /bdb/AuditingBO/00000037.jdb
00000036 70 14 70K Sep 2 2010 /bdb/AuditingBO/00000036.jdb
00000035 19 36 20K Sep 1 2010 /bdb/AuditingBO/00000035.jdb
00000034 52 21 52K Aug 31 2010 /bdb/AuditingBO/00000034.jdb
00000033 28 33 28K Aug 30 2010 /bdb/AuditingBO/00000033.jdb
00000032 33 3 33K Aug 30 2010 /bdb/AuditingBO/00000032.jdb
00000031 80 21 81K Aug 27 2010 /bdb/AuditingBO/00000031.jdb
00000030 23 39 24K Aug 26 2010 /bdb/AuditingBO/00000030.jdb
0000002f 118 14 118K Aug 25 2010 /bdb/AuditingBO/0000002f.jdb
0000002e 0 39 659 Aug 22 2010 /bdb/AuditingBO/0000002e.jdb
0000002d 108 11 109K Aug 21 2010 /bdb/AuditingBO/0000002d.jdb
0000002c 308 18 308K Aug 18 2010 /bdb/AuditingBO/0000002c.jdb
0000002b 0 0 69 Aug 7 2010 /bdb/AuditingBO/0000002b.jdb
0000002a 15 42 16K Aug 6 2010 /bdb/AuditingBO/0000002a.jdb
00000029 78 20 78K Aug 6 2010 /bdb/AuditingBO/00000029.jdb
00000028 81 22 82K Aug 4 2010 /bdb/AuditingBO/00000028.jdb
00000027 49 38 50K Aug 2 2010 /bdb/AuditingBO/00000027.jdb
00000026 121 16 122K Aug 1 2010 /bdb/AuditingBO/00000026.jdb
00000025 27 42 28K Jul 29 2010 /bdb/AuditingBO/00000025.jdb
00000024 23 36 23K Jul 28 2010 /bdb/AuditingBO/00000024.jdb
00000023 77 10 78K Jul 28 2010 /bdb/AuditingBO/00000023.jdb
00000022 48 23 48K Jul 27 2010 /bdb/AuditingBO/00000022.jdb
00000021 19 44 19K Jul 26 2010 /bdb/AuditingBO/00000021.jdb
00000020 0 0 69 Jul 25 2010 /bdb/AuditingBO/00000020.jdb
0000001f 25 14 26K Jul 24 2010 /bdb/AuditingBO/0000001f.jdb
0000001e 21 40 22K Jul 23 2010 /bdb/AuditingBO/0000001e.jdb
0000001d 77 35 77K Jul 23 2010 /bdb/AuditingBO/0000001d.jdb
0000001c 283 26 283K Jul 22 2010 /bdb/AuditingBO/0000001c.jdb
0000001b 30 40 30K Jul 15 2010 /bdb/AuditingBO/0000001b.jdb
0000001a 53 27 54K Jul 13 2010 /bdb/AuditingBO/0000001a.jdb
00000019 33 43 34K Jul 12 2010 /bdb/AuditingBO/00000019.jdb
00000018 26 18 26K Jul 11 2010 /bdb/AuditingBO/00000018.jdb
00000017 1 41 1.8K Jul 10 2010 /bdb/AuditingBO/00000017.jdb
00000016 34 36 35K Jul 9 2010 /bdb/AuditingBO/00000016.jdb
00000015 164 25 165K Jul 8 2010 /bdb/AuditingBO/00000015.jdb
00000014 98 36 99K Jul 7 2010 /bdb/AuditingBO/00000014.jdb
00000013 112 15 113K Jul 7 2010 /bdb/AuditingBO/00000013.jdb
00000012 39 40 40K Jul 5 2010 /bdb/AuditingBO/00000012.jdb
00000011 16 15 16K Jul 4 2010 /bdb/AuditingBO/00000011.jdb
00000010 1 41 1.2K Jul 3 2010 /bdb/AuditingBO/00000010.jdb
0000000f 59 39 60K Jul 2 2010 /bdb/AuditingBO/0000000f.jdb
0000000e 138 26 138K Jul 1 2010 /bdb/AuditingBO/0000000e.jdb
0000000d 51 37 52K Jun 30 2010 /bdb/AuditingBO/0000000d.jdb
0000000c 79 31 79K Jun 29 2010 /bdb/AuditingBO/0000000c.jdb
0000000b 80 38 80K Jun 28 2010 /bdb/AuditingBO/0000000b.jdb
0000000a 42 23 42K Jun 28 2010 /bdb/AuditingBO/0000000a.jdb
00000009 18 38 18K Jun 26 2010 /bdb/AuditingBO/00000009.jdb
00000008 96 40 96K Jun 25 2010 /bdb/AuditingBO/00000008.jdb
00000007 125 28 125K Jun 24 2010 /bdb/AuditingBO/00000007.jdb
00000006 290 22 290K Jun 24 2010 /bdb/AuditingBO/00000006.jdb
00000005 181 17 181K Jun 22 2010 /bdb/AuditingBO/00000005.jdb
00000004 16 39 16K Jun 21 2010 /bdb/AuditingBO/00000004.jdb
00000003 31 0 31K Jun 20 2010 /bdb/AuditingBO/00000003.jdb
00000002 23 15 24K Jun 20 2010 /bdb/AuditingBO/00000002.jdb
00000001 0 0 69 Jun 20 2010 /bdb/AuditingBO/00000001.jdb
00000000 94 18 95K Jun 20 2010 /bdb/AuditingBO/00000000.jdbWhy there are so many files with 0 size and 0% utilizacion?
Why there are new files when the previous file has not reach 10MB size?
Why there is a 26% of total utilization?
At 00:30 is performed a backup with DbBackup.
Custom JE Properties:
je.maxMemory=134217728
je.maxMemoryPercent=75
je.sharedCache=true
Environment: Solaris 10 + JRE6u17 64 bits + JE 4.1.7
Thanks in advance,
/Cesar.Why there are so many files with 0 size and 0% utilizacion?The cleaner and checkpointer apparently haven't caught up to cleaning these files, or deleting them at checkpoint time. Take a look at your checkpoints to see when they're happening.
Why there are new files when the previous file has not reach 10MB size?Each backup starts a new file, see DbBackup.startBackup.
Why there is a 26% of total utilization?Apparently you don't have enough cleaner threads or are not doing checkpoints frequently enough. See
http://download.oracle.com/docs/cd/E17277_02/html/GettingStartedGuide/logfilesrevealed.html
Looks like you have a very low write rate. Perhaps checkpoints are not occurring because enough data hasn't yet been written.
--mark -
Help With Integrating Servlet and JSP Page?
Hello There
--i made jsp page that contain name and description fields and add button
--and i made servlet that contain the code to insert name and description in the database
--and i want to make that when the user hit the add button
-->the entered name and description is sent to the servlet
and the servlet sent them to database?
here's what i 've done:
the jsp code:
<html:html locale="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
Categories Page
</title>
<html:base/>
</head>
<body style="background-color: white">
<form action="jpage.jsp" method="get">
<h1>
<center>
categories Operations
</center>
</h1>
<h3>
<label>Name</label>
<input type="text" name="name" value="" size="10" />
<label>Description</label>
<input type="text" name="description" value="" size="10" />
<input type="submit" value="Add" name="button" />
</h3>
</form>
</body>
</html:html>the servlet code:
import java.io.*;
import java.util.Enumeration;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.net.*;
class NewServlet1 extends HttpServlet{
Connection conn;
private ServletConfig config;
public void init(ServletConfig config)
throws ServletException{
this.config=config;
public void service (HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
HttpSession session = req.getSession(true);
res.setContentType("text/html");
try{
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost/struts", "root", "");
PreparedStatement ps;
ps = conn.prepareStatement ("INSERT INTO categories (Name, Description) VALUES(?,?)");
ps.setString (1, "aa");
ps.setString (3, "bb");
ps.executeUpdate();
ps.close();
conn.close();
}catch(Exception e){ e.getMessage();}
public void destroy(){}
}The JSP Code:
<html:html locale="true">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>
Categories Page
</title>
<html:base/>
</head>
<body style="background-color: white">
<form action="actionServlet.do?action=Additem" method="*post*">
<h1>
<center>
categories Operations
</center>
</h1>
<h3>
<label>Name</label>
<input type="text" name="name" value="" size="10" />
<label>Description</label>
<input type="text" name="description" value="" size="10" />
<input type="button" value="Submit">
</h3>
</form>
</body>
</html:html>The Servlet Code:
import java.io.*;
import java.util.Enumeration;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
import java.net.*;
public class NewServlet1 extends HttpServlet implements SingleThreadModel {
public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException,IOException {
doPost(request,response);
public void doPost(HttpServletRequest request, HttpServletResponse response)throws ServletException,IOException {
String action = request.getParameter("action"); // action = "Additem"
if (action.equals("Additem")) {
String name = request.getParameter("name");
String description = request.getParameter("description");
RequestDispatcher reqDisp = null;
try{
Connection conn;
PreparedStatement ps;
Class.forName("com.mysql.jdbc.Driver");
conn = DriverManager.getConnection("jdbc:mysql://localhost/struts", "root", "");
ps = conn.prepareStatement ("INSERT INTO categories (Name, Description) VALUES(?,?)");
ps.setString (1, name);
ps.setString (3, description);
ps.executeUpdate();
ps.close();
conn.close();
reqDisp= request.getRequestDispatcher("./index.jsp");
reqDisp.forward(request, response);
catch (Exception ex){
System.out.println("Error: "+ ex);
}The web.xml code:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet>
<servlet-name>NewServlet1</servlet-name>
<servlet-class>NewServlet1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>NewServlet1</servlet-name>
<url-pattern>/NewServlet1</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>actionServlet</servlet-name>
<servlet-class>com.test.servlet.NewServlet1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>actionServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
</web-app> -
Generated JSP reports and context-param in web.xml
I have what I believe to be a problem when using .jsp files generated from reports builder (actually, it looks as if the problem is in the reports tag library. When adding a context-param to web.xml, I get an error when compiling the following line:
<%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
Error(1): oracle.xml.parser.v2.XMLParseException: Invalid element 'context-param' in content of 'web-app', expected elements '[taglib, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref]'.
Note that I can read the context param and no other JSP pages seem to care, just those with the Reports Tag library.
Regards,
JeffBen -
There can be init params for the servlet or for the servlet context. For the servlet, this looks like:
<servlet>
<servlet-name>InitServlet</servlet-name>
<servlet-class>package1.InitServlet</servlet-class>
<init-param>
<param-name>message</param-name>
<param-value>Hello From Initialization Parameter</param-value>
</init-param>
</servlet>
in the web.xml file, and is accessed using:
public void init(ServletConfig config) throws ServletException
super.init(config);
message = config.getInitParameter("message");
For a servlet context init param, you define it as you did using the web.xml settings editor:
<context-param>
<param-name>hello</param-name>
<param-value>hi</param-value>
</context-param>
This is accessed using:
public void init(ServletConfig config) throws ServletException
super.init(config);
message1 = config.getServletContext().getInitParameter("hello");
Hope this helps,
Lynn
Java Tools Team -
Problem with java beans and jsp on web logic 6.0 sp1
HI ,
I am using weblogic6.0 sp1.
i have problem with jsp and java beans.
i am using very simple java bean which stores name and email
from a html form.
but i am getting following errors:
Full compiler error(s):
D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
cannot resolve symbol
symbol : class userbn
location: class jsp_servlet._savename2
userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
^
D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
cannot resolve symbol
symbol : class userbn
location: class jsp_servlet._savename2
userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
^
D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:94:
cannot resolve symbol
symbol : class userbn
location: class jsp_servlet._savename2
ud = (userbn) java.beans.Beans.instantiate(getClass().getClassLoader(),
"userbn"); //[ /SaveName2.jsp; Line: 7]
^
3 errors
in which directory should i place java bean source file(.java file)
here is my jsp file:
<%@ page language = "java" contentType = "text/html" %>
<html>
<head>
<title>bean2</title>
</head>
<body>
<jsp:usebean id = "ud" class = "userbn" >
<jsp:setProperty name = "ud" property = "*" />
</jsp:usebean>
<ul>
<li> name: <jsp:getProperty name = "ud" property = "name" />
<li> email : <jsp:getProperty name = "ud" property = "email" />
</ul>
</body>
<html>
here is my bean :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
import java.io.*;
public class userbn implements Serializable
private String name ;
private String email;
public void setName(String n)
name = n;
public void setEmail(String e)
email = e;
public String getName()
return name;
public String getEmail()
return email;
public userbn(){}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pls help me.
Thanks
sravana.
You realy can do it like Xiang says, but the better way is to use packages. That's
the way BEA is designed for. If you use packages you can but your bean classes
in every subfolder beneath Classes. Here for example we have the subfolders test
and beans:
You have to declare the package on top of your Bean Source Code:
package test.beans;
In your JSP you don't need the import code of Xiang. You only have to refer the
path of your bean class:
<jsp:useBean id="testBean" scope="session" class="test.beans.TestBean" />
There are some other AppServers that only can deploy Java Beans in packages. So
if you use packages you are always on the right side.
ciao bernd
"sravana" <[email protected]> wrote:
>
>Thank you very much Xiang Rao, It worked fine.
>Thanks again
>sravana.
>
>"Xiang Rao" <[email protected]> wrote:
>>
>><%@ page import="userbn" language = "java" contentType = "text/html"
>>%> should
>>work for you.
>>
>>
>>"sravana" <[email protected]> wrote:
>>>
>>>HI ,
>>>
>>>I am using weblogic6.0 sp1.
>>>
>>>i have problem with jsp and java beans.
>>>
>>>i am using very simple java bean which stores name and email
>>>
>>>from a html form.
>>>
>>>but i am getting following errors:
>>>
>>>________________________________________________________________
>>>
>>>Full compiler error(s):
>>>D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
>>>cannot resolve symbol
>>>symbol : class userbn
>>>location: class jsp_servlet._savename2
>>> userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
>>> ^
>>>D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:89:
>>>cannot resolve symbol
>>>symbol : class userbn
>>>location: class jsp_servlet._savename2
>>> userbn ud = (userbn) //[ /SaveName2.jsp; Line: 7]
>>> ^
>>>D:\bea4\wlserver6.0sp1\config\mydomain\applications\DefaultWebApp_myserver\WEB-INF\_tmp_war_myserver_myserver_DefaultWebApp_myserver\jsp_servlet\_savename2.java:94:
>>>cannot resolve symbol
>>>symbol : class userbn
>>>location: class jsp_servlet._savename2
>>> ud = (userbn) java.beans.Beans.instantiate(getClass().getClassLoader(),
>>>"userbn"); //[ /SaveName2.jsp; Line: 7]
>>> ^
>>>3 errors
>>>
>>>____________________________________________________________
>>>
>>>in which directory should i place java bean source file(.java file)
>>>
>>>here is my jsp file:
>>>--------------------------------------------------------
>>>
>>><%@ page language = "java" contentType = "text/html" %>
>>><html>
>>><head>
>>><title>bean2</title>
>>></head>
>>><body>
>>><jsp:usebean id = "ud" class = "userbn" >
>>><jsp:setProperty name = "ud" property = "*" />
>>></jsp:usebean>
>>><ul>
>>><li> name: <jsp:getProperty name = "ud" property = "name" />
>>><li> email : <jsp:getProperty name = "ud" property = "email" />
>>></ul>
>>></body>
>>><html>
>>>
>>>-------------------------------------------------------------
>>>
>>>here is my bean :
>>>
>>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>>import java.io.*;
>>>
>>>public class userbn implements Serializable
>>>{
>>>
>>> private String name ;
>>>
>>> private String email;
>>>
>>> public void setName(String n)
>>> {
>>>
>>> name = n;
>>> }
>>>
>>> public void setEmail(String e)
>>> {
>>>
>>> email = e;
>>> }
>>>
>>> public String getName()
>>> {
>>>
>>> return name;
>>> }
>>>
>>> public String getEmail()
>>> {
>>>
>>> return email;
>>> }
>>>
>>> public userbn(){}
>>>}
>>>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>>pls help me.
>>>Thanks
>>>sravana.
>>>
>>
>
-
Single Sign-on with Multiple Servlets and JSPs
I am in the midst of attempting to logically tie together a number of our
web applications under a single sign-on "umbrella". What we want is the
following: for any n applications a user may have access rights for up to n
of them. Once signed in, she has rights to visit any app to which she has
permissions as long as her session is valid. Unfortunately, I'm having
trouble seeing how to make this work given the documentation that I have.
I've read thru the newsgroup in search of a solution, but I haven't seen
anything geared toward this specific approach.
Currently, each "application" (servlet) has a list of valid users via ACLs
(we've implemented a RealmExtender, so we're not going via props file
entries), and we let the browser pop-up window enforce the sign-on. This
has worked exactly as we wish (single sign-on, etc.), for testing, but we'd
really rather have our own form-based sign-on for production.
To that end, we've done the following:
1) implemented a JSP form-based sign-on (basically ripped off from the
example provided by BEA), which does a "ServletAuthentication.weak()" check
to confirm identity.
2) placed the following code (essentially) within the service() method of
our servlet superclass, which I thought would force another check. My
intention is to disallow the user from "jumping into" an app thru a
shortcut, and thereby bypassing security.
HttpSession session = request.getSession(true);
if (session.isNew()) {
response.sendRedirect(welcomeURL);
However, we can't get the form-based approach to mimic the functionality of
the default browser pop-up: the sign-in doesn't seem to "follow" the user
the way it did with the pop-up. Instead, when I come in thru our login
page, the browser pop-up is still appearing when I click the link for an
app for which to which I have permissions.
Is the default browser pop-up doing something different that I should know
about? Seems like this should be simple to do, but it's surprisingly subtle
(or maybe I'm just clueless).
TIA
Well, if you want to hear my personal opinion:
better stick to the cookie specification (http://wp.netscape.com/newsref/std/cookie_spec.html) and accept the constraint that cookies will only be send to domains that tail-match the domain-constraint specified in the set-cookie http response.
Although this specification is not an official internet standard most browsers are implementing the cookie mechanism according to this specification.
Unfortenately there's no option to specify that a cookie should be send to a list of servers and/or sub-domains.
However one physical server can have multiple (FQDN) hostnames. So if you intend to send the cookie to a group of servers the best approach is to create a new (DNS) (sub-)domain exclusively for those servers.
Theoretically (and also practically) it is possible to set cookies for multiple domains (by using a webservice that will set cookies on request of a caller). But that approach is dangerous:
(1) not the server but the http client is defining the content of the cookie (= part of the http server response)
(2) (unintended) many servers can obtain the cookie which will be send to all servers that reside in all (tail-matching sub-)domains; although most likely only one or two servers of each domain are intended recipients
Regards, Wolfgang -
Javascript error with f:subview and jsp:include
Hi,
I have tried to include one jsp page with jsf components into another jsp page with jsf components. But somehow I get a Javascript error.
I have of course included the jsp:include into an f:subview like this:
<f:subview id="tree" rendered="#{tabsBacker.treeRendered}">
<jsp:include page="mission.jsp" />
</f:subview>In mission.jsp, all non-jsf tags are surrounded by f:verbatim tags (otherwise, JBoss would complain anyway).
The Javascript error says: "elements.form1:_link_hidden_ is null".
"form1" is the name of the form in my jsp page which includes the other one.
As soon as I remove the jsp:include thing, everything works fine. The include happens in a t:panelTabbedPane, and (probably as a result of the javascript error), the tab where the included page should be shown, can't be displayed. I can click on the tab, the page is reloaded, but nothing else happens.
The error occurs in IE and in Firefox.
Can anyone help me to solve this problem??
Kind regards,
WiebkeIt's just a jsp fragment file. Here's the start of the jspf included above:
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://www.ibm.com/jsf/html_extended" prefix="hx" %>
<f:subview id="browseForm">
<table class="box" width="100%">
<tr>
<td><h:outputText value="#{labels.someValue}" styleClass="smalltitle"/></td>
</tr>And so on. This was just done to stop the jsp files becoming too long, I think. So the subview tag is included in the jspf file rather than around the jsp file as you have it.
Illu
Maybe you are looking for
-
Unable to connect to AIM error
I keep getting this error message when I try logging on to ichat: Could not connect to AIM The connection to the host was unexpectedly lost. I have checked all of my proxy settings in firewall and have even tried my aim and .mac account. My bonjour c
-
How do I edit my name/alias in profile??
My name contains the letters Æ (æ) and Ø (ø) [Norwegian], and after I registered my account these letters came out as ? and ? in my alias; ¨ and É in my profile name. My alias looks really stupid as " B?rre S?thre ", and my name looks no better: " B¨
-
Coding ABAP using LDB PNP and authorizations problems
This post requires a blend of ABAP and HCM skills. When coding my own ABAP using LDB PNP, the LDB will provide me with the employees selected but will skip those for which I do not have access (regarding Authorizations settings) to one or more of the
-
Vendor Evaluation - Fully Automatic
Hi all, Could you please answer two queries in Vendor Evaluation. 1. What is use and where we assign scope of list in vendor evaluation 2. I want to take evaluation from Invoice also. Configurations I have done but system is not calculating the score
-
hello, i would like to know some of your opinions re: use of anti-virus software for mac. until now i never used any. i never had a problem with viruses & else. two weeks ago, i had a bad experience while using netscape browser: lost important data (