Anuj Batra

Greenhorn
+ Follow
since Sep 18, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Anuj Batra

Thank you Tim,

Will keep this in mind from next time
12 years ago
Hi Tim,

Thanks a lot for your replies. Was a great help for me. However i realized that my approach and the values were correct that I am populating.
The problem was that I was using File.separator instead of "/" which on windows was not working because on windows the File.separator will return "\"
instead of "/". Such a silly thing.
12 years ago
Hi Youssef,
No luck
12 years ago
So

This means that the implementations vary accross the application servers ?
12 years ago
Hi,

The property file is not under classes or lib folder but it is under config directory inside WEB-INF
12 years ago
Hi I have defined a servlet Context Listener in my web app which will be loaded on server startup

From that servlet i want to read a properties file. The challenge is that the file is located in config folder.

WEB-INF
|
|____ classes
|
|___________config/env.properties

Also while creating my web application i am creating a jar of my classes and placing it in the lib foolder in WEB-INF

I am not able to load the properties file in servlet context listener.

For this I have 2 questions
1. I am doing. Is this correct ?
2. If yes then how will this vary across different application servers. This is working fine in tomcat but not in glassfish.

Thanks in advance for your help
12 years ago
Hi I am trying to deploy an ear in websphere and i am getting the error\

org.eclipse.emf.common.util.WrappedException: IWAE0082E Type is unrecognized or not yet supported: PUBLIC_ID=null SYSTEM_ID=http://java.sun.com/xml/ns/j2ee/application_6.xsd
at com.ibm.wtp.internal.emf.xml.EMF2DOMRenderer.loadDocument(EMF2DOMRenderer.java:74)
at com.ibm.wtp.internal.emf.xml.EMF2DOMRenderer.doLoad(EMF2DOMRenderer.java:55)
at com.ibm.wtp.emf.xml.TranslatorResourceImpl.basicDoLoad(TranslatorResourceImpl.java:126)
at com.ibm.wtp.emf.resource.CompatibilityXMIResourceImpl.doLoad(CompatibilityXMIResourceImpl.java:170)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:884)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:741)
at com.ibm.wtp.emf.xml.TranslatorResourceImpl.load(TranslatorResourceImpl.java:318)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java(Inlined Compiled Code))
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java(Inlined Compiled Code))
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java(Compiled Code))
at com.ibm.etools.j2ee.commonarchivecore.strategy.LoadStrategyImpl.getMofResource(LoadStrategyImpl.java:329)
at com.ibm.etools.j2ee.commonarchivecore.impl.ArchiveImpl.getMofResource(ArchiveImpl.java:891)
at com.ibm.etools.j2ee.commonarchivecore.impl.ModuleFileImpl.getDeploymentDescriptorResource(ModuleFileImpl.java:256)
at com.ibm.etools.j2ee.commonarchivecore.strategy.XmlBasedImportStrategyImpl.primLoadDeploymentDescriptor(XmlBasedImportStrategyImpl.java:32)
at com.ibm.etools.j2ee.commonarchivecore.strategy.Ear12ImportStrategyImpl.loadDeploymentDescriptor(Ear12ImportStrategyImpl.java:72)
at com.ibm.etools.j2ee.commonarchivecore.strategy.Ear12ImportStrategyImpl.importMetaData(Ear12ImportStrategyImpl.java:67)
at com.ibm.etools.j2ee.commonarchivecore.impl.EARFileImpl.getDeploymentDescriptor(EARFileImpl.java:287)
at com.ibm.etools.commonarchive.impl.EARFileImpl.initializeModuleExtensions(EARFileImpl.java:608)
at com.ibm.etools.commonarchive.impl.EARFileImpl.initializeAfterOpen(EARFileImpl.java:687)
at com.ibm.etools.j2ee.commonarchivecore.impl.CommonarchiveFactoryImpl.openSpecificArchive(CommonarchiveFactoryImpl.java:727)
at com.ibm.etools.j2ee.commonarchivecore.impl.CommonarchiveFactoryImpl.openEARFile(CommonarchiveFactoryImpl.java:563)
at com.ibm.etools.commonarchive.impl.CommonarchiveFactoryImpl.openEARFile(CommonarchiveFactoryImpl.java:532)
at com.ibm.ws.management.application.client.AppInstallHelper.getArchive(AppInstallHelper.java:108)
at com.ibm.ws.management.application.client.AppInstallHelper.getEarFile(AppInstallHelper.java:90)
at com.ibm.ws.management.application.client.AppInstallHelper.getAppDeploymentInfo(AppInstallHelper.java:146)
at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:88)
at com.ibm.websphere.management.application.AppManagementFactory.readArchive(AppManagementFactory.java:62)
at com.ibm.ws.console.appmanagement.action.GatherTaskData.<init>(GatherTaskData.java:102)
at com.ibm.ws.console.appmanagement.action.DefaultBindingsAction.execute(DefaultBindingsAction.java:209)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:275)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1486)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:528)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:629)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:2841)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:220)
at com.ibm.ws.webcontainer.VirtualHost.handleRequest(VirtualHost.java:204)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1681)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:77)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:421)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:367)
at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:94)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.requestComplete(WorkQueueManager.java:548)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.attemptIO(WorkQueueManager.java(Compiled Code))
at com.ibm.ws.tcp.channel.impl.WorkQueueManager.workerRun(WorkQueueManager.java:934)
at com.ibm.ws.tcp.channel.impl.WorkQueueManager$Worker.run(WorkQueueManager.java:1021)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))

my application.xml is



12 years ago
According to me you cannot do it. The array llist creation is on the server side. So when the array list is processed (the whole code in jsp) it is converted into an html page and sent to the client. on client side you do not have any server side code. So it is not possible. However there are certain ways in which this could be achieved like
12 years ago
JSP
hi ,
i am trying to make a post request to a jsp page using ajax by using jquery method.

in test1.jsp i am simply doing

it is showing as null even i checked in firebug the request contains the post parameters it is not coming in jsp page ?
but if i use the get method

everything seems perfect
12 years ago
JSP
Hi your solution is in the code you mentioned.
Consider you have 1 doctor name in the DB
the first time you go to the page the value gets populated from DB.

but the second time you are just adding the option in dropdown (kinda appending) so it is getting loaded twice.
12 years ago
JSP
Hi,

Why do you want to encrypt the password using javascript ? This is highly dangerous for the following reason

1. the algorithm will be exposed on client side for your encryption
2. the browser may have turned off the javascript so your code will not work.

I suggest you to perfor this on the server side.
12 years ago
JSP
@Tim Thanks for your reply... i need the second kind of security. Is it possible to display original image on a web page and for downloading i want to give a watermarked image.
I want this to be handled by pure jsp and servlets using tomcat 7.

One more thing Tim i am very new to web development.The first point that you mentioned about J2EE security i am not aware of that.
Can you please tell me anything that is available for tomcat so that i can research on it and decide which one to choose.

Thanks a lot in advance
12 years ago
I want to create a class which will get initialized at startup and hold some values.

I have initialized the class on startup but the problem is it does not retain its values. I want it to retain those values as long as the server is started.

How to do that ?
12 years ago
basically i want to restrict direct access to image files through url

is it like i will have to use content management system or something like that ?
12 years ago