Gergely Dombi

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

Recent posts by Gergely Dombi

hi
you should set the keepgenerated flag to true
during the deployment
you can do this via the admin console
find the jsp attributes node in the left
tree and right click add then
type keepgenerated as attribute name and
true as the value
then the generated _jsp files will go to the
temp ditectory
bye
Gergo
22 years ago
hi
we are building a similar application
(in the sense that we want to put the login page
under ssl but not the whole app)
can u pls tell some resources where
i can read more on the ssl configuration of
the ibm http server
thx a lot
Geregly
22 years ago
hi
sorry the web.xml again:
any help would be appreciated
<?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">;
<web-app id="WebApp_ID">
<display-name>aik4.0</display-name>
<servlet id="Servlet_1">
<servlet-name>ForumManager</servlet-name>
<display-name>ForumManager</display-name>
<servlet-class>hu.iface.aik.ForumManager</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping id="ServletMapping_1">
<servlet-name>ForumManager</servlet-name>
<url-pattern>/forum/ForumManager</url-pattern>
</servlet-mapping>
<session-config id="SessionConfig_1">
<session-timeout>15</session-timeout>
</session-config>
<welcome-file-list id="WelcomeFileList_1">
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<security-constraint id="SecurityConstraint_1">
<web-resource-collection id="WebResourceCollection_1">
<web-resource-name>Protected</web-resource-name>
<url-pattern>/protected/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>DELETE</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint id="AuthConstraint_1">
<description>AIK security:+:AIK regisztrált ügyfél</description>
<role-name>registered</role-name>
</auth-constraint>
<user-data-constraint id="UserDataConstraint_1">
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config id="LoginConfig_1">
<auth-method>FORM</auth-method>
<form-login-config id="FormLoginConfig_1">
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/error.jsp</form-error-page>
</form-login-config>
</login-config>
<security-role id="SecurityRole_1">
<description>AIK regisztrált ügyfél</description>
<role-name>registered</role-name>
</security-role>
</web-app>
22 years ago
hi
we are developing an application that should authenticate registered users
we use WIN2K/was AE 4.0.1/IBM SecureWay
the ldap seems to be ok, as we can look up entries from the admin console
when i try to request a protected resource on the site i am redirected to the login.jsp file as it is in the specification
now if i enter a wrong userID/pwd pair i am forwarded to the error.jsp file
almost perfect:
if i enter a valid user/pwd then either i am redirected to a directory list of the app!!
or nothing at all happens
the web.xml file is:

<code>
<?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">;
<web-app id="WebApp_ID">
<display-name>aik4.0</display-name>
<servlet id="Servlet_1">
<servlet-name>ForumManager</servlet-name>
<display-name>ForumManager</display-name>
<servlet-class>hu.iface.aik.ForumManager</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping id="ServletMapping_1">
<servlet-name>ForumManager</servlet-name>
<url-pattern>/forum/ForumManager</url-pattern>
</servlet-mapping>
<session-config id="SessionConfig_1">
<session-timeout>15</session-timeout>
</session-config>
<welcome-file-list id="WelcomeFileList_1">
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<security-constraint id="SecurityConstraint_1">
<web-resource-collection id="WebResourceCollection_1">
<web-resource-name>Protected</web-resource-name>
<url-pattern>/protected/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>DELETE</http-method>
<http-method>PUT</http-method>
</web-resource-collection>
<auth-constraint id="AuthConstraint_1">
<description>AIK security:+:AIK regisztrált ügyfél</description>
<role-name>registered</role-name>
</auth-constraint>
<user-data-constraint id="UserDataConstraint_1">
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config id="LoginConfig_1">
<auth-method>FORM</auth-method>
<form-login-config id="FormLoginConfig_1">
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/error.jsp</form-error-page>
</form-login-config>
</login-config>
<security-role id="SecurityRole_1">
<description>AIK regisztrált ügyfél</description>
<role-name>registered</role-name>
</security-role>
</web-app>
</code>
22 years ago
pls post the line no 1094 to see what throws the
NPE
hi Balaji,
we moved the xml data from the db to the file system so we could use an InputStream from the URL of the xml files
this solved the encoding problem
(the encoding is UTF-8)
hi,
I use xalan to transform xml data to html
the xml data resides in a database the code is
something like:
String xmlData = new String();
//...
TransformerFactory tFactory = TransformerFactory.newInstance();
StringReader sr = new StringReader(xmlData);
Source xmlSource = new StreamSource(sr);
Source xslSource = new StreamSource(new URL("http://127.0.0.1:8080/aik/wordxml.xsl").openStream());
Transformer transformer = tFactory.newTransformer(xslSource);
transformer.transform(xmlSource, new StreamResult(out));

but the generated html's character encoding isn't what it's supposed to be
i guess the problem might be that i use StringReader instead of an InputStream, but is there a safe way to initialize an InputStream with
a String?
thanks in advance for any help
hi Kyle,
thank you for the tip
i am new to J2EE and ready to learn
new design patterns
i will look the up docs about DataSources
bye
Gergo
22 years ago
hi,
here is the skeleton of the code:

//declarations earlier in an include file
//...
try{
Class.forName(driver);
conn = DriverManager.getConnection(url, username, password);
String query = "select ...";
statement = conn.createStatement();
rs = statement.executeQuery(query);
//bla-bla, i don't use conn here
}catch(ClassNotFoundException cnfe){
System.err.println("..." + cnfe);
}catch(SQLException sqle){
System.err.println("..." + sqle);
}finally{
conn.close();
}
And in the finally clause comes the NPE.
I thought it may be something misterious with was's connection pooling cause while i wrote and
tested the app with tomcat it was ok.
Actually as i commented out the conn.close()
it worked welll.
Can u explain this to me pls?I am really interested. THX a lot.
Gergo
22 years ago
hi Shanmugam,
thx a lot it works now
by the way the whole connection stuff
is in a try-catch-finally block and
finally
{
conn.close();
}
caused a nullpointer exc
i commented it out and then it worked
is that something with websphere's connection
poooling?
thx you very much again
gergo
22 years ago
hi
i try to deploy a webapp to ws 4.0 AE but the
server doesn't find the oracle jdbc driver
i set the system classpath to point to the
class12.zip file
can anyone pls tell me what to do?
i searched the on line docs and there was something that one can configure it with the
administration console, but i am not an admin
so i was a bit confused with that
thx a lot
gergo
22 years ago