Faisal Khan

Ranch Hand
+ Follow
since Jun 29, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Faisal Khan

Just to clarify guys, technique explained in the following article is not good way to go then:
http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Servlets8.html#103101

Any views on using the .include()?

Thanks for the feedback thus far.
10 years ago
Hi,

I have come across some security access filters which are using request.getRequestDispatcher(...).forward() and .include() from within the filter. If the user is not authorised, they get forwarded to an error page from within the filter.

Does this seem an acceptable technique to use or should we consider other options such as writing the html page from the filter?

The .include() is being used in one place to call in a servlet that does a bunch of checks and being used for other things too.

Regards

Faisal
10 years ago
Anyone wishing to order the book in UK, I would recommend www.compman.co.uk - very prompt, you will get the book next day providing it is in stock at the time of the order, which it has been since published.
Hi,

My colleague ordered teh SCJP 5.0 book from Computer Manuals, orderd on Sunday and it was here yesterday. Here is the link to it:

http://www.compman.co.uk/scripts/browse.asp?ref=693405

Regards

Faisal
Another thing, the few lines before the error may help as it seems to be trying to load a mapping for ServletTestRunner

12 years ago
Hi,

I am not precisely clear on the error we are getting but here is what happens.

I am working on code base that we normally compile using JDK 131, we are using Struts 1.0.2 on weblogic 6.1. We deploy an ear file containing the war file, additionally we configure the application as an exploded app - both of these deploy and work fine when compiled with jdk 131.

However, I changed my JAVA_HOME to 1.4.2_08, compiled the code (this is fine), I deploy the exploded app, this too is fine apart from a few RTEs which is fine and I know how to fix. The problem is that as soon as I deploy the ear file and attempt to target my war file it throws an exception:



Now the Class not found seems not to be the actual error, I believe, the problems seems to be something different. If I unzip the war into say c:\temp and configure that as an app, that too seems to work fine.

Strange thing is the code compiles with 1.4.2_08 and deploys to WL6.1 and 8.1 as an exploded app but as soon as we try to deply the war file then we have problems.

Any help or pointers would be appreciated.

Thanks

FK
12 years ago
Hi Guys,

I am not sure if this question is in the appropriate forum, I am embarking upon a task to evaluate some CMSs in PHP and Java. I can do with some help in identifying some *good* open source java based CMSs.

I am particular on a few things in addition to all the normal CMS features:

- flexible categorisaion, ideally no limit (ExpressEngine has this (PHP))
- one CMS hosting multiple sites, such that all data is in one database, uploading is in one place and then end user interface is deployed for each site (apparently Typo3 (PHP based) can do this)
- would like a very good cross reference ability, linking one article to other relevant articles (within the site and across set of sites)

Any help will be appreciated.

Thanks

Faisal
Hi,

we have a strange issue with web start, when our application is launched with a CD in the CD drive and then remove the CD while the application is still running, we repeatedly get an error message about no cd found.

The only way to get rid of the message:

1. place a CD in there
2. Re-start the machine

Re-starting the appliction does not make any difference.

Anyone come across this and the work aorund.

Thanks

Faisal
13 years ago
I have a class X with the following lines of code in the main:

DOMConfigurator.configure("log4j.xml");
Logger log = Logger.getLogger("ChatMessagesAppender."+args[0]+"."+args[1]);
log.info( args[2] );

How do I work out what the value of args[0] was set to, from within theChatMessagesAppender class?

Any help will be apprecited.

FK
[ July 01, 2004: Message edited by: Faisal Khan ]
A very important topic indeed and I have been burnt and learnt the hard way, here is a brief of what I learnt. Pretty much what has been stated above but adding a couple of more details.

My first real java webapp was a bunch of JSPs (lots of java code in them) and Java beans (with all data access methods in them).

I re-architected this application with the help of many ranchers and this app was re-written to abide by the model 2 MVC compliant. I felt that in addition to getting the MVC part right, there is also extremely important to get the data acess right, I subscribed to the DAO design patter.

Over all my app had ended up as following:

1. MySQL db in the backend
2. A DAO layer, which can easily be enhanced to support another RDMBS
3. The business model, mostly java beans
4. Struts to communicate between the user request and the business model - there are a number of alternatives one can use here.
5. JSP and Tiles (I thought tiles was excellent) for the presentation - I used a JSP 2 container so good use of JSTL, EL and Tags - making things very maintainable.
6. Good usage of filters (i think they are brilliant).

In the end, I learnt that the actual tool or technology one uese is relatively less important than getting the actual architecture to be at a sound level.

HTH

FK
14 years ago
JSP
JSTL in Action is a very good book in my opinion, published by Manning:
http://www.manning.com/bayern/
For JSP and Servlets, it might be a good idea to wait for the Head First JSP and Servlets by Kathy Sirra and Bert Bates, check out the following thread:
http://www.coderanch.com/t/167377/java-Web-Component-SCWCD/certification/Head-First-SCWCD
14 years ago
JSP
It works on older J2EE containers too, I have used it with Tomcat 4.1.24 and works just fine. Like Gregg said, you have to ensure the jar files are under the WEB-INF/lib folder.
14 years ago

Originally posted by Marc Peabody:
Using Websphere, the tlds get added to web.xml automatically. I took them out and restarted my server. Sure enough, it still works.
I think this is because the declaration script tags in your jsps tell the container where to find them.
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
You could still use the web.xml to alias the tlds...
<taglib>
<taglib-uri>struts-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<%@ taglib uri="struts-html" prefix="html" %>



Marc,
You don't actually need any of the tld files inside your WEB-INF directory as they come packed in the struts.jar file. Furthermore, you don't need to define the tlds as you have above, you can simply have the following line:
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
This will find the tags-html from within the jar file sitting in your /WEB-INF/lib directory
HTH
FK
14 years ago
Gregg,
They are bundled in the struts.jar, so you do not need to declare them in the deployment descriptor file.
FK
14 years ago
Greg,
Thank you for a to-the-point well written article on JSF, being a developer who is using Struts for about 6 months I can see the appeal of JSF but I have a few questions that perhaps you can shed some light upon:
1. I love the power of using Tiles, is it possible (or even a good idea) to use Tiles with JSF.
2. We are due to release a new version of our quoting system (currently a page centric application) in June which is using Struts as the framework - would it be good to roll that out as is or refactor it to use JSF while its still in development - it is not a big application so can not see it being a massive effort to move from Struts to JSF.
3. Is JSF production ready with the releae of 1.0 API and implementation, or should we still give it some time.
4. There has been much talk about the massive investments in JSF space so I am tempted to think it is pretty safe to move.
Thanks in advance for any feedback.
Faisal
14 years ago