<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Migrating from JSP/Servlets to ASP.NET</title><link>http://forums.asp.net/45.aspx</link><description>Discuss moving from JSP/Servlets to ASP.NET.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Reading a property file</title><link>http://forums.asp.net/thread/2450174.aspx</link><pubDate>Thu, 26 Jun 2008 17:47:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2450174</guid><dc:creator>bonafiden</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2450174.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=45&amp;PostID=2450174</wfw:commentRss><description>&lt;p&gt;I jaust have to reproduce same functionality (translate from Java) in ASP.NET, that&amp;#39;s why I am trying to make sure that I am doing the same thing.&lt;/p&gt;</description></item><item><title>Re: Reading a property file</title><link>http://forums.asp.net/thread/2450137.aspx</link><pubDate>Thu, 26 Jun 2008 17:33:20 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2450137</guid><dc:creator>SGWellens</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2450137.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=45&amp;PostID=2450137</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;bonafiden:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;But why this works in Java (please see statement at the beginning of the thread)?&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;If you want to know why something works in Java, perhaps a Java forum would be a more appropriate place to ask your question.&lt;/p&gt;
&lt;p&gt;This is an Asp.net forum.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Reading a property file</title><link>http://forums.asp.net/thread/2449987.aspx</link><pubDate>Thu, 26 Jun 2008 16:37:28 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2449987</guid><dc:creator>bonafiden</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2449987.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=45&amp;PostID=2449987</wfw:commentRss><description>&lt;p&gt;Thank you for trying to help :-)&lt;/p&gt;
&lt;p&gt;But why this works in Java (please see statement at the beginning of the thread)?&lt;/p&gt;</description></item><item><title>Re: Reading a property file</title><link>http://forums.asp.net/thread/2449891.aspx</link><pubDate>Thu, 26 Jun 2008 16:04:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2449891</guid><dc:creator>SGWellens</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2449891.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=45&amp;PostID=2449891</wfw:commentRss><description>&lt;p&gt;The RelativeSearchPath of the AppDomain will contain the directory of the dll.&lt;/p&gt;
&lt;p&gt;You cannot get the directory of the source code because that may not exist at runtime...after deploying.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;namespace&lt;/span&gt; ClassLibrary1
{
    &lt;span class="kwd"&gt;public class&lt;/span&gt; Class1
    {
        &lt;span class="kwd"&gt;public void&lt;/span&gt; MyFunction()
        {
             AppDomain currentDomain = AppDomain.CurrentDomain;
             currentDomain.&lt;strong&gt;RelativeSearchPath&lt;/strong&gt;;
        }&lt;/pre&gt;&amp;nbsp;</description></item><item><title>Re: Reading a property file</title><link>http://forums.asp.net/thread/2449499.aspx</link><pubDate>Thu, 26 Jun 2008 14:01:02 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2449499</guid><dc:creator>bonafiden</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2449499.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=45&amp;PostID=2449499</wfw:commentRss><description>&lt;p&gt;Is there any other way, beside using Server object and config file as parameter? Can I somehow read file, that is located in same directory as dll source code, same as in Java example?&lt;/p&gt;</description></item><item><title>Re: Reading a property file</title><link>http://forums.asp.net/thread/2449473.aspx</link><pubDate>Thu, 26 Jun 2008 13:54:20 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2449473</guid><dc:creator>SGWellens</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2449473.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=45&amp;PostID=2449473</wfw:commentRss><description>&lt;p&gt;You can pass a reference to the Server object to the dll.&lt;/p&gt;
&lt;p&gt;You can read any kind of text file.&lt;/p&gt;</description></item><item><title>Re: Reading a property file</title><link>http://forums.asp.net/thread/2449323.aspx</link><pubDate>Thu, 26 Jun 2008 13:17:49 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2449323</guid><dc:creator>bonafiden</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2449323.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=45&amp;PostID=2449323</wfw:commentRss><description>&lt;p&gt;I need to do this in dll, so I cannot use neither Server object, nor Web.config file.&lt;/p&gt;</description></item><item><title>Re: Reading a property file</title><link>http://forums.asp.net/thread/2449173.aspx</link><pubDate>Thu, 26 Jun 2008 12:24:29 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2449173</guid><dc:creator>SGWellens</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2449173.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=45&amp;PostID=2449173</wfw:commentRss><description>&lt;p&gt;Are you looking for something like this?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="coloredcode"&gt;        String[] Contents;
        String FullPath;

        FullPath = Server.MapPath(@&lt;span class="st"&gt;&amp;quot;~\MyConfif.config&amp;quot;&lt;/span&gt;);
        
        Contents = File.ReadAllLines(FullPath);&lt;/pre&gt;&amp;nbsp;</description></item><item><title>Reading a property file</title><link>http://forums.asp.net/thread/2446292.aspx</link><pubDate>Wed, 25 Jun 2008 14:10:32 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2446292</guid><dc:creator>bonafiden</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2446292.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=45&amp;PostID=2446292</wfw:commentRss><description>&lt;p&gt;I need to read a property file, which is in the project folder, without exact indication of the location. In other words, I need analog of Java&amp;#39;s statement:&lt;/p&gt;&lt;font color="#008080" size="2"&gt;InputStream&lt;/font&gt;&lt;font size="2"&gt; propStream = &lt;/font&gt;&lt;font color="#008080" size="2"&gt;Thread&lt;/font&gt;&lt;font size="2"&gt;.currentThread().getContextClassLoader().getResourceAsStream(CONFIGURATION_RULES_FILE);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;How can I do this in ASP.NET?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>